Import Customers into Shopify
This task will import customers into your Shopify store using the customer data in an XML file.
Settings
Shopify Connection
Required
The Shopify connection to use. See Shopify Connection if you require more information on how to create/manage connections.
Fail File
Required
The XML file to output any failed imports to.
Input File
Required
The XML file containing the records to import into Shopify. See below for a sample of the XML format.
Success File
Required
The XML file to output successful imports to.
Cache Time To Live
Required
Zynk will cache the IDs of certain records that it looks up against Shopify, to prevent the same lookup being performed more than is necessary. This setting controls the length of time (in minutes) that cached IDs are considered valid for. Before this time has elapsed, the cached copy of the ID will be used. Once this time has elapsed, the lookup will be performed again against Shopify.
Prevent Reprocessing
Required
When enabled, this setting will prevent the same records being processed more than once by the task. Records will be identified based on the <ZynkExternalId>
values provided in the input file.
Selections
Required
The set of fields to select from Shopify. For more details about the syntax, please refer to Selections Syntax.
For more details about the customer object and it's fields, please refer to Shopify's documentation.
Timeout
Optional
The length of time to wait (in seconds) for Shopify to respond to each API request. If left blank, or set to 0 or less, a default value of 100 seconds will be applied.
Zynk Settings
Permissions
This task requires the following permissions in your Shopify app:
- write_customers
- read_customers
Examples
A sample input file is shown below.
<?xml version="1.0" encoding="utf-8"?>
<Customers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Customer>
<Id>gid://shopify/Customer/7398802653250</Id>
<ZynkExternalId>12345</ZynkExternalId>
<AddressesV2>
<Record>
<Address1>i6 Building</Address1>
<Address2>6-8 Charlotte Square</Address2>
<City>Newcastle</City>
<Company>Zynk Software</Company>
<CountryCodeV2>GB</CountryCodeV2>
<FirstName>John</FirstName>
<LastName>Smith</LastName>
<Phone>+441911231231</Phone>
<ProvinceCode>England</ProvinceCode>
<Zip>NE1 4XF</Zip>
</Record>
</AddressesV2>
<Email>[email protected]</Email>
<EmailMarketingConsent>
<ConsentUpdatedAt>2025-01-21T16:06:32Z</ConsentUpdatedAt>
<MarketingOptInLevel>SINGLE_OPT_IN</MarketingOptInLevel>
<MarketingState>NOT_SUBSCRIBED</MarketingState>
</EmailMarketingConsent>
<FirstName>John</FirstName>
<LastName>Smith</LastName>
<Locale></Locale>
<Metafields>
<Record>
<Key>account_balance</Key>
<Namespace>custom</Namespace>
<Type>number_decimal</Type>
<Value>1000.0</Value>
</Record>
</Metafields>
<Note>A happy customer</Note>
<Phone>+441918201484</Phone>
<SmsMarketingConsent>
<ConsentUpdatedAt>2025-01-21T16:06:32Z</ConsentUpdatedAt>
<MarketingOptInLevel>SINGLE_OPT_IN</MarketingOptInLevel>
<MarketingState>NOT_SUBSCRIBED</MarketingState>
</SmsMarketingConsent>
<Tags>
<Tag>b2b</Tag>
</Tags>
<TaxExempt>false</TaxExempt>
<TaxExemptions>
<TaxExemption>CA_BC_COMMERCIAL_FISHERY_EXEMPTION</TaxExemption>
</TaxExemptions>
</Customer>
</Customers>