Customer Creation
👤 Customer Create/Update Functionality
The endpoint allows you to create or update a customer on Shopify.
🔍 Customer search logic:
- If the customer Id is present, a search is performed via Shopify Id.
- If the customer exists, it is returned to perform the update.
- If not found and the Id provided in input contains the shopify Id prefix, the search stops and proceeds with customer creation.
- Otherwise the search continues.
- If it was not possible to identify the customer via Id, and the provided email is valid, a search is performed via email.
- If the customer is found, it is returned.
- Otherwise, the search continues.
- If email is not available (or not valid), but a valid phone number is present, a search is performed via phone number.
- If a customer is found, it is returned.
- If none of the searches return results, an empty customer is returned, and the system will subsequently proceed with creating a new customer.
Customer Creation Flow Configuration
In addition to the base data flow configuration, it is necessary to add the following settings in the destination's Settings Override:
| Field | Value | Note |
|---|---|---|
Base Url | https://adapt.flowlyze.com | adapter URL |
Resource Path | api/adp/shopify/egress/sync-customers-to-shopify | Adapter path for customer creation flow. |
Headers :: x-api-key | ********** | API key for endpoint interaction verification |
Headers :: x-shopify-access-token | shpat_CODICEALFANUMERICO | Secret of the custom app created for integration |
Headers :: x-shopify-graphql-url | https://SHOPIFYURL.myshopify.com/ | Shopify shop URL to connect to |
Input Message
The endpoint works in upsert mode: it is possible to send partial JSONs and only the specified fields will be updated on Shopify. Fields not included in the request will not be modified.
If it is necessary to clear a field (e.g. remove a previously present value), it must be sent explicitly as an empty string ("").
Input Message Examples
- Customer creation/update
{
"id": "123456789",
"email": "mario.bianchi@gmail.com",
"firstName": "Mario",
"lastName": "Bianchi",
"phone": "3342233222",
"tags": ["tag1","tag2"],
"acceptsEmailMarketing": false,
"acceptsSmsMarketing": false
}
💡 Note: If you want to provide the Id in Shopify format, you can use the version with prefix:
"id": "gid://shopify/Customer/123456789"