@medusajs/core-flows

2.21.2

Patch Changes

2.21.1

Patch Changes

DELETE /admin/search-indexes/:id drops every physical index ever built for an index, along with its versions and sync history, so the next migration recreates it from scratch at version 1. Useful when an index' physical state has drifted past what a reindex can repair.

Available as searchModuleService.deleteIndex, deleteSearchIndexWorkflow, sdk.admin.search.deleteIndex, and a confirmed action in the admin dashboard.

2.21.0

Patch Changes

2.20.1

Patch Changes

2.20.0

Patch Changes

2.19.0

Patch Changes

When adding an item, the allow_backorder flag passed on the item is now honored during inventory confirmation, overriding the variant's own allow_backorder setting for that item only. Previously the flag was accepted by the API but ignored, making it impossible to add an out-of-stock variant to a draft order even with allow_backorder: true.

2.18.0

Patch Changes

PR #15840 added the data column to tax line DTOs and the set/upsert steps, but prepareTaxLinesData in cart/utils/prepare-line-item-data.ts — which copies cart tax lines to order tax lines during complete-cart — was not updated. As a result the data field (used by providers like Stripe Tax to store jurisdiction breakdowns) was silently discarded on every order placement.

The get-reservations query in createOrderFulfillmentWorkflow passed its line_item_id constraint under the variables key filter, which the remote query layer does not recognize (it only honors filters). The constraint was silently dropped and every reservation item in the database was fetched and hydrated on each fulfillment creation, blocking the event loop for tens of seconds on stores with large reservation tables.

createOrderWorkflow did not run getTranslatedLineItemsStep, so line items provided at order/draft-order creation kept their default-language titles even when a locale was set — while items added later (via addOrderLineItemsWorkflow) were translated. Line items are now translated on creation too, matching the add-items, cart, and add-to-cart paths.

2.17.2

Patch Changes

createPaymentSessionsWorkflow creates the payment account holder with noCompensation, so the holder survives a workflow rollback, but the createRemoteLinkStep that links it to the customer was dismissed on rollback. A failed init therefore left an orphaned account holder — present in the DB but unreachable through customer.account_holders — so the existingAccountHolder short-circuit kept missing it and every later init re-created the same provider customer, colliding on the unique (provider_id, external_id) index ("Account holder ... already exists", a 400 on POST /payment-sessions) that never self-healed. The link step now also runs with noCompensation, so the link survives alongside the holder and a later init reuses the existing holder.

2.17.1

Patch Changes

2.17.0

Minor Changes

Patch Changes

2.16.0

Patch Changes

When a draft order was created with line items for a customer belonging to a customer group, the initial prices ignored customer-group-scoped price lists and used the default variant price. The create-order workflow built the pricing context with only customer_id, so the customer.groups.id attribute that price-list rules match on was missing. The customer is now loaded with its groups and passed into the pricing context, consistent with the add-items flow.

The mark-as-paid admin route and the markPaymentCollectionAsPaid workflow now accept an optional provider_id. When provided, the captured payment is recorded under that provider instead of always using pp_system_default. Omitting it preserves the previous behavior. This completes the admin payment-provider flow started in #15169.

2.15.5

Patch Changes

Products with allow_backorder=true are now correctly treated as available for pickup shipping options, even when inventory_quantity=0. Previously, these products would incorrectly trigger insufficient_inventory: true, preventing customers from selecting pickup options for backorder-enabled products.

2.15.4

Patch Changes

2.15.3

Patch Changes

2.15.2

Patch Changes

2.15.1

Patch Changes

2.15.0

Patch Changes

The Refund data model supports a metadata field, but it was not exposed on CreateRefundDTO, RefundPaymentsStepInput, or RefundPaymentsWorkflowInput, making it impossible to set metadata on a refund created via refundPaymentsWorkflow. This adds the optional field to all three types and threads it through PaymentModuleService.refundPayment so the value reaches the underlying refund row.

Mirrors #15303 on the plural refundPaymentsWorkflow's validator. The validator now sums raw_amount instead of amount and compares with a per-currency epsilon (getEpsilonFromDecimalPrecision), so sub-cent provider captures (e.g. Stripe charging in a foreign currency at 87.957975) no longer cause a refund of the user-visible rounded amount (87.96) to be falsely rejected. Also adds captures.raw_amount and refunds.raw_amount to the payments query so the raw values reach the validator.

2.14.2

Patch Changes

2.14.1

Patch Changes

2.14.0

Patch Changes

2.13.6

Patch Changes

2.13.5

Patch Changes

2.13.4

Patch Changes

2.13.3

Patch Changes

2.13.2

Patch Changes

2.13.1

Patch Changes

2.13.0

Minor Changes

Patch Changes

2.12.6

Patch Changes

2.12.5

Patch Changes

2.12.4

Patch Changes

2.12.3

Patch Changes

2.12.2

Patch Changes

2.12.1

Patch Changes

2.12.0

Patch Changes

2.11.3

Patch Changes

2.11.2

Patch Changes

2.11.1

Patch Changes

2.11.0

Patch Changes

2.10.3

Patch Changes

2.10.2

Patch Changes

2.10.1

Patch Changes

2.10.0

Minor Changes

Patch Changes

2.9.0

Minor Changes

Patch Changes

2.8.8

Patch Changes

2.8.7

Patch Changes

2.8.6

Patch Changes

2.8.5

Patch Changes

2.8.4

Patch Changes

2.8.3

Patch Changes

2.8.2

Patch Changes

2.8.1

Patch Changes

2.8.0

Minor Changes

Patch Changes

2.7.1

Patch Changes

2.7.0

Minor Changes

Patch Changes

2.6.1

Patch Changes

2.6.0

Patch Changes

2.5.1

Patch Changes

2.5.0

Patch Changes

2.4.0

Minor Changes

Patch Changes

2.3.1

2.3.0

Patch Changes

2.2.0

Patch Changes

2.1.3

Patch Changes

2.1.2

Patch Changes

2.1.1

Patch Changes

2.1.0

Patch Changes

2.0.7

Patch Changes

Deprecate actorType in favor of actor_type. The field actorType will be removed in a future version, so please update your code to use actor_type instead.

2.0.6

2.0.5

Patch Changes

2.0.4

2.0.3

Patch Changes

2.0.2

Patch Changes

2.0.1

2.0.0

Major Changes

Patch Changes

0.0.9

Patch Changes

0.0.8

Patch Changes

0.0.7

Patch Changes

0.0.6

Patch Changes

0.0.5

Patch Changes

0.0.4

Patch Changes

0.0.3

Patch Changes

0.0.2

Patch Changes