When multiple API Extensions are configured for the same resource and action, you can now control the order in which they run and ensure each Extension receives the correct resource state.
By declaring dependencies on an Extension, you instruct the platform to run the specified API Extensions first. A dependent Extension then receives the resource after all its ancestors' update actions have been applied, enabling Extensions to build on each other's results.
Extension Chaining helps you run checkout steps in a clear order. For example, you can apply discounts before tax checks, call external pricing, validate addresses, and calculate taxes before payment. Without Extension Chaining, you had to orchestrate this sequence outside the platform.
Extensions without dependencies run concurrently. Once all Extensions in a chain have completed, the platform applies all collected update actions together and persists the result. The maximum dependency chain depth is 3 layers, and each Extension can declare at most 5 direct dependencies. Circular dependencies are detected and not allowed to avoid deadlocks.
We have implemented the following changes to our REST and GraphQL schemas:
- Added the
dependenciesfield to Extension containing references to prerequisite Extensions. - Added the
dependenciesfield to ExtensionDraft to set dependencies when creating an Extension. - Added the Set Dependencies update action to manage dependencies on an existing Extension.
- Added the following error codes returned when Extension Chaining constraints are violated:
- Added the ExtensionDependencyExists error code returned when attempting to delete an Extension that other Extensions depend on.
- Added
dependenciesReffield toExtensiontype. - Added
dependenciesfield toExtensionDrafttype. - Added
setDependenciesfield toExtensionUpdateActiontype. - Added
SetExtensionDependenciesinput object.