updateCampaignsStep - Medusa Core Workflows Reference

This documentation provides a reference to the updateCampaignsStep. It belongs to the @medusajs/medusa/core-flows package.

This step updates one or more campaigns.

Example#

Code
1const data = updateCampaignsStep([{2  id: "camp_123",3  campaign_identifier: "GA-123456"4}])

Input#

UpdateCampaignDTO[]UpdateCampaignDTO[]
idstring
The ID of the campaign.
namestringOptional
The name of the campaign.
descriptionnull | stringOptional
The description of the campaign.
campaign_identifierstringOptional
The campaign identifier of the campaign.
starts_atnull | DateOptional
The start date of the campaign.
ends_atnull | DateOptional
The end date of the campaign.
budgetOmit<UpdateCampaignBudgetDTO, "id">Optional
The budget of the campaign.

Output#

CampaignDTO[]CampaignDTO[]
idstring
The ID of the campaign.
namestringOptional
The name of the campaign.
descriptionstringOptional
The description of the campaign.
campaign_identifierstringOptional
The campaign identifier of the campaign.
starts_atDateOptional
The start date of the campaign.
ends_atDateOptional
The end date of the campaign.
budgetCampaignBudgetDTOOptional
The associated campaign budget.
promotionsPromotionDTO[]Optional
The associated promotions.
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