Campaign

In this guide, you'll learn what a campaign is and its related concepts.

Looking for no-code docs? Refer to this Medusa Admin User Guide to learn how to manage campaigns using the dashboard.

What is a Campaign?#

A Campaign combines promotions under the same conditions, such as start and end dates.

Campaigns are useful for grouping promotions that share the same time frame or target audience. They're also useful for limiting the usage of promotions.

A diagram showcasing the relation between the Campaign and Promotion data models


Campaign Limits#

Each campaign can have a budget represented by the CampaignBudget data model. The budget limits how many times the promotion can be used.

There are two types of budgets:

  • spend: An amount that, when crossed, the promotion becomes unusable.
    • For example, if the amount limit is set to $100, and the total amount of usage of this promotion crosses that threshold, the promotion can no longer be applied.
  • usage: The number of times that a promotion can be used.
    • For example, if the usage limit is set to 10, the promotion can be used only 10 times by customers. After that, it can no longer be applied.

A diagram showcasing the relation between the Campaign and CampaignBudget data models

How Budgets Limit Promotion Usage#

When a customer tries to use a promotion, Medusa checks whether the campaign has a budget and if the budget limit has been reached. If so, the promotion cannot be applied.

For example, if a campaign has a budget of type usage with a limit of 10, and the promotion has already been used 10 times, it cannot be applied anymore and is considered expired.

However, once a promotion is applied to a cart, it remains valid until the order is completed, even if the budget limit is reached in the meantime. This ensures that customers who have already applied the promotion can still benefit from it during checkout.

Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break