upsertShippingOptionsStep - Medusa Core Workflows Reference

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

This step creates or updates shipping options.

src/workflows/my-workflow.ts
1import { createWorkflow } from "@medusajs/framework/workflows-sdk"2import { upsertShippingOptionsStep } from "@medusajs/medusa/core-flows"3
4const myWorkflow = createWorkflow(5  "my-workflow",6  () => {7    const data = upsertShippingOptionsStep([8      "{value}"9    ])10  }11)

Input#

UpsertShippingOptionsStepInputUpsertShippingOptionsStepInput
The data to create or update shipping options.
UpsertShippingOptionsStepInputOmit<CreateShippingOptionsWorkflowInput | UpdateShippingOptionsWorkflowInput, "prices">[]
The data to create or update shipping options.

Output#

ShippingOptionDTO[]ShippingOptionDTO[]
idstring
The ID of the shipping option.
namestring
The name of the shipping option.
The type of the shipping option's price.
service_zone_idstring
The associated service zone's ID.
shipping_profile_idstring
The associated shipping profile's ID.
provider_idstring
The associated fulfillment provider's ID.
shipping_option_type_idnull | string
The associated shipping option type's ID.
datanull | Record<string, unknown>
The data necessary for the associated fulfillment provider to process the shipping option and, later, its associated fulfillments.
metadatanull | Record<string, unknown>
Holds custom data in key-value pairs.
service_zoneServiceZoneDTO
The associated service zone.
shipping_profileShippingProfileDTO
The associated shipping profile.
fulfillment_providerFulfillmentProviderDTO
The associated fulfillment provider.
The associated shipping option type.
The rules associated with the shipping option.
fulfillmentsFulfillmentDTO[]
The fulfillments associated with the shipping option.
created_atDate
The creation date of the shipping option.
updated_atDate
The update date of the shipping option.
deleted_atnull | Date
The deletion date of the shipping option.
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