- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
calculateShippingOptionsPricesWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the calculateShippingOptionsPricesWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow calculates the prices for one or more shipping options in a cart. It's used by the Calculate Shipping Option Price Store API Route.
Note: Calculating shipping option prices may require sending requests to third-party fulfillment services.
This depends on the implementation of the fulfillment provider associated with the shipping option.
You can use this workflow within your own customizations or custom workflows, allowing you to calculate the prices of shipping options within your custom flows.
Source CodeExamples#
Steps#
Workflow Hook
Step conditioned by when
Input#
CalculateShippingOptionsPricesWorkflowInput
CalculateShippingOptionsPricesWorkflowInput
CalculateShippingOptionsPricesWorkflowInput
CalculateShippingOptionsPricesWorkflowInputcart_id
stringThe ID of the cart to calculate the shipping options for.
cart_id
stringshipping_options
object[]The shipping options to calculate the prices for.
shipping_options
object[]Output#
CalculateShippingOptionsPricesWorkflowOutput
CalculateShippingOptionsPricesWorkflowOutput
CalculateShippingOptionsPricesWorkflowOutput
CalculateShippingOptionsPricesWorkflowOutputcalculated_amount
numberThe calculated price.
calculated_amount
numberis_calculated_price_tax_inclusive
booleanWhether the calculated price includes taxes. If enabled, Medusa will
infer the taxes from the calculated price. If false, Medusa will
add taxes to the calculated price.
is_calculated_price_tax_inclusive
booleanWas this page helpful?