- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
computeActions - Promotion Module Reference
This documentation provides a reference to the computeActions
method. This belongs to the Promotion Module.
Note: You should only use this methods when implementing complex customizations. For common cases, check out available workflows instead .
This method provides the actions to perform on a cart based on the specified promotions and context.
Example#
Parameters#
promotionCodesToApply
string[]The promotion codes to be applied on the cart.
applicationContext
ComputeActionContextThe items and shipping methods of the cart.
applicationContext
ComputeActionContextoptions
Record<string, any>OptionalAny relevant options that may change how the actions are computed.
Returns#
Promise
Promise<ComputeActions[]>The list of computed actions to be applied on the cart.
Promise
Promise<ComputeActions[]>Was this page helpful?