docs: [17/n] generate core-flows reference (#8800)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-08-27 12:24:30 +03:00
1 parent e29ead56dc
commit c5a86a83ee
15 files changed
+1894

No files matched your search

@@ -0,0 +1,357 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Fulfillment
<TypeList types={[{"name":"currency_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"([ShippingOptionsPriceCurrencyCode](../interfaces/core_flows.ShippingOptionsPriceCurrencyCode/page.mdx) \\| `ShippingOptionsPriceRegionId`)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"input.id","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"input.id","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"input.id","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"input.id","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"input.id","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"input.id","expandable":false,"children":[]},{"name":"priceSetId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceSetId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceSetId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceSetId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceSetId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceSetId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"[UpdateShippingProfileDTO](../../fulfillment/interfaces/fulfillment.UpdateShippingProfileDTO/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"selector","type":"[FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx) \\| [BaseFilterable](../../fulfillment/interfaces/fulfillment.BaseFilterable/page.mdx)&#60;[FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx) \\| [BaseFilterable](../../fulfillment/interfaces/fulfillment.BaseFilterable/page.mdx)&#60;[FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx) \\| [BaseFilterable](../../fulfillment/interfaces/fulfillment.BaseFilterable/page.mdx)&#60;[FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" conditioLine truncated
___
## createShippingOptionsPriceSetsStepId
`Const` **createShippingOptionsPriceSetsStepId**: `"add-shipping-options-prices-step"`
___
## cancelFulfillmentStepId
`Const` **cancelFulfillmentStepId**: `"cancel-fulfillment"`
___
## createFulfillmentSetsId
`Const` **createFulfillmentSetsId**: `"create-fulfillment-sets"`
___
## createFulfillmentStepId
`Const` **createFulfillmentStepId**: `"create-fulfillment"`
___
## createReturnFulfillmentStepId
`Const` **createReturnFulfillmentStepId**: `"create-return-fulfillment"`
___
## createServiceZonesStepId
`Const` **createServiceZonesStepId**: `"create-service-zones"`
___
## createShippingOptionRulesStepId
`Const` **createShippingOptionRulesStepId**: `"create-shipping-option-rules"`
___
## createShippingProfilesStepId
`Const` **createShippingProfilesStepId**: `"create-shipping-profiles"`
___
## deleteFulfillmentSetsStepId
`Const` **deleteFulfillmentSetsStepId**: `"delete-fulfillment-sets"`
___
## deleteServiceZonesStepId
`Const` **deleteServiceZonesStepId**: `"delete-service-zones"`
___
## deleteShippingOptionRulesStepId
`Const` **deleteShippingOptionRulesStepId**: `"delete-shipping-option-rules"`
___
## deleteShippingOptionsStepId
`Const` **deleteShippingOptionsStepId**: `"delete-shipping-options-step"`
___
## setShippingOptionsPricesStepId
`Const` **setShippingOptionsPricesStepId**: `"set-shipping-options-prices-step"`
___
## updateFulfillmentStepId
`Const` **updateFulfillmentStepId**: `"update-fulfillment"`
___
## updateShippingProfilesStepId
`Const` **updateShippingProfilesStepId**: `"update-shipping-profiles"`
___
## upsertShippingOptionsStepId
`Const` **upsertShippingOptionsStepId**: `"create-shipping-options-step"`
___
## validateShipmentStepId
`Const` **validateShipmentStepId**: `"validate-shipment"`
___
## createShippingOptionsPriceSetsStep
This step creates price sets for one or more shipping options.
### Input
<TypeList types={[{"name":"CreateShippingOptionsPriceSetsStepInput","type":"[CreateShippingOptionsPriceSetsStepInput](../types/core_flows.CreateShippingOptionsPriceSetsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"([ShippingOptionsPriceCurrencyCode](../interfaces/core_flows.ShippingOptionsPriceCurrencyCode/page.mdx) \\| `ShippingOptionsPriceRegionId`)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShippingOptionsPriceSetsStep"/>
### Output
<TypeList types={[{"name":"object[]","type":"`object`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"input.id","expandable":false,"children":[]},{"name":"priceSetId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShippingOptionsPriceSetsStep"/>
___
## cancelFulfillmentStep
This step cancels a fulfillment.
### Input
<TypeList types={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelFulfillmentStep"/>
___
## createFulfillmentSets
This step creates one or more fulfillment sets.
### Input
<TypeList types={[{"name":"CreateFulfillmentSetDTO[]","type":"[CreateFulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.CreateFulfillmentSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateFulfillmentSetDTO","type":"[CreateFulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.CreateFulfillmentSetDTO/page.mdx)","optional":false,"defaultValue":"","description":"The fulfillment set to be created.","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zones","type":"Omit&#60;[CreateServiceZoneDTO](../../fulfillment/interfaces/fulfillment.CreateServiceZoneDTO/page.mdx), \"fulfillment_set_id\"&#62;[]","description":"The service zones associated with the fulfillment set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"geo_zones","type":"(Omit&#60;[CreateCountryGeoZoneDTO](../../fulfillment/interfaces/fulfillment.CreateCountryGeoZoneDTO/page.mdx), \"service_zone_id\"&#62; \\| Omit&#60;[CreateProvinceGeoZoneDTO](../../fulfillment/interfaces/fulfillment.CreateProvinceGeoZoneDTO/page.mdx), \"service_zone_id\"&#62; \\| Omit&#60;[CreateCityGeoZoneDTO](../../fulfillment/interfaces/fulfillment.CreateCityGeoZoneDTO/page.mdx), \"service_zone_id\"&#62; \\| Omit&#60;[CreateZipGeoZoneDTO](../../fulfillment/interfaces/fulfillment.CreateZipGeoZoneDTO/page.mdx), \"service_zone_id\"&#62;)[]","description":"The geo zones associated with the service zone.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillmentSets"/>
### Output
<TypeList types={[{"name":"FulfillmentSetDTO[]","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"FulfillmentSetDTO","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","optional":false,"defaultValue":"","description":"The fulfillment set details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zones","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","description":"The service zones associated with the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"geo_zones","type":"[GeoZoneDTO](../../fulfillment/interfaces/fulfillment.GeoZoneDTO/page.mdx)[]","description":"The geo zones assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_options","type":"[ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)[]","description":"The shipping options assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`Date`","description":"The creation date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillmentSets"/>
___
## createFulfillmentStep
This step creates a fulfillment
### Input
<TypeList types={[{"name":"CreateFulfillmentDTO","type":"[CreateFulfillmentDTO](../../fulfillment/interfaces/fulfillment.CreateFulfillmentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivery_address","type":"Omit&#60;[CreateFulfillmentAddressDTO](../../fulfillment/interfaces/fulfillment.CreateFulfillmentAddressDTO/page.mdx), \"fulfillment_id\"&#62;","description":"The address associated with the fulfillment. It's used for delivery.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"company","type":"`null` \\| `string`","description":"The company of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`null` \\| `string`","description":"The first line of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`null` \\| `string`","description":"The second line of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"The city of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The ISO 2 character country code of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`null` \\| `string`","description":"The province of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`null` \\| `string`","description":"The postal code of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"items","type":"Omit&#60;[CreateFulfillmentItemDTO](../../fulfillment/interfaces/fulfillment.CreateFulfillmentItemDTO/page.mdx), \"fulfillment_id\"&#62;[]","description":"The items associated with the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the fulfillment item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The SKU of the fulfillment item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the fulfillment item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`string`","description":"The barcode of the fulfillment item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`null` \\| `string`","description":"The associated inventory item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"packed_at","type":"`null` \\| `Date`","description":"The date the fulfillment was packed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `Date`","description":"The date the fulfillment was shipped.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `Date`","description":"The date the fulfillment was delivered.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"The date the fulfillment was canceled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the fulfillment.","optional":true,"defaultValue":"","expandable":false,"childrLine truncated
### Output
<TypeList types={[{"name":"FulfillmentDTO","type":"[FulfillmentDTO](../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `Date`","description":"The date the fulfillment was packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `Date`","description":"The date the fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `Date`","description":"The date the fulfillment was delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the fulfillment provider to process\nthe fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option","type":"`null` \\| [ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)","description":"The associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optioLine truncated
___
## createReturnFulfillmentStep
This step creates a fulfillment for a return.
### Input
<TypeList types={[{"name":"CreateFulfillmentDTO","type":"[CreateFulfillmentDTO](../../fulfillment/interfaces/fulfillment.CreateFulfillmentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivery_address","type":"Omit&#60;[CreateFulfillmentAddressDTO](../../fulfillment/interfaces/fulfillment.CreateFulfillmentAddressDTO/page.mdx), \"fulfillment_id\"&#62;","description":"The address associated with the fulfillment. It's used for delivery.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"company","type":"`null` \\| `string`","description":"The company of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`null` \\| `string`","description":"The first line of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`null` \\| `string`","description":"The second line of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"The city of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The ISO 2 character country code of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`null` \\| `string`","description":"The province of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`null` \\| `string`","description":"The postal code of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the fulfillment address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"items","type":"Omit&#60;[CreateFulfillmentItemDTO](../../fulfillment/interfaces/fulfillment.CreateFulfillmentItemDTO/page.mdx), \"fulfillment_id\"&#62;[]","description":"The items associated with the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the fulfillment item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The SKU of the fulfillment item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the fulfillment item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`string`","description":"The barcode of the fulfillment item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`null` \\| `string`","description":"The associated inventory item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"packed_at","type":"`null` \\| `Date`","description":"The date the fulfillment was packed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `Date`","description":"The date the fulfillment was shipped.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `Date`","description":"The date the fulfillment was delivered.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"The date the fulfillment was canceled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the fulfillment.","optional":true,"defaultValue":"","expandable":false,"childrLine truncated
### Output
<TypeList types={[{"name":"FulfillmentDTO","type":"[FulfillmentDTO](../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `Date`","description":"The date the fulfillment was packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `Date`","description":"The date the fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `Date`","description":"The date the fulfillment was delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the fulfillment provider to process\nthe fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option","type":"`null` \\| [ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)","description":"The associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optioLine truncated
___
## createServiceZonesStep
This step creates one or more service zones.
### Input
<TypeList types={[{"name":"CreateServiceZoneDTO[]","type":"[CreateServiceZoneDTO](../../fulfillment/interfaces/fulfillment.CreateServiceZoneDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateServiceZoneDTO","type":"[CreateServiceZoneDTO](../../fulfillment/interfaces/fulfillment.CreateServiceZoneDTO/page.mdx)","optional":false,"defaultValue":"","description":"The service zone to be created.","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_id","type":"`string`","description":"The associated fulfillment set's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"geo_zones","type":"(Omit&#60;[CreateCountryGeoZoneDTO](../../fulfillment/interfaces/fulfillment.CreateCountryGeoZoneDTO/page.mdx), \"service_zone_id\"&#62; \\| Omit&#60;[CreateProvinceGeoZoneDTO](../../fulfillment/interfaces/fulfillment.CreateProvinceGeoZoneDTO/page.mdx), \"service_zone_id\"&#62; \\| Omit&#60;[CreateCityGeoZoneDTO](../../fulfillment/interfaces/fulfillment.CreateCityGeoZoneDTO/page.mdx), \"service_zone_id\"&#62; \\| Omit&#60;[CreateZipGeoZoneDTO](../../fulfillment/interfaces/fulfillment.CreateZipGeoZoneDTO/page.mdx), \"service_zone_id\"&#62;)[]","description":"The geo zones associated with the service zone.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createServiceZonesStep"/>
### Output
<TypeList types={[{"name":"ServiceZoneDTO[]","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ServiceZoneDTO","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","optional":false,"defaultValue":"","description":"The service zone details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zones","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","description":"The service zones associated with the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"geo_zones","type":"[GeoZoneDTO](../../fulfillment/interfaces/fulfillment.GeoZoneDTO/page.mdx)[]","description":"The geo zones assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[GeoZoneType](../../fulfillment/types/fulfillment.GeoZoneType/page.mdx)","description":"The type of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"The province code of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"The city of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_expression","type":"`null` \\| `Record<string, unknown>`","description":"The postal expression of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_options","type":"[ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)[]","description":"The shipping options assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","descriLine truncated
___
## createShippingOptionRulesStep
This step creates one or more shipping option rules.
### Input
<TypeList types={[{"name":"AddFulfillmentShippingOptionRulesWorkflowDTO","type":"`AddFulfillmentShippingOptionRulesWorkflowDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShippingOptionRulesStep"/>
### Output
<TypeList types={[{"name":"ShippingOptionRuleDTO[]","type":"[ShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingOptionRuleDTO","type":"[ShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The shipping option rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"`string`","description":"The operator of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `object`","description":"The values of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `string`[]","description":"The values of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_option_id","type":"`string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option","type":"[ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)","description":"The associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile","type":"[ShippingProfileDTO](../../fulfillment/interfaces/fulfillment.ShippingProfileDTO/page.mdx)","description":"The associated shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_provider","type":"[FulfillmentProviderDTO](../../fulfillment/interfaces/fulfillment.FulfillmentProviderDTO/page.mdx)","description":"The associated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ShippingOptionTypeDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionTypeDTO/page.mdx)","description":"The associated shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[ShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionRuleDTO/page.mdx)[]","description":"The rules associated with the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillments","type":"[FulfillmentDTO](../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx)[]","description":"The fulfillments associated with the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of Line truncated
___
## createShippingProfilesStep
This step creates one or more shipping profiles.
### Input
<TypeList types={[{"name":"CreateShippingProfileDTO[]","type":"[CreateShippingProfileDTO](../../fulfillment/interfaces/fulfillment.CreateShippingProfileDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateShippingProfileDTO","type":"[CreateShippingProfileDTO](../../fulfillment/interfaces/fulfillment.CreateShippingProfileDTO/page.mdx)","optional":false,"defaultValue":"","description":"The shipping profile to be created.","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShippingProfilesStep"/>
### Output
<TypeList types={[{"name":"ShippingProfileDTO[]","type":"[ShippingProfileDTO](../../fulfillment/interfaces/fulfillment.ShippingProfileDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingProfileDTO","type":"[ShippingProfileDTO](../../fulfillment/interfaces/fulfillment.ShippingProfileDTO/page.mdx)","optional":false,"defaultValue":"","description":"The shipping profile details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_options","type":"[ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)[]","description":"The shipping options associated with the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile","type":"[ShippingProfileDTO](../../fulfillment/interfaces/fulfillment.ShippingProfileDTO/page.mdx)","description":"The associated shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_provider","type":"[FulfillmentProviderDTO](../../fulfillment/interfaces/fulfillment.FulfillmentProviderDTO/page.mdx)","description":"The associated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ShippingOptionTypeDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionTypeDTO/page.mdx)","description":"The associated shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[ShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionRuleDTO/page.mdx)[]","description":"The rules associated with the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillments","type":"[FulfillmentDTO](../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx)[]","description":"The fulfillments associated with the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the shippLine truncated
___
## deleteFulfillmentSetsStep
This step deletes one or more fulfillment sets.
### Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteFulfillmentSetsStep"/>
___
## deleteServiceZonesStep
This step deletes one or more service zones.
### Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteServiceZonesStep"/>
___
## deleteShippingOptionRulesStep
This step deletes one or more shipping option rules.
### Input
<TypeList types={[{"name":"RemoveFulfillmentShippingOptionRulesWorkflowDTO","type":"`RemoveFulfillmentShippingOptionRulesWorkflowDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteShippingOptionRulesStep"/>
___
## deleteShippingOptionsStep
This step deletes one or more shipping options.
### Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteShippingOptionsStep"/>
### Output
<TypeList types={[{"name":"DeleteEntityInput","type":"[DeleteEntityInput](../../modules_sdk/types/modules_sdk.DeleteEntityInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"DeleteEntityInput","type":"`object`","description":"The details of a data model's record whose linked records should be deleted. Usually used after the\ndata model's record is deleted.\n\nThe key is the data model's name. Its value is an object that has the ID of the data model's record.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteShippingOptionsStep"/>
___
## setShippingOptionsPricesStep
This step sets the prices of one or more shipping options.
### Input
<TypeList types={[{"name":"SetShippingOptionsPricesStepInput","type":"[SetShippingOptionsPricesStepInput](../types/core_flows.SetShippingOptionsPricesStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"`FulfillmentWorkflow.UpdateShippingOptionsWorkflowInput`[`\"prices\"`]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="setShippingOptionsPricesStep"/>
___
## updateFulfillmentStep
This step updates a fulfillment.
### Input
<TypeList types={[{"name":"UpdateFulfillmentWorkflowInput","type":"`UpdateFulfillmentWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateFulfillmentStep"/>
### Output
<TypeList types={[{"name":"FulfillmentDTO","type":"[FulfillmentDTO](../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `Date`","description":"The date the fulfillment was packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `Date`","description":"The date the fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `Date`","description":"The date the fulfillment was delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the fulfillment provider to process\nthe fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option","type":"`null` \\| [ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)","description":"The associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optioLine truncated
___
## updateShippingProfilesStep
This step updates shipping profiles matching the specified filters.
### Input
<TypeList types={[{"name":"UpdateShippingProfilesStepInput","type":"[UpdateShippingProfilesStepInput](../types/core_flows.UpdateShippingProfilesStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"update","type":"[UpdateShippingProfileDTO](../../fulfillment/interfaces/fulfillment.UpdateShippingProfileDTO/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"selector","type":"[FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx) \\| [BaseFilterable](../../fulfillment/interfaces/fulfillment.BaseFilterable/page.mdx)&#60;[FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx) \\| [BaseFilterable](../../fulfillment/interfaces/fulfillment.BaseFilterable/page.mdx)&#60;[FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx) \\| [BaseFilterable](../../fulfillment/interfaces/fulfillment.BaseFilterable/page.mdx)&#60;[FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../fulfillment/types/fulfillment.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the shipping profiles by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[] \\| [OperatorMap](../../fulfillment/types/fulfillment.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter the shipping profiles by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string` \\| `string`[] \\| [OperatorMap](../../fulfillment/types/fulfillment.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter the shipping profiles by their type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_options","type":"[FilterableShippingOptionProps](../../fulfillment/interfaces/fulfillment.FilterableShippingOptionProps/page.mdx)","description":"The filters to apply on the retrieved shipping options.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../fulfillment/interfaces/fulfillment.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../fulfillment/interfaces/fulfillment.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx) \\| [BaseFilterable](../../fulfillment/interfaces/fulfillment.BaseFilterable/page.mdx)&#60;[FilterableShippingProfileProps](../../fulfillment/interfaces/fulfillment.FilterableShippingProfileProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entitLine truncated
### Output
<TypeList types={[{"name":"ShippingProfileDTO[]","type":"[ShippingProfileDTO](../../fulfillment/interfaces/fulfillment.ShippingProfileDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingProfileDTO","type":"[ShippingProfileDTO](../../fulfillment/interfaces/fulfillment.ShippingProfileDTO/page.mdx)","optional":false,"defaultValue":"","description":"The shipping profile details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_options","type":"[ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)[]","description":"The shipping options associated with the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile","type":"[ShippingProfileDTO](../../fulfillment/interfaces/fulfillment.ShippingProfileDTO/page.mdx)","description":"The associated shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_provider","type":"[FulfillmentProviderDTO](../../fulfillment/interfaces/fulfillment.FulfillmentProviderDTO/page.mdx)","description":"The associated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ShippingOptionTypeDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionTypeDTO/page.mdx)","description":"The associated shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[ShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionRuleDTO/page.mdx)[]","description":"The rules associated with the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillments","type":"[FulfillmentDTO](../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx)[]","description":"The fulfillments associated with the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the shippLine truncated
___
## upsertShippingOptionsStep
This step creates or updates shipping options.
### Input
<TypeList types={[{"name":"UpsertShippingOptionsStepInput","type":"[UpsertShippingOptionsStepInput](../types/core_flows.UpsertShippingOptionsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpsertShippingOptionsStepInput","type":"Omit&#60;FulfillmentWorkflow.CreateShippingOptionsWorkflowInput \\| FulfillmentWorkflow.UpdateShippingOptionsWorkflowInput, \"prices\"&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="upsertShippingOptionsStep"/>
### Output
<TypeList types={[{"name":"ShippingOptionDTO[]","type":"[ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingOptionDTO","type":"[ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The shipping option details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"geo_zones","type":"[GeoZoneDTO](../../fulfillment/interfaces/fulfillment.GeoZoneDTO/page.mdx)[]","description":"The geo zones assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_options","type":"[ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)[]","description":"The shipping options assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_profile","type":"[ShippingProfileDTO](../../fulfillment/interfaces/fulfillment.ShippingProfileDTO/page.mdx)","description":"The associated shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"chLine truncated
___
## validateShipmentStep
This step validates that a shipment can be created for a fulfillment.
### Input
<TypeList types={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateShipmentStep"/>
___
## \_\_type
**\_\_type**:
___
## \_\_type
**\_\_type**:
___
## \_\_type
**\_\_type**:
___
## \_\_type
**\_\_type**:
___
## \_\_type
**\_\_type**:
___
## \_\_type
**\_\_type**:
@@ -0,0 +1,81 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Payment
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Steps_Payment"/>
___
## authorizePaymentSessionStepId
`Const` **authorizePaymentSessionStepId**: `"authorize-payment-session-step"`
___
## cancelPaymentStepId
`Const` **cancelPaymentStepId**: `"cancel-payment-step"`
___
## capturePaymentStepId
`Const` **capturePaymentStepId**: `"capture-payment-step"`
___
## refundPaymentStepId
`Const` **refundPaymentStepId**: `"refund-payment-step"`
___
## authorizePaymentSessionStep
This step authorizes a payment session.
### Input
<TypeList types={[{"name":"AuthorizePaymentSessionStepInput","type":"[AuthorizePaymentSessionStepInput](../types/core_flows.AuthorizePaymentSessionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authorizePaymentSessionStep"/>
### Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"naLine truncated
___
## cancelPaymentStep
This step cancels one or more payments.
### Input
<TypeList types={[{"name":"CancelPaymentStepInput","type":"[CancelPaymentStepInput](../types/core_flows.CancelPaymentStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"paymentIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelPaymentStep"/>
___
## capturePaymentStep
This step captures a payment.
### Input
<TypeList types={[{"name":"CapturePaymentStepInput","type":"[CapturePaymentStepInput](../types/core_flows.CapturePaymentStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePaymentStep"/>
### Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"naLine truncated
___
## refundPaymentStep
This step refunds a payment.
### Input
<TypeList types={[{"name":"RefundPaymentStepInput","type":"[RefundPaymentStepInput](../types/core_flows.RefundPaymentStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPaymentStep"/>
### Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"naLine truncated
@@ -0,0 +1,140 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Payment Collection
<TypeList types={[{"name":"payment_collection_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"selector","type":"[FilterablePaymentCollectionProps](../../payment/interfaces/payment.FilterablePaymentCollectionProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([PaymentCollectionDTO](../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx) \\| [BaseFilterable](../../payment/interfaces/payment.BaseFilterable/page.mdx)&#60;[PaymentCollectionDTO](../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PaymentCollectionStatus](../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the associated payment sessions.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount refunded within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount captured within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the payment collection was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment collection was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment collection was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_sessions","type":"[PaymentSessionDTO](../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)[]","description":"The associated payment sessioLine truncated
___
## createPaymentSessionStepId
`Const` **createPaymentSessionStepId**: `"create-payment-session"`
___
## createRefundReasonStepId
`Const` **createRefundReasonStepId**: `"create-refund-reason"`
___
## deletePaymentSessionsStepId
`Const` **deletePaymentSessionsStepId**: `"delete-payment-sessions"`
___
## deleteRefundReasonsStepId
`Const` **deleteRefundReasonsStepId**: `"delete-refund-reasons"`
___
## updatePaymentCollectionStepId
`Const` **updatePaymentCollectionStepId**: `"update-payment-collection"`
___
## updateRefundReasonStepId
`Const` **updateRefundReasonStepId**: `"update-refund-reasons"`
___
## validateDeletedPaymentSessionsStepId
`Const` **validateDeletedPaymentSessionsStepId**: `"validate-deleted-payment-sessions"`
___
## createPaymentSessionStep
This step creates a payment session.
### Input
<TypeList types={[{"name":"CreatePaymentSessionStepInput","type":"[CreatePaymentSessionStepInput](../interfaces/core_flows.CreatePaymentSessionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_collection_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../payment/interfaces/payment.PaymentProviderContext/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"billing_address","type":"Partial&#60;[AddressDTO](../../payment/types/payment.AddressDTO/page.mdx)&#62;","description":"The payment's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The associated customer's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"session_id","type":"`string`","description":"The ID of payment session the provider payment is associated with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"Partial&#60;[CustomerDTO](../../payment/interfaces/payment.CustomerDTO/page.mdx)&#62;","description":"The customer associated with this payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated Line truncated
### Output
<TypeList types={[{"name":"PaymentSessionDTO","type":"[PaymentSessionDTO](../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount to authorize.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data necessary for the payment provider to process the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PaymentSessionStatus](../../payment/types/payment.PaymentSessionStatus/page.mdx)","description":"The status of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"The context necessary for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_at","type":"`Date`","description":"When the payment session was authorized.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection","type":"[PaymentCollectionDTO](../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)","description":"The payment collection the session is associated with.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[PaymentCollectionStatus](../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the associated payment sessions.","optional":true,"defaultValue":"","expandable":false,"children"Line truncated
___
## createRefundReasonStep
This step creates one or more refund reasons.
### Input
<TypeList types={[{"name":"CreateRefundReasonDTO[]","type":"[CreateRefundReasonDTO](../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateRefundReasonDTO","type":"[CreateRefundReasonDTO](../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonStep"/>
### Output
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonStep"/>
___
## deletePaymentSessionsStep
This step deletes one or more payment sessions.
Note: This step should not be used alone as it doesn't consider a revert
Use deletePaymentSessionsWorkflow instead that uses this step
### Input
<TypeList types={[{"name":"DeletePaymentSessionStepInput","type":"[DeletePaymentSessionStepInput](../interfaces/core_flows.DeletePaymentSessionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePaymentSessionsStep"/>
### Output
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePaymentSessionsStep"/>
___
## deleteRefundReasonsStep
This step deletes one or more refund reasons.
### Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteRefundReasonsStep"/>
___
## updatePaymentCollectionStep
This step updates payment collections matching the specified filters.
### Input
<TypeList types={[{"name":"UpdatePaymentCollectionStepInput","type":"[UpdatePaymentCollectionStepInput](../interfaces/core_flows.UpdatePaymentCollectionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterablePaymentCollectionProps](../../payment/interfaces/payment.FilterablePaymentCollectionProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([PaymentCollectionDTO](../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx) \\| [BaseFilterable](../../payment/interfaces/payment.BaseFilterable/page.mdx)&#60;[PaymentCollectionDTO](../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PaymentCollectionStatus](../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the associated payment sessions.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount refunded within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount captured within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the payment collection was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment collection was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment collection was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_sessions","type":"[PaymentSessionDTO](../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)[]","description":"The associated payment sessions.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[PaymentDTO](../../payment/interfaces/payment.PaymentDTO/page.mdx)[]","description":"The associated payments.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"$and","type":"([BaseFilterable](../../payment/interfaces/payment.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../payment/interfaces/payment.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([PaymentCollectionDTO](../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx) \\| [BaseFilterable](../../payment/interfaces/payment.BaseFilterable/page.mdx)&#60;[PaymentCollectionDTO](../../payment/interfaLine truncated
### Output
<TypeList types={[{"name":"PaymentCollectionDTO[]","type":"[PaymentCollectionDTO](../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PaymentCollectionDTO","type":"[PaymentCollectionDTO](../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The payment collection details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[PaymentCollectionStatus](../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the associated payment sessions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"refunded_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount refunded within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"captured_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount captured within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the payment collection was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment collection was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment collection was updated."Line truncated
___
## updateRefundReasonsStep
This step updates one or more refund reasons.
### Input
<TypeList types={[{"name":"UpdateRefundReasonDTO[]","type":"[UpdateRefundReasonDTO](../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdateRefundReasonDTO","type":"[UpdateRefundReasonDTO](../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The id of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsStep"/>
### Output
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsStep"/>
___
## validateDeletedPaymentSessionsStep
This step validates that the specified payment session IDs were deleted.
### Input
<TypeList types={[{"name":"ValidateDeletedPaymentSessionsStepInput","type":"[ValidateDeletedPaymentSessionsStepInput](../interfaces/core_flows.ValidateDeletedPaymentSessionsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"idsToDelete","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idsDeleted","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateDeletedPaymentSessionsStep"/>
@@ -0,0 +1,121 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Pricing
<TypeList types={[{"name":"price_sets","type":"[UpsertPriceSetDTO](../../pricing/interfaces/pricing.UpsertPriceSetDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"A string indicating the ID of the price set to update.\nIf not provided, a price set is created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[CreatePricesDTO](../../pricing/interfaces/pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to create and add to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../pricing/types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../pricing/types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../pricing/types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../pricing/interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are the attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"selector","type":"[FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../pricing/interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../pricing/interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../pricing/interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, [BigNumberInput](../../pricing/types/pricing.BigNumberInput/page.mdx)>`","description":"an object whose keys are the name of the context attribute. Its value can be a string or a BigNumberInput. For example, you can pass the `currency_code` property with its value being the currency code to calculate the price in.\nAnother example is passing the `quantity` property to calculate the price for that specified quantity, which finds a price set whose `min_quantity` and `max_quantity` conditions match the specified quantity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"IDs to filter price sets by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[FilterableMoneyAmountProps](../../pricing/interfaces/pricing.FilterableMoneyAmountProps/page.mdx)","description":"Filters to apply on a price set's associated money amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../pricing/interfaces/pricing.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entitLine truncated
___
## createPricePreferencesStepId
`Const` **createPricePreferencesStepId**: `"create-price-preferences"`
___
## createPriceSetsStepId
`Const` **createPriceSetsStepId**: `"create-price-sets"`
___
## deletePricePreferencesStepId
`Const` **deletePricePreferencesStepId**: `"delete-price-preferences"`
___
## updatePricePreferencesAsArrayStepId
`Const` **updatePricePreferencesAsArrayStepId**: `"update-price-preferences-as-array"`
___
## updatePricePreferencesStepId
`Const` **updatePricePreferencesStepId**: `"update-price-preferences"`
___
## updatePriceSetsStepId
`Const` **updatePriceSetsStepId**: `"update-price-sets"`
___
## createPricePreferencesStep
This step creates one or more price preferences.
### Input
<TypeList types={[{"name":"CreatePricePreferencesWorkflowInput[]","type":"`CreatePricePreferencesWorkflowInput`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreatePricePreferencesWorkflowInput","type":"`CreatePricePreferencesWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createPricePreferencesStep"/>
### Output
<TypeList types={[{"name":"PricePreferenceDTO[]","type":"[PricePreferenceDTO](../../pricing/interfaces/pricing.PricePreferenceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PricePreferenceDTO","type":"[PricePreferenceDTO](../../pricing/interfaces/pricing.PricePreferenceDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price preference's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price preference.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`null` \\| `string`","description":"The rule attribute for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `string`","description":"The rule value for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price preference was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price preference was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price preference was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createPricePreferencesStep"/>
___
## createPriceSetsStep
This step creates one or more price sets.
### Input
<TypeList types={[{"name":"CreatePriceSetDTO[]","type":"[CreatePriceSetDTO](../../pricing/interfaces/pricing.CreatePriceSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreatePriceSetDTO","type":"[CreatePriceSetDTO](../../pricing/interfaces/pricing.CreatePriceSetDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price set to create.","expandable":false,"children":[{"name":"prices","type":"[CreatePricesDTO](../../pricing/interfaces/pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to create and add to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../pricing/types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../pricing/types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../pricing/types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../pricing/interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are the attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createPriceSetsStep"/>
### Output
<TypeList types={[{"name":"PriceSetDTO[]","type":"[PriceSetDTO](../../pricing/interfaces/pricing.PriceSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceSetDTO","type":"[PriceSetDTO](../../pricing/interfaces/pricing.PriceSetDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price set's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../../pricing/interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`number`","description":"The number of rules that apply to this price","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_rules","type":"[PriceRuleDTO](../../pricing/interfaces/pricing.PriceRuleDTO/page.mdx)[]","description":"The price rules that apply to this price","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"calculated_price","type":"[CalculatedPriceSet](../../pricing/interfaces/pricing.CalculatedPriceSet/page.mdx)","description":"The calculated price based on the context.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_amount","type":"`null` \\| [BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The amount of the calculated price, or `null` if there isn't a calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_calculated_amount","type":"`null` \\| [BigNumberRawValue](../../pricing/types/pricing.BigNumberRawValue/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_amount","type":"`null` \\| [BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The amount of the original price, or `null` if there isn't a calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_amount","type":"`null` \\| [BigNumberRawValue](../../pricing/types/pricing.BigNumberRawValue/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The currency code of the calculated price, or null if there isn't a calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_calculated_price_price_list","type":"`boolean`","description":"Whether the calculated price is associated with a price list. During the calculation process, if no valid price list is found,\nthe calculated price is set to the original price, which doesn't belong to a price list. In that case, the value of this property is `false`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_calculated_price_tax_inclusive","type":"`boolean`","description":"Whether the calculated price is tax inclusive or not.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_original_price_price_list","type":"`boolean`","description":"WhethLine truncated
___
## deletePricePreferencesStep
This step deletes one or more price preferences.
### Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePricePreferencesStep"/>
___
## updatePricePreferencesAsArrayStep
This step updates price preferences.
### Input
<TypeList types={[{"name":"UpdatePricePreferencesAsArrayStepInput","type":"[UpdatePricePreferencesAsArrayStepInput](../types/core_flows.UpdatePricePreferencesAsArrayStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdatePricePreferencesAsArrayStepInput","type":"`PricingWorkflow.UpdatePricePreferencesWorkflowInput`[`\"update\"`][]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePricePreferencesAsArrayStep"/>
### Output
<TypeList types={[{"name":"PricePreferenceDTO[]","type":"[PricePreferenceDTO](../../pricing/interfaces/pricing.PricePreferenceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PricePreferenceDTO","type":"[PricePreferenceDTO](../../pricing/interfaces/pricing.PricePreferenceDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price preference's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price preference.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`null` \\| `string`","description":"The rule attribute for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `string`","description":"The rule value for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price preference was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price preference was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price preference was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePricePreferencesAsArrayStep"/>
___
## updatePricePreferencesStep
This step updates price preferences matching the specified filters.
### Input
<TypeList types={[{"name":"UpdatePricePreferencesWorkflowInput","type":"`UpdatePricePreferencesWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePricePreferencesStep"/>
### Output
<TypeList types={[{"name":"PricePreferenceDTO[]","type":"[PricePreferenceDTO](../../pricing/interfaces/pricing.PricePreferenceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PricePreferenceDTO","type":"[PricePreferenceDTO](../../pricing/interfaces/pricing.PricePreferenceDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price preference's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price preference.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`null` \\| `string`","description":"The rule attribute for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `string`","description":"The rule value for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price preference was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price preference was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price preference was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePricePreferencesStep"/>
___
## updatePriceSetsStep
This step updates price sets.
### Input
<TypeList types={[{"name":"UpdatePriceSetsStepInput","type":"[UpdatePriceSetsStepInput](../types/core_flows.UpdatePriceSetsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"price_sets","type":"[UpsertPriceSetDTO](../../pricing/interfaces/pricing.UpsertPriceSetDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"A string indicating the ID of the price set to update.\nIf not provided, a price set is created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[CreatePricesDTO](../../pricing/interfaces/pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to create and add to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../pricing/types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../pricing/types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../pricing/types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../pricing/interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are the attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"selector","type":"[FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../pricing/interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../pricing/interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../pricing/interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../pricing/interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, [BigNumberInput](../../pricing/types/pricing.BigNumberInput/page.mdx)>`","description":"an object whose keys are the name of the context attribute. Its value can be a string or a BigNumberInput. For example, you can pass the `currency_code` property with its value being the currency code to calculate the price in.\nAnother example is passing the `quantity` property to calculate the price for that specified quantity, which finds a price set whose `min_quantity` and `max_quantity` conditions match the specified quantity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"IDs to filter price sets by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[FilterableMoneyAmountProps](../../pricing/interfaces/pricing.FilterableMoneyAmountProps/page.mdx)","description":"Filters to apply on a price set's associated money amounts.","optional":true,"defaultValue":"","Line truncated
### Output
<TypeList types={[{"name":"PriceSetDTO[]","type":"[PriceSetDTO](../../pricing/interfaces/pricing.PriceSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceSetDTO","type":"[PriceSetDTO](../../pricing/interfaces/pricing.PriceSetDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price set's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../../pricing/interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`number`","description":"The number of rules that apply to this price","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_rules","type":"[PriceRuleDTO](../../pricing/interfaces/pricing.PriceRuleDTO/page.mdx)[]","description":"The price rules that apply to this price","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"calculated_price","type":"[CalculatedPriceSet](../../pricing/interfaces/pricing.CalculatedPriceSet/page.mdx)","description":"The calculated price based on the context.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_amount","type":"`null` \\| [BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The amount of the calculated price, or `null` if there isn't a calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_calculated_amount","type":"`null` \\| [BigNumberRawValue](../../pricing/types/pricing.BigNumberRawValue/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_amount","type":"`null` \\| [BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The amount of the original price, or `null` if there isn't a calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_amount","type":"`null` \\| [BigNumberRawValue](../../pricing/types/pricing.BigNumberRawValue/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The currency code of the calculated price, or null if there isn't a calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_calculated_price_price_list","type":"`boolean`","description":"Whether the calculated price is associated with a price list. During the calculation process, if no valid price list is found,\nthe calculated price is set to the original price, which doesn't belong to a price list. In that case, the value of this property is `false`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_calculated_price_tax_inclusive","type":"`boolean`","description":"Whether the calculated price is tax inclusive or not.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_original_price_price_list","type":"`boolean`","description":"WhethLine truncated
@@ -0,0 +1,73 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Reservation
## createReservationsStepId
`Const` **createReservationsStepId**: `"create-reservations-step"`
___
## deleteReservationsByLineItemsStepId
`Const` **deleteReservationsByLineItemsStepId**: `"delete-reservations-by-line-items"`
___
## deleteReservationsStepId
`Const` **deleteReservationsStepId**: `"delete-reservations"`
___
## updateReservationsStepId
`Const` **updateReservationsStepId**: `"update-reservations-step"`
___
## createReservationsStep
This step creates one or more reservations.
### Input
<TypeList types={[{"name":"CreateReservationItemInput[]","type":"[CreateReservationItemInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateReservationItemInput/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateReservationItemInput","type":"[CreateReservationItemInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateReservationItemInput/page.mdx)","optional":false,"defaultValue":"","description":"The details of the reservation item to be created.","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The user or system that created the reservation. Can be any form of identification string.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"An ID associated with an external third-party system that the reservation item is connected to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReservationsStep"/>
### Output
<TypeList types={[{"name":"ReservationItemDTO[]","type":"[ReservationItemDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ReservationItemDTO","type":"[ReservationItemDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The reservation item details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReservationsStep"/>
___
## deleteReservationsByLineItemsStep
This step deletes reservations by their associated line items.
### Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteReservationsByLineItemsStep"/>
___
## deleteReservationsStep
This step deletes one or more reservations.
### Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteReservationsStep"/>
___
## updateReservationsStep
This step updates one or more reservations.
### Input
<TypeList types={[{"name":"UpdateReservationItemInput[]","type":"[UpdateReservationItemInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.UpdateReservationItemInput/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdateReservationItemInput","type":"[UpdateReservationItemInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.UpdateReservationItemInput/page.mdx)","optional":false,"defaultValue":"","description":"The attributes to update in a reservation item.","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReservationsStep"/>
### Output
<TypeList types={[{"name":"ReservationItemDTO[]","type":"[ReservationItemDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ReservationItemDTO","type":"[ReservationItemDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The reservation item details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReservationsStep"/>
@@ -0,0 +1,61 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Stock Location
## createStockLocationsStepId
`Const` **createStockLocationsStepId**: `"create-stock-locations"`
___
## deleteStockLocationsStepId
`Const` **deleteStockLocationsStepId**: `"delete-stock-locations-step"`
___
## updateStockLocationsStepId
`Const` **updateStockLocationsStepId**: `"update-stock-locations-step"`
___
## createStockLocations
This step creates one or more stock locations.
### Input
<TypeList types={[{"name":"CreateStockLocationInput[]","type":"[CreateStockLocationInput](../../types/StockLocationTypes/types/types.StockLocationTypes.CreateStockLocationInput/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateStockLocationInput","type":"[CreateStockLocationInput](../../types/StockLocationTypes/types/types.StockLocationTypes.CreateStockLocationInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string` \\| `null`","description":"The associated address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"`string` \\| [StockLocationAddressInput](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationAddressInput/page.mdx)","description":"The associated address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"The first line of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"The second line of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"The city of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The phone of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"The province of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"The postal code of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/CommonTypes/types/types.CommonTypes.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"[MetadataType](../../types/CommonTypes/types/types.CommonTypes.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createStockLocations"/>
### Output
<TypeList types={[{"name":"StockLocationDTO[]","type":"[StockLocationDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"StockLocationDTO","type":"[StockLocationDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The associated address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)[]","description":"Fulfillment sets for the location","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zones","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","description":"The service zones associated with the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[StockLocationAddressDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationAddressDTO/page.mdx)","description":"The address of the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"The address 1 of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"The address 2 of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"The company of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\|Line truncated
___
## deleteStockLocationsStep
This step deletes one or more stock locations.
### Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteStockLocationsStep"/>
### Output
<TypeList types={[{"name":"DeleteEntityInput","type":"[DeleteEntityInput](../../modules_sdk/types/modules_sdk.DeleteEntityInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"DeleteEntityInput","type":"`object`","description":"The details of a data model's record whose linked records should be deleted. Usually used after the\ndata model's record is deleted.\n\nThe key is the data model's name. Its value is an object that has the ID of the data model's record.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteStockLocationsStep"/>
___
## updateStockLocationsStep
This step updates stock locations matching the specified filters.
### Input
<TypeList types={[{"name":"StepInput","type":"`StepInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateStockLocationsStep"/>
### Output
<TypeList types={[{"name":"StockLocationDTO[]","type":"[StockLocationDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"StockLocationDTO","type":"[StockLocationDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The associated address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)[]","description":"Fulfillment sets for the location","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zones","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","description":"The service zones associated with the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[StockLocationAddressDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationAddressDTO/page.mdx)","description":"The address of the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"The address 1 of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"The address 2 of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"The company of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\|Line truncated
@@ -0,0 +1,421 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Promotion
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"[RuleType](../../utils/PromotionUtils/enums/utils.PromotionUtils.RuleType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"RULES","type":"`\"rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"TARGET_RULES","type":"`\"target_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"BUY_RULES","type":"`\"buy_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_type","type":"[RuleType](../../utils/PromotionUtils/enums/utils.PromotionUtils.RuleType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"RULES","type":"`\"rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"TARGET_RULES","type":"`\"target_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"BUY_RULES","type":"`\"buy_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_type","type":"[RuleType](../../utils/PromotionUtils/enums/utils.PromotionUtils.RuleType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"RULES","type":"`\"rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"TARGET_RULES","type":"`\"target_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"BUY_RULES","type":"`\"buy_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_type","type":"[RuleType](../../utils/PromotionUtils/enums/utils.PromotionUtils.RuleType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"RULES","type":"`\"rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"TARGET_RULES","type":"`\"target_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"BUY_RULES","type":"`\"buy_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"campaignsData","type":"[CreateCampaignDTO](../../promotion/interfaces/promotion.CreateCampaignDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign identifier of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `Date`","description":"The start date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The end date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"`null` \\| [CreateCampaignBudgetDTO](../../promotion/interfaces/promotion.CreateCampaignBudgetDTO/page.mdx)","description":"The associated campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"[CampaignBudgetTypeValues](../../promotion/types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"How much is used of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The currency of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"campaigns","type":"[CampaignDTO](../../promotion/interfaces/promotion.CampaignDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"childrenLine truncated
___
## addOrRemoveCampaignPromotionsWorkflowId
`Const` **addOrRemoveCampaignPromotionsWorkflowId**: `"add-or-remove-campaign-promotions"`
___
## batchPromotionRulesWorkflowId
`Const` **batchPromotionRulesWorkflowId**: `"batch-promotion-rules"`
___
## createCampaignsWorkflowId
`Const` **createCampaignsWorkflowId**: `"create-campaigns"`
___
## createPromotionRulesWorkflowId
`Const` **createPromotionRulesWorkflowId**: `"create-promotion-rules-workflow"`
___
## createPromotionsWorkflowId
`Const` **createPromotionsWorkflowId**: `"create-promotions"`
___
## deleteCampaignsWorkflowId
`Const` **deleteCampaignsWorkflowId**: `"delete-campaigns"`
___
## deletePromotionRulesWorkflowId
`Const` **deletePromotionRulesWorkflowId**: `"delete-promotion-rules-workflow"`
___
## deletePromotionsWorkflowId
`Const` **deletePromotionsWorkflowId**: `"delete-promotions"`
___
## updateCampaignsWorkflowId
`Const` **updateCampaignsWorkflowId**: `"update-campaigns"`
___
## updatePromotionRulesWorkflowId
`Const` **updatePromotionRulesWorkflowId**: `"update-promotion-rules-workflow"`
___
## updatePromotionsWorkflowId
`Const` **updatePromotionsWorkflowId**: `"update-promotions"`
___
## addOrRemoveCampaignPromotionsWorkflow
This workflow adds or removes promotions from campaigns.
### Steps
<WorkflowDiagram workflow={{"name":"addOrRemoveCampaignPromotionsWorkflow","steps":[{"type":"step","name":"addCampaignPromotionsStep","description":"This step adds promotions to a campaign.","link":"../core_flows.Steps_Promotion/page.mdx#addcampaignpromotionsstep","depth":1},{"type":"step","name":"removeCampaignPromotionsStep","description":"This step removes promotions from a campaigns.","link":"../core_flows.Steps_Promotion/page.mdx#removecampaignpromotionsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"LinkWorkflowInput","type":"[LinkWorkflowInput](../../types/CommonTypes/types/types.CommonTypes.LinkWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"add","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addOrRemoveCampaignPromotionsWorkflow"/>
___
## batchPromotionRulesWorkflow
This workflow creates, updates, or deletes promotion rules.
### Steps
<WorkflowDiagram workflow={{"name":"batchPromotionRulesWorkflow","steps":[{"type":"workflow","name":"createPromotionRulesWorkflow","description":"This workflow creates one or more promotion rules.","link":"page.mdx#createpromotionrulesworkflow","depth":1},{"type":"workflow","name":"updatePromotionRulesWorkflow","description":"This workflow updates one or more promotion rules.","link":"page.mdx#updatepromotionrulesworkflow","depth":1}]}} />
### Input
<TypeList types={[{"name":"BatchWorkflowInput&#60;CreatePromotionRuleDTO, UpdatePromotionRuleDTO&#62; & object","type":"[BatchWorkflowInput](../../types/CommonTypes/types/types.CommonTypes.BatchWorkflowInput/page.mdx)&#60;[CreatePromotionRuleDTO](../../promotion/interfaces/promotion.CreatePromotionRuleDTO/page.mdx), [UpdatePromotionRuleDTO](../../promotion/interfaces/promotion.UpdatePromotionRuleDTO/page.mdx)&#62; & `object`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"BatchWorkflowInput","type":"[BatchWorkflowInput](../../types/CommonTypes/types/types.CommonTypes.BatchWorkflowInput/page.mdx)&#60;[CreatePromotionRuleDTO](../../promotion/interfaces/promotion.CreatePromotionRuleDTO/page.mdx), [UpdatePromotionRuleDTO](../../promotion/interfaces/promotion.UpdatePromotionRuleDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreatePromotionRuleDTO","type":"`object`","description":"The promotion rule to be created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"UpdatePromotionRuleDTO","type":"`object`","description":"The attributes to update in the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"[RuleType](../../utils/PromotionUtils/enums/utils.PromotionUtils.RuleType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"RULES","type":"`\"rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"TARGET_RULES","type":"`\"target_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"BUY_RULES","type":"`\"buy_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchPromotionRulesWorkflow"/>
### Output
<TypeList types={[{"name":"BatchWorkflowOutput","type":"[BatchWorkflowOutput](../../types/CommonTypes/types/types.CommonTypes.BatchWorkflowOutput/page.mdx)&#60;[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PromotionRuleDTO","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The promotion rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[PromotionRuleValueDTO](../../promotion/interfaces/promotion.PromotionRuleValueDTO/page.mdx)[]","description":"The values of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the promotion rule value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchPromotionRulesWorkflow"/>
___
## createCampaignsWorkflow
This workflow creates one or more campaigns.
### Steps
<WorkflowDiagram workflow={{"name":"createCampaignsWorkflow","steps":[{"type":"step","name":"createCampaignsStep","description":"This step cancels one or more campaigns.","link":"../core_flows.Steps_Promotion/page.mdx#createcampaignsstep","depth":1},{"type":"hook","name":"campaignsCreated","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#campaignsCreated","depth":2}]}} />
### Input
<TypeList types={[{"name":"CreateCampaignsWorkflowInput","type":"[CreateCampaignsWorkflowInput](../types/core_flows.CreateCampaignsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"campaignsData","type":"[CreateCampaignDTO](../../promotion/interfaces/promotion.CreateCampaignDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign identifier of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `Date`","description":"The start date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The end date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"`null` \\| [CreateCampaignBudgetDTO](../../promotion/interfaces/promotion.CreateCampaignBudgetDTO/page.mdx)","description":"The associated campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"[CampaignBudgetTypeValues](../../promotion/types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"How much is used of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The currency of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"additional_data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCampaignsWorkflow"/>
### Output
<TypeList types={[{"name":"CampaignDTO[]","type":"[CampaignDTO](../../promotion/interfaces/promotion.CampaignDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CampaignDTO","type":"[CampaignDTO](../../promotion/interfaces/promotion.CampaignDTO/page.mdx)","optional":false,"defaultValue":"","description":"The campaign details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign identifier of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`Date`","description":"The start date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`Date`","description":"The end date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"[CampaignBudgetDTO](../../promotion/interfaces/promotion.CampaignBudgetDTO/page.mdx)","description":"The associated campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[CampaignBudgetTypeValues](../../promotion/types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget:\n\n- `spend` indicates that the budget is limited by the amount discounted by the promotions in the associated campaign.\n- `usage` indicates that the budget is limited by the number of times the promotions of the associated campaign have been used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"The usage from the campaign budget's limit:\n\n- If the budget's type is `spend`, the value of this attribute is the amount discounted so far by the promotions in the associated campaign.\n- If the budget's type is `usage`, the value of this attribute is the number of times the promotions of the associated campaign have been used so far.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"promotions","type":"[PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)[]","description":"The associated promotions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The type of the promotion:\n\n- `standard` indicates that a promotion is a standard one applied with conditions.\n- `buyget` indicates that a promotion is a \"Buy X get Y\" promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"Whether the promotion is applied automatically.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[ApplicationMethodDTO](../../promotion/interfaces/promotion.ApplicationMethodDTO/page.mdx)","description":"The associated application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","description":"The rules of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`null` \\| `string`","description":"The associated campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[CampaignDTO](../../promotion/interfaces/promotion.CampaignDTO/page.mdx)","description":"The associated campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle=Line truncated
### Hooks
#### campaignsCreated
##### Example
```ts
import { createCampaignsWorkflow } from "@medusajs/core-flows"
createCampaignsWorkflow.hooks.campaignsCreated(
async (({ campaigns, additional_data }, { container }) => {
//TODO
})
)
```
##### Input
Handlers consuming this hook accept the following input.
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"campaigns","type":"[CampaignDTO](../../promotion/interfaces/promotion.CampaignDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign identifier of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`Date`","description":"The start date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`Date`","description":"The end date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"[CampaignBudgetDTO](../../promotion/interfaces/promotion.CampaignBudgetDTO/page.mdx)","description":"The associated campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotions","type":"[PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)[]","description":"The associated promotions.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown> | undefined`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="campaignsCreated"/>
___
## createPromotionRulesWorkflow
This workflow creates one or more promotion rules.
### Steps
<WorkflowDiagram workflow={{"name":"createPromotionRulesWorkflow","steps":[{"type":"step","name":"addRulesToPromotionsStep","description":"This step adds rules to a promotion.","link":"../core_flows.Steps_Promotion/page.mdx#addrulestopromotionsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"AddPromotionRulesWorkflowDTO","type":"`AddPromotionRulesWorkflowDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createPromotionRulesWorkflow"/>
### Output
<TypeList types={[{"name":"PromotionRuleDTO[]","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PromotionRuleDTO","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The promotion rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[PromotionRuleValueDTO](../../promotion/interfaces/promotion.PromotionRuleValueDTO/page.mdx)[]","description":"The values of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the promotion rule value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createPromotionRulesWorkflow"/>
___
## createPromotionsWorkflow
This workflow creates one or more promotions.
### Steps
<WorkflowDiagram workflow={{"name":"createPromotionsWorkflow","steps":[{"type":"step","name":"createPromotionsStep","description":"This step creates one or more promotions.","link":"../core_flows.Steps_Promotion/page.mdx#createpromotionsstep","depth":1},{"type":"hook","name":"promotionsCreated","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#promotionsCreated","depth":2}]}} />
### Input
<TypeList types={[{"name":"CreatePromotionsWorkflowInput","type":"[CreatePromotionsWorkflowInput](../types/core_flows.CreatePromotionsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"promotionsData","type":"[CreatePromotionDTO](../../promotion/interfaces/promotion.CreatePromotionDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The type of the promotion:\n\n- `standard` indicates that a promotion is a standard one applied with conditions.\n- `buyget` indicates that a promotion is a \"Buy X get Y\" promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[CreateApplicationMethodDTO](../../promotion/interfaces/promotion.CreateApplicationMethodDTO/page.mdx)","description":"The associated application method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"[ApplicationMethodTypeValues](../../promotion/types/promotion.ApplicationMethodTypeValues/page.mdx)","description":"The type of the application method indicating how\nthe associated promotion is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"target_type","type":"[ApplicationMethodTargetTypeValues](../../promotion/types/promotion.ApplicationMethodTargetTypeValues/page.mdx)","description":"The target type of the application method indicating\nwhether the associated promotion is applied to the cart's items,\nshipping methods, or the whole order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allocation","type":"[ApplicationMethodAllocationValues](../../promotion/types/promotion.ApplicationMethodAllocationValues/page.mdx)","description":"The allocation value that indicates whether the associated promotion\nis applied on each item in a cart or split between the items in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`number`","description":"The discounted amount applied by the associated promotion based on the `type`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"Currency of the value to apply.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The max quantity allowed in the cart for the associated promotion to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules_min_quantity","type":"`null` \\| `number`","description":"The minimum quantity required for a `buyget` promotion to be applied.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the\nvalue of this attribute is `2`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"apply_to_quantity","type":"`null` \\| `number`","description":"The quantity that results from matching the `buyget` promotion's condition.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the value\nof this attribute is `1`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion","type":"`string` \\| [PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)","description":"The promotion of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_rules","type":"[CreatePromotionRuleDTO](../../promotion/interfaces/promotion.CreatePromotionRuleDTO/page.mdx)[]","description":"The target rules of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules","type":"[CreatePromotionRuleDTO](../../promotion/interfaces/promotion.CreatePromotionRuleDTO/page.mdx)[]","description":"The buy rules of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_automatic","type":"`boolean`","description":"Whether the promotion is applied automatically.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePromotionRuleDTO](../../promotion/interfaces/promotion.CreatePromotionRuleDTO/page.mdx)[]","description":"The rules of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":fLine truncated
### Output
<TypeList types={[{"name":"PromotionDTO[]","type":"[PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PromotionDTO","type":"[PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The promotion details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The type of the promotion:\n\n- `standard` indicates that a promotion is a standard one applied with conditions.\n- `buyget` indicates that a promotion is a \"Buy X get Y\" promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"Whether the promotion is applied automatically.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[ApplicationMethodDTO](../../promotion/interfaces/promotion.ApplicationMethodDTO/page.mdx)","description":"The associated application method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the application method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ApplicationMethodTypeValues](../../promotion/types/promotion.ApplicationMethodTypeValues/page.mdx)","description":"The type of the application method indicating how\nthe associated promotion is applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_type","type":"[ApplicationMethodTargetTypeValues](../../promotion/types/promotion.ApplicationMethodTargetTypeValues/page.mdx)","description":"The target type of the application method indicating\nwhether the associated promotion is applied to the cart's items,\nshipping methods, or the whole order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allocation","type":"[ApplicationMethodAllocationValues](../../promotion/types/promotion.ApplicationMethodAllocationValues/page.mdx)","description":"The allocation value that indicates whether the associated promotion\nis applied on each item in a cart or split between the items in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`number`","description":"The discounted amount applied by the associated promotion based on the `type`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the application method","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The max quantity allowed in the cart for the associated promotion to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules_min_quantity","type":"`null` \\| `number`","description":"The minimum quantity required for a `buyget` promotion to be applied.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the\nvalue of this attribute is `2`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"apply_to_quantity","type":"`null` \\| `number`","description":"The quantity that results from matching the `buyget` promotion's condition.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the value\nof this attribute is `1`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion","type":"`string` \\| [PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)","description":"The promotion of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_rules","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","description":"The target rules of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","description":"The buy rules of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","description":"The rules of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":fLine truncated
### Hooks
#### promotionsCreated
##### Example
```ts
import { createPromotionsWorkflow } from "@medusajs/core-flows"
createPromotionsWorkflow.hooks.promotionsCreated(
async (({ promotions, additional_data }, { container }) => {
//TODO
})
)
```
##### Input
Handlers consuming this hook accept the following input.
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"promotions","type":"[PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The type of the promotion:\n\n- `standard` indicates that a promotion is a standard one applied with conditions.\n- `buyget` indicates that a promotion is a \"Buy X get Y\" promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"Whether the promotion is applied automatically.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[ApplicationMethodDTO](../../promotion/interfaces/promotion.ApplicationMethodDTO/page.mdx)","description":"The associated application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","description":"The rules of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`null` \\| `string`","description":"The associated campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[CampaignDTO](../../promotion/interfaces/promotion.CampaignDTO/page.mdx)","description":"The associated campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown> | undefined`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="promotionsCreated"/>
___
## deleteCampaignsWorkflow
This workflow deletes one or more campaigns.
### Steps
<WorkflowDiagram workflow={{"name":"deleteCampaignsWorkflow","steps":[{"type":"step","name":"deleteCampaignsStep","description":"This step deletes one or more campaigns.","link":"../core_flows.Steps_Promotion/page.mdx#deletecampaignsstep","depth":1},{"type":"hook","name":"campaignsDeleted","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#campaignsDeleted","depth":2}]}} />
### Input
<TypeList types={[{"name":"DeleteCampaignsWorkflowInput","type":"[DeleteCampaignsWorkflowInput](../types/core_flows.DeleteCampaignsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteCampaignsWorkflow"/>
### Hooks
#### campaignsDeleted
##### Example
```ts
import { deleteCampaignsWorkflow } from "@medusajs/core-flows"
deleteCampaignsWorkflow.hooks.campaignsDeleted(
async (({ ids }, { container }) => {
//TODO
})
)
```
##### Input
Handlers consuming this hook accept the following input.
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="campaignsDeleted"/>
___
## deletePromotionRulesWorkflow
This workflow deletes one or more promotion rules.
### Steps
<WorkflowDiagram workflow={{"name":"deletePromotionRulesWorkflow","steps":[{"type":"step","name":"removeRulesFromPromotionsStep","description":"This step removes rules from a promotion.","link":"../core_flows.Steps_Promotion/page.mdx#removerulesfrompromotionsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"RemovePromotionRulesWorkflowDTO","type":"`RemovePromotionRulesWorkflowDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePromotionRulesWorkflow"/>
___
## deletePromotionsWorkflow
This workflow deletes one or more promotions.
### Steps
<WorkflowDiagram workflow={{"name":"deletePromotionsWorkflow","steps":[{"type":"step","name":"deletePromotionsStep","description":"This step deletes one or more promotions.","link":"../core_flows.Steps_Promotion/page.mdx#deletepromotionsstep","depth":1},{"type":"hook","name":"promotionsDeleted","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#promotionsDeleted","depth":2}]}} />
### Input
<TypeList types={[{"name":"DeletePromotionsWorkflowInput","type":"[DeletePromotionsWorkflowInput](../types/core_flows.DeletePromotionsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePromotionsWorkflow"/>
### Hooks
#### promotionsDeleted
##### Example
```ts
import { deletePromotionsWorkflow } from "@medusajs/core-flows"
deletePromotionsWorkflow.hooks.promotionsDeleted(
async (({ ids }, { container }) => {
//TODO
})
)
```
##### Input
Handlers consuming this hook accept the following input.
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="promotionsDeleted"/>
___
## updateCampaignsWorkflow
This workflow updates one or more campaigns.
### Steps
<WorkflowDiagram workflow={{"name":"updateCampaignsWorkflow","steps":[{"type":"step","name":"updateCampaignsStep","description":"This step updates one or more campaigns.","link":"../core_flows.Steps_Promotion/page.mdx#updatecampaignsstep","depth":1},{"type":"hook","name":"campaignsUpdated","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#campaignsUpdated","depth":2}]}} />
### Input
<TypeList types={[{"name":"UpdateCampaignsWorkflowInput","type":"[UpdateCampaignsWorkflowInput](../types/core_flows.UpdateCampaignsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"campaignsData","type":"[UpdateCampaignDTO](../../promotion/interfaces/promotion.UpdateCampaignDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign identifier of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `Date`","description":"The start date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The end date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"Omit&#60;[UpdateCampaignBudgetDTO](../../promotion/interfaces/promotion.UpdateCampaignBudgetDTO/page.mdx), \"id\"&#62;","description":"The budget of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"[CampaignBudgetTypeValues](../../promotion/types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The limit of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"How much is used of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"additional_data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateCampaignsWorkflow"/>
### Output
<TypeList types={[{"name":"CampaignDTO[]","type":"[CampaignDTO](../../promotion/interfaces/promotion.CampaignDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CampaignDTO","type":"[CampaignDTO](../../promotion/interfaces/promotion.CampaignDTO/page.mdx)","optional":false,"defaultValue":"","description":"The campaign details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign identifier of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`Date`","description":"The start date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`Date`","description":"The end date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"[CampaignBudgetDTO](../../promotion/interfaces/promotion.CampaignBudgetDTO/page.mdx)","description":"The associated campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[CampaignBudgetTypeValues](../../promotion/types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget:\n\n- `spend` indicates that the budget is limited by the amount discounted by the promotions in the associated campaign.\n- `usage` indicates that the budget is limited by the number of times the promotions of the associated campaign have been used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"The usage from the campaign budget's limit:\n\n- If the budget's type is `spend`, the value of this attribute is the amount discounted so far by the promotions in the associated campaign.\n- If the budget's type is `usage`, the value of this attribute is the number of times the promotions of the associated campaign have been used so far.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"promotions","type":"[PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)[]","description":"The associated promotions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The type of the promotion:\n\n- `standard` indicates that a promotion is a standard one applied with conditions.\n- `buyget` indicates that a promotion is a \"Buy X get Y\" promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"Whether the promotion is applied automatically.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[ApplicationMethodDTO](../../promotion/interfaces/promotion.ApplicationMethodDTO/page.mdx)","description":"The associated application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","description":"The rules of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`null` \\| `string`","description":"The associated campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[CampaignDTO](../../promotion/interfaces/promotion.CampaignDTO/page.mdx)","description":"The associated campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle=Line truncated
### Hooks
#### campaignsUpdated
##### Example
```ts
import { updateCampaignsWorkflow } from "@medusajs/core-flows"
updateCampaignsWorkflow.hooks.campaignsUpdated(
async (({ campaigns, additional_data }, { container }) => {
//TODO
})
)
```
##### Input
Handlers consuming this hook accept the following input.
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"campaigns","type":"[CampaignDTO](../../promotion/interfaces/promotion.CampaignDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign identifier of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`Date`","description":"The start date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`Date`","description":"The end date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"[CampaignBudgetDTO](../../promotion/interfaces/promotion.CampaignBudgetDTO/page.mdx)","description":"The associated campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotions","type":"[PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)[]","description":"The associated promotions.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown> | undefined`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="campaignsUpdated"/>
___
## updatePromotionRulesWorkflow
This workflow updates one or more promotion rules.
### Steps
<WorkflowDiagram workflow={{"name":"updatePromotionRulesWorkflow","steps":[{"type":"step","name":"updatePromotionRulesStep","description":"This step updates one or more promotion rules.","link":"../core_flows.Steps_Promotion/page.mdx#updatepromotionrulesstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"UpdatePromotionRulesWorkflowDTO","type":"`UpdatePromotionRulesWorkflowDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePromotionRulesWorkflow"/>
### Output
<TypeList types={[{"name":"PromotionRuleDTO[]","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PromotionRuleDTO","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The promotion rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[PromotionRuleValueDTO](../../promotion/interfaces/promotion.PromotionRuleValueDTO/page.mdx)[]","description":"The values of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the promotion rule value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePromotionRulesWorkflow"/>
___
## updatePromotionsWorkflow
This workflow updates one or more promotions.
### Steps
<WorkflowDiagram workflow={{"name":"updatePromotionsWorkflow","steps":[{"type":"step","name":"updatePromotionsStep","description":"This step updates one or more promotions.","link":"../core_flows.Steps_Promotion/page.mdx#updatepromotionsstep","depth":1},{"type":"hook","name":"promotionsUpdated","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#promotionsUpdated","depth":2}]}} />
### Input
<TypeList types={[{"name":"UpdatePromotionsWorkflowInput","type":"[UpdatePromotionsWorkflowInput](../types/core_flows.UpdatePromotionsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"promotionsData","type":"[UpdatePromotionDTO](../../promotion/interfaces/promotion.UpdatePromotionDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"Whether the promotion is applied automatically.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The type of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[UpdateApplicationMethodDTO](../../promotion/interfaces/promotion.UpdateApplicationMethodDTO/page.mdx)","description":"The associated application method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ApplicationMethodTypeValues](../../promotion/types/promotion.ApplicationMethodTypeValues/page.mdx)","description":"The type of the application method indicating how\nthe associated promotion is applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_type","type":"[ApplicationMethodTargetTypeValues](../../promotion/types/promotion.ApplicationMethodTargetTypeValues/page.mdx)","description":"The target type of the application method indicating\nwhether the associated promotion is applied to the cart's items,\nshipping methods, or the whole order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allocation","type":"[ApplicationMethodAllocationValues](../../promotion/types/promotion.ApplicationMethodAllocationValues/page.mdx)","description":"The allocation value that indicates whether the associated promotion\nis applied on each item in a cart or split between the items in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`number`","description":"The discounted amount applied by the associated promotion based on the `type`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the promotions application","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The max quantity allowed in the cart for the associated promotion to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules_min_quantity","type":"`null` \\| `number`","description":"The minimum quantity required for a `buyget` promotion to be applied.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the\nvalue of this attribute is `2`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"apply_to_quantity","type":"`null` \\| `number`","description":"The quantity that results from matching the `buyget` promotion's condition.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the value\nof this attribute is `1`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion","type":"`string` \\| [PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)","description":"The promotion of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"campaign_id","type":"`null` \\| `string`","description":"The associated campaign's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePromotionsWorkflow"/>
### Output
<TypeList types={[{"name":"PromotionDTO[]","type":"[PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PromotionDTO","type":"[PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The promotion details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The type of the promotion:\n\n- `standard` indicates that a promotion is a standard one applied with conditions.\n- `buyget` indicates that a promotion is a \"Buy X get Y\" promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"Whether the promotion is applied automatically.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[ApplicationMethodDTO](../../promotion/interfaces/promotion.ApplicationMethodDTO/page.mdx)","description":"The associated application method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the application method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ApplicationMethodTypeValues](../../promotion/types/promotion.ApplicationMethodTypeValues/page.mdx)","description":"The type of the application method indicating how\nthe associated promotion is applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_type","type":"[ApplicationMethodTargetTypeValues](../../promotion/types/promotion.ApplicationMethodTargetTypeValues/page.mdx)","description":"The target type of the application method indicating\nwhether the associated promotion is applied to the cart's items,\nshipping methods, or the whole order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allocation","type":"[ApplicationMethodAllocationValues](../../promotion/types/promotion.ApplicationMethodAllocationValues/page.mdx)","description":"The allocation value that indicates whether the associated promotion\nis applied on each item in a cart or split between the items in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`number`","description":"The discounted amount applied by the associated promotion based on the `type`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the application method","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The max quantity allowed in the cart for the associated promotion to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules_min_quantity","type":"`null` \\| `number`","description":"The minimum quantity required for a `buyget` promotion to be applied.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the\nvalue of this attribute is `2`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"apply_to_quantity","type":"`null` \\| `number`","description":"The quantity that results from matching the `buyget` promotion's condition.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the value\nof this attribute is `1`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion","type":"`string` \\| [PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)","description":"The promotion of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_rules","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","description":"The target rules of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","description":"The buy rules of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","description":"The rules of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":fLine truncated
### Hooks
#### promotionsUpdated
##### Example
```ts
import { updatePromotionsWorkflow } from "@medusajs/core-flows"
updatePromotionsWorkflow.hooks.promotionsUpdated(
async (({ promotions, additional_data }, { container }) => {
//TODO
})
)
```
##### Input
Handlers consuming this hook accept the following input.
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"promotions","type":"[PromotionDTO](../../promotion/interfaces/promotion.PromotionDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The type of the promotion:\n\n- `standard` indicates that a promotion is a standard one applied with conditions.\n- `buyget` indicates that a promotion is a \"Buy X get Y\" promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"Whether the promotion is applied automatically.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[ApplicationMethodDTO](../../promotion/interfaces/promotion.ApplicationMethodDTO/page.mdx)","description":"The associated application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[PromotionRuleDTO](../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","description":"The rules of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`null` \\| `string`","description":"The associated campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[CampaignDTO](../../promotion/interfaces/promotion.CampaignDTO/page.mdx)","description":"The associated campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown> | undefined`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="promotionsUpdated"/>
___
## \_\_type
**\_\_type**:
___
## \_\_type
**\_\_type**:
___
## \_\_type
**\_\_type**:
___
## \_\_type
**\_\_type**:
___
## \_\_type
**\_\_type**:
___
## \_\_type
**\_\_type**:
@@ -0,0 +1,73 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Region
<TypeList types={[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Workflows_Region"/>
___
## createRegionsWorkflowId
`Const` **createRegionsWorkflowId**: `"create-regions"`
___
## deleteRegionsWorkflowId
`Const` **deleteRegionsWorkflowId**: `"delete-regions"`
___
## updateRegionsWorkflowId
`Const` **updateRegionsWorkflowId**: `"update-regions"`
___
## createRegionsWorkflow
This workflow creates one or more regions.
### Steps
<WorkflowDiagram workflow={{"name":"createRegionsWorkflow","steps":[{"type":"step","name":"createRegionsStep","description":"This step creates one or more regions.","link":"../core_flows.Steps_Region/page.mdx#createregionsstep","depth":1},{"type":"workflow","name":"createPricePreferencesWorkflow","description":"This workflow creates one or more price preferences.","link":"../core_flows.Workflows_Pricing/page.mdx#createpricepreferencesworkflow","depth":2}]}} />
### Input
<TypeList types={[{"name":"CreateRegionsWorkflowInput","type":"`CreateRegionsWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRegionsWorkflow"/>
### Output
<TypeList types={[{"name":"CreateRegionsWorkflowOutput","type":"`CreateRegionsWorkflowOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRegionsWorkflow"/>
___
## deleteRegionsWorkflow
This workflow deletes one or more regions.
### Steps
<WorkflowDiagram workflow={{"name":"deleteRegionsWorkflow","steps":[{"type":"step","name":"deleteRegionsStep","description":"This step deletes one or more regions.","link":"../core_flows.Steps_Region/page.mdx#deleteregionsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"DeleteRegionsWorkflowInput","type":"[DeleteRegionsWorkflowInput](../types/core_flows.DeleteRegionsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteRegionsWorkflow"/>
___
## updateRegionsWorkflow
This workflow updates regions matching the specified filters.
### Steps
<WorkflowDiagram workflow={{"name":"updateRegionsWorkflow","steps":[{"type":"step","name":"updateRegionsStep","description":"This step updates regions matching the specified filters.","link":"../core_flows.Steps_Region/page.mdx#updateregionsstep","depth":1},{"type":"when","condition":"{\n return data.normalizedInput.is_tax_inclusive !== undefined\n }","depth":"2","steps":[{"type":"workflow","name":"updatePricePreferencesWorkflow","description":"This workflow updates one or more price preferences.","link":"../core_flows.Workflows_Pricing/page.mdx#updatepricepreferencesworkflow","depth":2}]}]}} />
### Input
<TypeList types={[{"name":"UpdateRegionsWorkflowInput","type":"`UpdateRegionsWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRegionsWorkflow"/>
### Output
<TypeList types={[{"name":"UpdateRegionsWorkflowOutput","type":"`UpdateRegionsWorkflowOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRegionsWorkflow"/>
@@ -0,0 +1,93 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Reservation
<TypeList types={[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Workflows_Reservation"/>
___
## createReservationsWorkflowId
`Const` **createReservationsWorkflowId**: `"create-reservations-workflow"`
___
## deleteReservationsByLineItemsWorkflowId
`Const` **deleteReservationsByLineItemsWorkflowId**: `"delete-reservations-by-line-items"`
___
## deleteReservationsWorkflowId
`Const` **deleteReservationsWorkflowId**: `"delete-reservations"`
___
## updateReservationsWorkflowId
`Const` **updateReservationsWorkflowId**: `"update-reservations-workflow"`
___
## createReservationsWorkflow
This workflow creates one or more reservations.
### Steps
<WorkflowDiagram workflow={{"name":"createReservationsWorkflow","steps":[{"type":"step","name":"createReservationsStep","description":"This step creates one or more reservations.","link":"../core_flows.Steps_Reservation/page.mdx#createreservationsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"CreateReservationsWorkflowInput","type":"[CreateReservationsWorkflowInput](../../types/WorkflowTypes/ReservationWorkflow/interfaces/types.WorkflowTypes.ReservationWorkflow.CreateReservationsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"reservations","type":"[CreateReservationItemInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateReservationItemInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The user or system that created the reservation. Can be any form of identification string.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"An ID associated with an external third-party system that the reservation item is connected to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReservationsWorkflow"/>
### Output
<TypeList types={[{"name":"CreateReservationsWorkflowOutput","type":"[CreateReservationsWorkflowOutput](../../types/WorkflowTypes/ReservationWorkflow/types/types.WorkflowTypes.ReservationWorkflow.CreateReservationsWorkflowOutput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReservationsWorkflow"/>
___
## deleteReservationsByLineItemsWorkflow
This workflow deletes reservations by their associated line items.
### Steps
<WorkflowDiagram workflow={{"name":"deleteReservationsByLineItemsWorkflow","steps":[{"type":"step","name":"deleteReservationsByLineItemsStep","description":"This step deletes reservations by their associated line items.","link":"../core_flows.Steps_Reservation/page.mdx#deletereservationsbylineitemsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"DeleteReservationByLineItemsWorkflowInput","type":"[DeleteReservationByLineItemsWorkflowInput](../types/core_flows.DeleteReservationByLineItemsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteReservationsByLineItemsWorkflow"/>
___
## deleteReservationsWorkflow
This workflow deletes one or more reservations.
### Steps
<WorkflowDiagram workflow={{"name":"deleteReservationsWorkflow","steps":[{"type":"step","name":"deleteReservationsStep","description":"This step deletes one or more reservations.","link":"../core_flows.Steps_Reservation/page.mdx#deletereservationsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"WorkflowInput","type":"`WorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteReservationsWorkflow"/>
___
## updateReservationsWorkflow
This workflow updates one or more reservations.
### Steps
<WorkflowDiagram workflow={{"name":"updateReservationsWorkflow","steps":[{"type":"step","name":"updateReservationsStep","description":"This step updates one or more reservations.","link":"../core_flows.Steps_Reservation/page.mdx#updatereservationsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"UpdateReservationsWorkflowInput","type":"[UpdateReservationsWorkflowInput](../../types/WorkflowTypes/ReservationWorkflow/interfaces/types.WorkflowTypes.ReservationWorkflow.UpdateReservationsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"updates","type":"[UpdateReservationItemInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.UpdateReservationItemInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReservationsWorkflow"/>
### Output
<TypeList types={[{"name":"UpdateReservationsWorkflowOutput","type":"[UpdateReservationsWorkflowOutput](../../types/WorkflowTypes/ReservationWorkflow/types/types.WorkflowTypes.ReservationWorkflow.UpdateReservationsWorkflowOutput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReservationsWorkflow"/>
@@ -0,0 +1,73 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Return Reason
<TypeList types={[{"name":"data","type":"[CreateOrderReturnReasonDTO](../../order/interfaces/order.CreateOrderReturnReasonDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The unique value of the return reason.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the return reason.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason_id","type":"`string`","description":"The associated parent return reason's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"selector","type":"[FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx) \\| [BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;[FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx) \\| [BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;[FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx) \\| [BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;[FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Find return reasons through this search term","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../order/types/order.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the return reasons by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `string`[] \\| [OperatorMap](../../order/types/order.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter the return reason by their value.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string` \\| [OperatorMap](../../order/types/order.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter the return reason by their label.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../order/types/order.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter the return reason by their description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx) \\| [BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;[FilterableOrderReturnReasonProps](.Line truncated
___
## createReturnReasonsWorkflowId
`Const` **createReturnReasonsWorkflowId**: `"create-return-reasons"`
___
## deleteReturnReasonsWorkflowId
`Const` **deleteReturnReasonsWorkflowId**: `"delete-return-reasons"`
___
## updateReturnReasonsWorkflowId
`Const` **updateReturnReasonsWorkflowId**: `"update-return-reasons"`
___
## createReturnReasonsWorkflow
This workflow creates one or more return reasons.
### Steps
<WorkflowDiagram workflow={{"name":"createReturnReasonsWorkflow","steps":[{"type":"step","name":"createReturnReasonsStep","description":"This step creates one or more return reasons.","link":"../core_flows.Steps_Return_Reason/page.mdx#createreturnreasonsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"CreateReturnReasonsWorkflowInput","type":"[CreateReturnReasonsWorkflowInput](../types/core_flows.CreateReturnReasonsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"data","type":"[CreateOrderReturnReasonDTO](../../order/interfaces/order.CreateOrderReturnReasonDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The unique value of the return reason.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the return reason.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason_id","type":"`string`","description":"The associated parent return reason's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReturnReasonsWorkflow"/>
### Output
<TypeList types={[{"name":"OrderReturnReasonDTO[]","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"OrderReturnReasonDTO","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"The order return reason details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The unique value of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the return reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the return reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the return reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason_id","type":"`string`","description":"The parent return reason ID","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)","description":"The associated order return reason.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The unique value of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the return reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the return reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the return reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason_id","type":"`string`","description":"The parent return reason ID","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)","description":"The associated order return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"return_reason_children","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)[]","description":"The return reason children of the order return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"return_reason_children","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)[]","description":"The return reason children of the order return reason.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The unique value of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the return reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the return reason was updated","optional":faLine truncated
___
## deleteReturnReasonsWorkflow
This workflow deletes one or more return reasons.
### Steps
<WorkflowDiagram workflow={{"name":"deleteReturnReasonsWorkflow","steps":[{"type":"step","name":"deleteReturnReasonStep","description":"This step deletes one or more return reasons.","link":"../core_flows.Steps_Return_Reason/page.mdx#deletereturnreasonstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"DeleteReturnReasonsWorkflowInput","type":"[DeleteReturnReasonsWorkflowInput](../types/core_flows.DeleteReturnReasonsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteReturnReasonsWorkflow"/>
___
## updateReturnReasonsWorkflow
This workflow updates return reasons matching the specified filters.
### Steps
<WorkflowDiagram workflow={{"name":"updateReturnReasonsWorkflow","steps":[{"type":"step","name":"updateReturnReasonsStep","description":"This step updates return reasons matching the specified filters.","link":"../core_flows.Steps_Return_Reason/page.mdx#updatereturnreasonsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"UpdateReturnReasonsWorkflowInput","type":"[UpdateReturnReasonsWorkflowInput](../types/core_flows.UpdateReturnReasonsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx) \\| [BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;[FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx) \\| [BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;[FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx) \\| [BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;[FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Find return reasons through this search term","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../order/types/order.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the return reasons by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `string`[] \\| [OperatorMap](../../order/types/order.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter the return reason by their value.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string` \\| [OperatorMap](../../order/types/order.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter the return reason by their label.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../order/types/order.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter the return reason by their description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx) \\| [BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;[FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx) \\| [BaseFilterable](../../order/interfaces/order.BaseFilterable/page.mdx)&#60;[FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableOrderReturnReasonProps](../../order/interfaces/order.FilterableOrderReturnReasonProps/page.mdx) \\| [BaseLine truncated
### Output
<TypeList types={[{"name":"OrderReturnReasonDTO[]","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"OrderReturnReasonDTO","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"The order return reason details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The unique value of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the return reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the return reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the return reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason_id","type":"`string`","description":"The parent return reason ID","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)","description":"The associated order return reason.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The unique value of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the return reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the return reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the return reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason_id","type":"`string`","description":"The parent return reason ID","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)","description":"The associated order return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"return_reason_children","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)[]","description":"The return reason children of the order return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"return_reason_children","type":"[OrderReturnReasonDTO](../../order/interfaces/order.OrderReturnReasonDTO/page.mdx)[]","description":"The return reason children of the order return reason.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The unique value of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the return reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the return reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the return reason was updated","optional":faLine truncated
@@ -0,0 +1,93 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Sales Channel
<TypeList types={[{"name":"salesChannelsData","type":"[CreateSalesChannelDTO](../../sales_channel/interfaces/sales_channel.CreateSalesChannelDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"selector","type":"[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx) \\| [BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx) \\| [BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx) \\| [BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Find sales channels by their name or description through this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the sales channel by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter sales channels by their names.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Filter sales channels by whether they're disabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx) \\| [BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx) \\| [BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)&#62;)[]","description":"An array of filterLine truncated
___
## createSalesChannelsWorkflowId
`Const` **createSalesChannelsWorkflowId**: `"create-sales-channels"`
___
## deleteSalesChannelsWorkflowId
`Const` **deleteSalesChannelsWorkflowId**: `"delete-sales-channels"`
___
## linkProductsToSalesChannelWorkflowId
`Const` **linkProductsToSalesChannelWorkflowId**: `"link-products-to-sales-channel"`
___
## updateSalesChannelsWorkflowId
`Const` **updateSalesChannelsWorkflowId**: `"update-sales-channels"`
___
## createSalesChannelsWorkflow
This workflow creates one or more sales channels.
### Steps
<WorkflowDiagram workflow={{"name":"createSalesChannelsWorkflow","steps":[{"type":"step","name":"createSalesChannelsStep","description":"This step creates one or more sales channels.","link":"../core_flows.Steps_Sales_Channel/page.mdx#createsaleschannelsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"CreateSalesChannelsWorkflowInput","type":"[CreateSalesChannelsWorkflowInput](../types/core_flows.CreateSalesChannelsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"salesChannelsData","type":"[CreateSalesChannelDTO](../../sales_channel/interfaces/sales_channel.CreateSalesChannelDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createSalesChannelsWorkflow"/>
### Output
<TypeList types={[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"SalesChannelDTO","type":"[SalesChannelDTO](../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)","optional":false,"defaultValue":"","description":"The sales channel details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../sales_channel/interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createSalesChannelsWorkflow"/>
___
## deleteSalesChannelsWorkflow
This workflow deletes one or more sales channels.
### Steps
<WorkflowDiagram workflow={{"name":"deleteSalesChannelsWorkflow","steps":[{"type":"step","name":"deleteSalesChannelsStep","description":"This step deletes one or more sales channels.","link":"../core_flows.Steps_Sales_Channel/page.mdx#deletesaleschannelsstep","depth":1},{"type":"step","name":"removeRemoteLinkStep","description":"This step deletes linked records of a record.\n\nLearn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#cascade-delete-linked-records)\n\n","link":"../core_flows.Steps_Common/page.mdx#removeremotelinkstep","depth":2}]}} />
### Input
<TypeList types={[{"name":"DeleteSalesChannelsWorkflowInput","type":"[DeleteSalesChannelsWorkflowInput](../types/core_flows.DeleteSalesChannelsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteSalesChannelsWorkflow"/>
___
## linkProductsToSalesChannelWorkflow
This workflow creates or dismisses links between product and sales channel records.
### Steps
<WorkflowDiagram workflow={{"name":"linkProductsToSalesChannelWorkflow","steps":[{"type":"step","name":"associateProductsWithSalesChannelsStep","description":"This step creates links between products and sales channel records.","link":"../core_flows.Steps_Sales_Channel/page.mdx#associateproductswithsaleschannelsstep","depth":1},{"type":"step","name":"detachProductsFromSalesChannelsStep","description":"This step dismisses links between product and sales channel records.","link":"../core_flows.Steps_Sales_Channel/page.mdx#detachproductsfromsaleschannelsstep","depth":2}]}} />
### Input
<TypeList types={[{"name":"LinkWorkflowInput","type":"[LinkWorkflowInput](../../types/CommonTypes/types/types.CommonTypes.LinkWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"add","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="linkProductsToSalesChannelWorkflow"/>
___
## updateSalesChannelsWorkflow
This workflow updates sales channels matching the specified conditions.
### Steps
<WorkflowDiagram workflow={{"name":"updateSalesChannelsWorkflow","steps":[{"type":"step","name":"updateSalesChannelsStep","description":"This step updates sales channels matching the specified filters.","link":"../core_flows.Steps_Sales_Channel/page.mdx#updatesaleschannelsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"UpdateSalesChannelsWorkflowInput","type":"[UpdateSalesChannelsWorkflowInput](../types/core_flows.UpdateSalesChannelsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx) \\| [BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx) \\| [BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx) \\| [BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Find sales channels by their name or description through this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the sales channel by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter sales channels by their names.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Filter sales channels by whether they're disabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx) \\| [BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx) \\| [BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx) \\| [BaseFilterable](../../sales_channel/interfaces/sales_channel.BaseFilterable/page.mdx)&#60;[FilterableSalesChannelProps](../../sales_channel/interfaces/sales_channel.FilterableSalesChannelProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the arLine truncated
### Output
<TypeList types={[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"SalesChannelDTO","type":"[SalesChannelDTO](../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)","optional":false,"defaultValue":"","description":"The sales channel details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../sales_channel/interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateSalesChannelsWorkflow"/>
@@ -0,0 +1,25 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Shipping Profile
<TypeList types={[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Workflows_Shipping Profile"/>
___
## deleteShippingProfileWorkflowId
`Const` **deleteShippingProfileWorkflowId**: `"delete-shipping-profile-workflow"`
___
## deleteShippingProfileWorkflow
This workflow deletes one or more shipping profiles.
### Steps
<WorkflowDiagram workflow={{"name":"deleteShippingProfileWorkflow","steps":[{"type":"step","name":"deleteShippingProfilesStep","description":"This step deletes one or more shipping profiles.","link":"../core_flows.Steps_Shipping_Profile/page.mdx#deleteshippingprofilesstep","depth":1},{"type":"step","name":"removeRemoteLinkStep","description":"This step deletes linked records of a record.\n\nLearn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#cascade-delete-linked-records)\n\n","link":"../core_flows.Steps_Common/page.mdx#removeremotelinkstep","depth":2}]}} />
### Input
<TypeList types={[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteShippingProfileWorkflow"/>
@@ -0,0 +1,113 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Stock Location
<TypeList types={[{"name":"locations","type":"[CreateStockLocationInput](../../types/StockLocationTypes/types/types.StockLocationTypes.CreateStockLocationInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string` \\| `null`","description":"The associated address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"`string` \\| [StockLocationAddressInput](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationAddressInput/page.mdx)","description":"The associated address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"The first line of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"The second line of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"The city of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The phone of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"The province of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"The postal code of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/CommonTypes/types/types.CommonTypes.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"[MetadataType](../../types/CommonTypes/types/types.CommonTypes.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"selector","type":"[FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx) \\| [BaseFilterable](../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx) \\| [BaseFilterable](../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx) \\| [BaseFilterable](../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search parameter for stock location names","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nameLine truncated
___
## createLocationFulfillmentSetWorkflowId
`Const` **createLocationFulfillmentSetWorkflowId**: `"create-location-fulfillment-set"`
___
## createStockLocationsWorkflowId
`Const` **createStockLocationsWorkflowId**: `"create-stock-locations-workflow"`
___
## deleteStockLocationsWorkflowId
`Const` **deleteStockLocationsWorkflowId**: `"delete-stock-locations-workflow"`
___
## linkSalesChannelsToStockLocationWorkflowId
`Const` **linkSalesChannelsToStockLocationWorkflowId**: `"link-sales-channels-to-stock-location"`
___
## updateStockLocationsWorkflowId
`Const` **updateStockLocationsWorkflowId**: `"update-stock-locations-workflow"`
___
## createLocationFulfillmentSetWorkflow
This workflow creates links between location and fulfillment set records.
### Steps
<WorkflowDiagram workflow={{"name":"createLocationFulfillmentSetWorkflow","steps":[{"type":"step","name":"createFulfillmentSets","description":"This step creates one or more fulfillment sets.","link":"../core_flows.Steps_Fulfillment/page.mdx#createfulfillmentsets","depth":1}]}} />
### Input
<TypeList types={[{"name":"CreateLocationFulfillmentSetWorkflowInputDTO","type":"[CreateLocationFulfillmentSetWorkflowInputDTO](../../types/interfaces/types.CreateLocationFulfillmentSetWorkflowInputDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_data","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLocationFulfillmentSetWorkflow"/>
___
## createStockLocationsWorkflow
This workflow creates one or more stock locations.
### Steps
<WorkflowDiagram workflow={{"name":"createStockLocationsWorkflow","steps":[{"type":"step","name":"createStockLocations","description":"This step creates one or more stock locations.","link":"../core_flows.Steps_Stock_Location/page.mdx#createstocklocations","depth":1}]}} />
### Input
<TypeList types={[{"name":"CreateStockLocationsWorkflowInput","type":"[CreateStockLocationsWorkflowInput](../interfaces/core_flows.CreateStockLocationsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"locations","type":"[CreateStockLocationInput](../../types/StockLocationTypes/types/types.StockLocationTypes.CreateStockLocationInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string` \\| `null`","description":"The associated address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"`string` \\| [StockLocationAddressInput](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationAddressInput/page.mdx)","description":"The associated address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"The first line of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"The second line of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"The city of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The phone of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"The province of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"The postal code of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/CommonTypes/types/types.CommonTypes.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"[MetadataType](../../types/CommonTypes/types/types.CommonTypes.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createStockLocationsWorkflow"/>
### Output
<TypeList types={[{"name":"StockLocationDTO[]","type":"[StockLocationDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"StockLocationDTO","type":"[StockLocationDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The associated address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)[]","description":"Fulfillment sets for the location","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zones","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","description":"The service zones associated with the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[StockLocationAddressDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationAddressDTO/page.mdx)","description":"The address of the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"The address 1 of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"The address 2 of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"The company of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\|Line truncated
___
## deleteStockLocationsWorkflow
This workflow deletes one or more stock locations.
### Steps
<WorkflowDiagram workflow={{"name":"deleteStockLocationsWorkflow","steps":[{"type":"step","name":"deleteStockLocationsStep","description":"This step deletes one or more stock locations.","link":"../core_flows.Steps_Stock_Location/page.mdx#deletestocklocationsstep","depth":1},{"type":"step","name":"removeRemoteLinkStep","description":"This step deletes linked records of a record.\n\nLearn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#cascade-delete-linked-records)\n\n","link":"../core_flows.Steps_Common/page.mdx#removeremotelinkstep","depth":2}]}} />
### Input
<TypeList types={[{"name":"DeleteStockLocationWorkflowInput","type":"[DeleteStockLocationWorkflowInput](../interfaces/core_flows.DeleteStockLocationWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteStockLocationsWorkflow"/>
___
## linkSalesChannelsToStockLocationWorkflow
This workflow creates and dismisses links between location and sales channel records.
### Steps
<WorkflowDiagram workflow={{"name":"linkSalesChannelsToStockLocationWorkflow","steps":[{"type":"step","name":"associateLocationsWithSalesChannelsStep","description":"This step creates links between locations and sales channel records.","link":"../core_flows.Steps_Sales_Channel/page.mdx#associatelocationswithsaleschannelsstep","depth":1},{"type":"step","name":"detachLocationsFromSalesChannelsStep","description":"This step dismisses links between location and sales channel records.","link":"../core_flows.Steps_Sales_Channel/page.mdx#detachlocationsfromsaleschannelsstep","depth":2}]}} />
### Input
<TypeList types={[{"name":"LinkWorkflowInput","type":"[LinkWorkflowInput](../../types/CommonTypes/types/types.CommonTypes.LinkWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"add","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="linkSalesChannelsToStockLocationWorkflow"/>
___
## updateStockLocationsWorkflow
This workflow updates stock locations matching the specified filters.
### Steps
<WorkflowDiagram workflow={{"name":"updateStockLocationsWorkflow","steps":[{"type":"step","name":"updateStockLocationsStep","description":"This step updates stock locations matching the specified filters.","link":"../core_flows.Steps_Stock_Location/page.mdx#updatestocklocationsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"UpdateStockLocationsWorkflowInput","type":"[UpdateStockLocationsWorkflowInput](../interfaces/core_flows.UpdateStockLocationsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx) \\| [BaseFilterable](../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx) \\| [BaseFilterable](../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx) \\| [BaseFilterable](../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search parameter for stock location names","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"The names to filter stock locations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx) \\| [BaseFilterable](../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx) \\| [BaseFilterable](../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationProps/page.mdx) \\| [BaseFilterable](../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[FilterableStockLocationProps](../../types/StockLocationTypes/interfaces/types.StockLocationTypLine truncated
### Output
<TypeList types={[{"name":"StockLocationDTO[]","type":"[StockLocationDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"StockLocationDTO","type":"[StockLocationDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The associated address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)[]","description":"Fulfillment sets for the location","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zones","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","description":"The service zones associated with the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[StockLocationAddressDTO](../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationAddressDTO/page.mdx)","description":"The address of the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"The address 1 of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"The address 2 of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"The company of the stock location address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\|Line truncated
@@ -0,0 +1,73 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Store
<TypeList types={[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Workflows_Store"/>
___
## createStoresWorkflowId
`Const` **createStoresWorkflowId**: `"create-stores"`
___
## deleteStoresWorkflowId
`Const` **deleteStoresWorkflowId**: `"delete-stores"`
___
## updateStoresWorkflowId
`Const` **updateStoresWorkflowId**: `"update-stores"`
___
## createStoresWorkflow
This workflow creates one or more stores.
### Steps
<WorkflowDiagram workflow={{"name":"createStoresWorkflow","steps":[{"type":"step","name":"createStoresStep","description":"This step creates one or more stores.","link":"../core_flows.Steps_Store/page.mdx#createstoresstep","depth":1},{"type":"step","name":"updatePricePreferencesAsArrayStep","description":"This step updates price preferences.","link":"../core_flows.Steps_Pricing/page.mdx#updatepricepreferencesasarraystep","depth":2}]}} />
### Input
<TypeList types={[{"name":"CreateStoresWorkflowInput","type":"`CreateStoresWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createStoresWorkflow"/>
### Output
<TypeList types={[{"name":"StoreDTO[]","type":"[StoreDTO](../../store/interfaces/store.StoreDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"StoreDTO","type":"[StoreDTO](../../store/interfaces/store.StoreDTO/page.mdx)","optional":false,"defaultValue":"","description":"The store details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[StoreCurrencyDTO](../../store/interfaces/store.StoreCurrencyDTO/page.mdx)[]","description":"The supported currency codes of the store.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the store currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the store currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the currency is the default one for the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store_id","type":"`string`","description":"The store ID associated with the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The deleted date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`string`","description":"The associated default sales channel's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`string`","description":"The associated default region's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`string`","description":"The associated default location's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createStoresWorkflow"/>
___
## deleteStoresWorkflow
This workflow deletes one or more stores.
### Steps
<WorkflowDiagram workflow={{"name":"deleteStoresWorkflow","steps":[{"type":"step","name":"deleteStoresStep","description":"This step deletes one or more stores.","link":"../core_flows.Steps_Store/page.mdx#deletestoresstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"DeleteStoresWorkflowInput","type":"[DeleteStoresWorkflowInput](../types/core_flows.DeleteStoresWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteStoresWorkflow"/>
___
## updateStoresWorkflow
This workflow updates stores matching the specified filters.
### Steps
<WorkflowDiagram workflow={{"name":"updateStoresWorkflow","steps":[{"type":"step","name":"updateStoresStep","description":"This step updates stores matching the specified filters.","link":"../core_flows.Steps_Store/page.mdx#updatestoresstep","depth":1},{"type":"when","condition":"{\n return !!data.input.update.supported_currencies?.length\n }","depth":"2","steps":[{"type":"step","name":"updatePricePreferencesAsArrayStep","description":"This step updates price preferences.","link":"../core_flows.Steps_Pricing/page.mdx#updatepricepreferencesasarraystep","depth":2}]}]}} />
### Input
<TypeList types={[{"name":"UpdateStoreWorkflowInput","type":"`UpdateStoreWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateStoresWorkflow"/>
### Output
<TypeList types={[{"name":"StoreDTO[]","type":"[StoreDTO](../../store/interfaces/store.StoreDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"StoreDTO","type":"[StoreDTO](../../store/interfaces/store.StoreDTO/page.mdx)","optional":false,"defaultValue":"","description":"The store details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[StoreCurrencyDTO](../../store/interfaces/store.StoreCurrencyDTO/page.mdx)[]","description":"The supported currency codes of the store.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the store currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the store currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the currency is the default one for the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store_id","type":"`string`","description":"The store ID associated with the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The deleted date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`string`","description":"The associated default sales channel's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`string`","description":"The associated default region's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`string`","description":"The associated default location's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateStoresWorkflow"/>
@@ -0,0 +1,97 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_User
<TypeList types={[{"name":"authIdentityId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"userData","type":"[CreateUserDTO](../../user/interfaces/user.CreateUserDTO/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"The email of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the user.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the user.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The avatar URL of the user.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Workflows_User"/>
___
## createUserAccountWorkflowId
`Const` **createUserAccountWorkflowId**: `"create-user-account"`
___
## createUsersWorkflowId
`Const` **createUsersWorkflowId**: `"create-users-workflow"`
___
## deleteUsersWorkflowId
`Const` **deleteUsersWorkflowId**: `"delete-user"`
___
## updateUsersWorkflowId
`Const` **updateUsersWorkflowId**: `"update-users-workflow"`
___
## createUserAccountWorkflow
This workflow creates an authentication identity for a user.
### Steps
<WorkflowDiagram workflow={{"name":"createUserAccountWorkflow","steps":[{"type":"step","name":"createUsersStep","description":"This step creates one or more users.","link":"../core_flows.Steps_User/page.mdx#createusersstep","depth":1},{"type":"step","name":"setAuthAppMetadataStep","description":"This step sets the `app_metadata` property of an auth identity.","link":"../core_flows.Steps_Auth/page.mdx#setauthappmetadatastep","depth":2}]}} />
### Input
<TypeList types={[{"name":"CreateUserAccountWorkflowInput","type":"[CreateUserAccountWorkflowInput](../types/core_flows.CreateUserAccountWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"authIdentityId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"userData","type":"[CreateUserDTO](../../user/interfaces/user.CreateUserDTO/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"The email of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the user.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the user.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The avatar URL of the user.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createUserAccountWorkflow"/>
### Output
<TypeList types={[{"name":"UserDTO","type":"[UserDTO](../../user/interfaces/user.UserDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The avatar URL of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The updated date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createUserAccountWorkflow"/>
___
## createUsersWorkflow
This workflow creates one or more users.
### Steps
<WorkflowDiagram workflow={{"name":"createUsersWorkflow","steps":[{"type":"step","name":"createUsersStep","description":"This step creates one or more users.","link":"../core_flows.Steps_User/page.mdx#createusersstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"CreateUsersWorkflowInputDTO","type":"`CreateUsersWorkflowInputDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createUsersWorkflow"/>
### Output
<TypeList types={[{"name":"UserDTO[]","type":"[UserDTO](../../user/interfaces/user.UserDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UserDTO","type":"[UserDTO](../../user/interfaces/user.UserDTO/page.mdx)","optional":false,"defaultValue":"","description":"The user details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The avatar URL of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The updated date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createUsersWorkflow"/>
___
## deleteUsersWorkflow
This workflow deletes one or more users.
### Steps
<WorkflowDiagram workflow={{"name":"deleteUsersWorkflow","steps":[{"type":"step","name":"deleteUsersStep","description":"This step deletes one or more stores.","link":"../core_flows.Steps_User/page.mdx#deleteusersstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"DeleteUserWorkflowInput","type":"`DeleteUserWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteUsersWorkflow"/>
___
## updateUsersWorkflow
This workflow updates one or more users.
### Steps
<WorkflowDiagram workflow={{"name":"updateUsersWorkflow","steps":[{"type":"step","name":"updateUsersStep","description":"This step updates one or more stores.","link":"../core_flows.Steps_User/page.mdx#updateusersstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"UpdateUsersWorkflowInputDTO","type":"`UpdateUsersWorkflowInputDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateUsersWorkflow"/>
### Output
<TypeList types={[{"name":"UserDTO[]","type":"[UserDTO](../../user/interfaces/user.UserDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UserDTO","type":"[UserDTO](../../user/interfaces/user.UserDTO/page.mdx)","optional":false,"defaultValue":"","description":"The user details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The avatar URL of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The updated date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateUsersWorkflow"/>