Find-or-Create Customer and Order
A 4-step recipe with Swell. We can help you get access.
Recipe · 4 steps
Find-or-Create Customer and Order
with Swell · Customer Data Management
Resolve a customer by email, creating one if absent, then place an order.
- Search accounts for one whose email matches the supplied value, returning at most one match.
- Create an order for the matched existing account.
- Create a new account because no existing account matched the email.
- Create an order for the newly created account.
What you'll need to have ready
- email: Customer email used to match an existing account.
- first_name: First name used when creating a new account.
- last_name: Last name used when creating a new account.
- currency: ISO 4217 currency code for the order.
- items: Order line items.
For your developer
Arazzo workflow swell-io:find-or-create-customer-and-order, 4 operations: listAccounts → createOrder → createAccount → createOrder. Specs on APIs.io.