updatePromotionsStep - Medusa Core Workflows Reference
This documentation provides a reference to the updatePromotionsStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step updates one or more promotions.
Example#
Input#
UpdatePromotionDTO[]
UpdatePromotionDTO[]
UpdatePromotionDTO[]
UpdatePromotionDTO[]id
stringThe ID of the promotion.
id
stringis_automatic
booleanOptionalWhether the promotion is applied automatically.
is_automatic
booleanOptionalcode
stringOptionalThe code of the promotion.
code
stringOptionalThe type of the promotion.
The status of the promotion:
draft
indicates that a promotion is currently being prepared
active
indicates that a promotion is active
inactive
indicates that a promotion is no longer active
draft
indicates that a promotion is currently being preparedactive
indicates that a promotion is activeinactive
indicates that a promotion is no longer active
The associated application method.
campaign_id
null | stringOptionalThe associated campaign's ID.
campaign_id
null | stringOptionalOutput#
PromotionDTO[]
PromotionDTO[]
PromotionDTO[]
PromotionDTO[]id
stringThe ID of the promotion.
id
stringcode
stringOptionalThe code of the promotion.
code
stringOptionalThe type of the promotion:
standard
indicates that a promotion is a standard one applied with conditions.
buyget
indicates that a promotion is a "Buy X get Y" promotion.
standard
indicates that a promotion is a standard one applied with conditions.buyget
indicates that a promotion is a "Buy X get Y" promotion.
The status of the promotion:
active
promotion is available for user to consume
inactive
promotion is no longer available to the user
draft
promotion is currently being prepared
active
promotion is available for user to consumeinactive
promotion is no longer available to the userdraft
promotion is currently being prepared
is_automatic
booleanOptionalWhether the promotion is applied automatically.
is_automatic
booleanOptionalThe associated application method.
The rules of the promotion.
campaign_id
null | stringOptionalThe associated campaign.
campaign_id
null | stringOptionalThe associated campaign.
Was this page helpful?