getActionsToComputeFromPromotionsStep - Medusa Core Workflows Reference

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

This step retrieves the actions to compute based on the promotions applied on a cart.

TipYou can use the retrieveCartStep to retrieve a cart's details.

Example#

Code
1const data = getActionsToComputeFromPromotionsStep({2  // retrieve the details of the cart from another workflow3  // or in another step using the Cart Module's service4  cart,5  promotionCodesToApply: ["10OFF"]6})

Input#

GetActionsToComputeFromPromotionsStepInputGetActionsToComputeFromPromotionsStepInput
The details of the cart and its applied promotions.
The cart to compute the actions for.
promotionCodesToApplystring[]
The promotion codes applied on the cart.

Output#

(ComputeActions | object & AddItemAdjustmentAction & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & RemoveItemAdjustmentAction & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & AddShippingMethodAdjustment & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & RemoveShippingMethodAdjustment & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & CampaignBudgetExceededAction & WorkflowDataProperties<ComputeActions> & object)[](ComputeActions | object & AddItemAdjustmentAction & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & RemoveItemAdjustmentAction & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & AddShippingMethodAdjustment & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & RemoveShippingMethodAdjustment & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & CampaignBudgetExceededAction & WorkflowDataProperties<ComputeActions> & object)[]
ComputeActions | object & AddItemAdjustmentAction & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & RemoveItemAdjustmentAction & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & AddShippingMethodAdjustment & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & RemoveShippingMethodAdjustment & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & CampaignBudgetExceededAction & WorkflowDataProperties<ComputeActions> & objectComputeActions | object & AddItemAdjustmentAction & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & RemoveItemAdjustmentAction & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & AddShippingMethodAdjustment & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & RemoveShippingMethodAdjustment & WorkflowDataProperties<ComputeActions> & object | never | never | never | never | never | object & CampaignBudgetExceededAction & WorkflowDataProperties<ComputeActions> & object
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