Quick Overview
This workflow receives Shopify customer create/update webhooks and syncs the customer record to CEGID Y2 by creating the customer when missing or updating the existing customer when CEGID reports a duplicate.
How it works
- Receives a POST webhook from Shopify when a customer is created or updated.
- Builds a CEGID Y2 customer payload with identifiers, tax/currency details, and the default store/workspace settings.
- Formats the customer address and chooses whether to send individual or company contact details based on whether a company name is present.
- Sends the assembled payload to CEGID Y2 to create the customer.
- If CEGID returns a “customer already exists” error, extracts the existing CEGID customer ID from the error message and sends a PATCH request to update that customer in CEGID.
- If the create request fails for any other reason, stops the workflow and surfaces the CEGID error.
Setup
- In Shopify, create a customer webhook for create/update events and point it to this workflow’s webhook URL, matching the allowed shop domain.
- Add CEGID Y2 HTTP Basic Auth credentials and ensure the API user has permission to create and update customers.
- Update the CEGID API base URL, workspace, default creation store, and tax system values used to build the requests.