You can set up a flow in Shopify that sends an ongoing feed of contact addresses to Ometria.
If you have multiple Shopify stores integrated with Ometria you should create the flow in each of your Shopify accounts.
How it works
When a customer places a new order, Shopify sends the customer record to Ometria with the Shipping address.
Historical addresses
This method only provides you with new addresses to keep Ometria up to date.
To import historical addresses you should:
- Export the customer records from Shopify.
- Edit your export to include only the following headers:
- Address1
- address2
- address_city
- address_province
- address_zip
- address_country
Once your flow is set up you won't need to do this again.
Before you begin
- Update the Ometria API key in the Shopify HTTP post.
- Download the Order address - Example file.
Import your flow
Log into Shopify and open the Shopify Flow app.
Select Import:
Upload the Order address - Example file you downloaded:
Once imported, you can see the flow in your list of Workflows:
Set up your custom fields
In Ometria, set up the following custom fields:
Field | Field ID | Type |
Address 1 | address1 |
String |
Address 2 | address2 |
String |
Address city | address_city |
String |
Address province | address_province |
String |
Address zip | address_zip |
String |
Address country | address_country |
String |
Shopify payload example
The payload Shopify uses:
[
{
"@type": "contact",
"@collection": "Order_Address_Update",
"id": "{{order.customer.id | remove: 'gid://shopify/Customer/' }}",
"email": "{{order.customer.email}}",
"@merge": true,
"properties": {
"address1": "{{order.shippingAddress.address1}}",
"address2": "{{order.shippingAddress.address2}}",
"address_city": "{{order.shippingAddress.city}}",
"address_province": "{{order.shippingAddress.province}}",
"address_zip": "{{order.shippingAddress.zip}}",
"address_country":"{{order.shippingAddress.country}}"
}
}
]
Order address - Example
Download this file to create your Shopify flow:
Comments
0 comments
Article is closed for comments.