Skip to main content
Skip to main content

addPromotionRules - Promotion Module Reference

This documentation provides a reference to the addPromotionRules method. This belongs to the Promotion Module.

This method adds promotion rules to a promotion.

Example

const promotionRules =
await promotionModuleService.addPromotionRules(
"promo_123",
[
{
attribute: "customer_group_id",
operator: "in",
values: ["VIP", "VVIP"],
},
]
)

Parameters

promotionIdstringRequired
The promotion's ID.
rulesDataCreatePromotionRuleDTO[]Required
The promotion rules to be created and added to the promotion.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<PromotionRuleDTO[]>Required
The promotion rules created.
Was this section helpful?