Swell · Arazzo Workflow
Swell Find-or-Create Customer and Order
Version 1.0.0
Look up a customer by email and reuse it or create it, then place an order.
View Spec
View on GitHub
CommerceHeadless CommerceAPI-FirstB2CB2BSubscriptionsMarketplacesWholesaleStorefrontCheckoutPaymentsCartsOrdersCatalogInternationalizationArazzoWorkflows
Provider
Workflows
find-or-create-customer-and-order
Resolve a customer by email, creating one if absent, then place an order.
Filters accounts by email; on a hit it reuses the matched account id, on a miss it creates a new account, then both paths create an order.
1
findAccountStep
listAccounts
Search accounts for one whose email matches the supplied value, returning at most one match.
2
orderForExistingStep
createOrder
Create an order for the matched existing account.
3
createAccountStep
createAccount
Create a new account because no existing account matched the email.
4
orderForNewStep
createOrder
Create an order for the newly created account.