Import Customers to Shopify
This task will import customers into your Shopify store using the customer data in an XML file.
Important
This task uses Shopify's REST API, which is now deprecated. We recommend migrating to the equivalent GraphQL API task. See here for more information.
Settings
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 uploads to.
Input File
Required
The XML file containing the records. See Shopify Customer XML for more details.
Success File
Required
The XML file to output successful uploads to.
Prevent Reprocessing
Required
Optionally prevent reprocessing the same records by providing an
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
See Common Task Settings.
Permissions
This task requires the following permissions in your Shopify app:
- read_customers
- write_customers
Examples
A sample input file is shown below. See Shopify Customer XML for more details.
<?xml version="1.0" encoding="utf-8"?>
<customers>
<customer>
<id>959687688281</id>
<email>[email protected]</email>
<addresses>
<address>
<address1>Office 16</address1>
<address2>6-8 Charlotte Square</address2>
<city>Newcaslte upon Type/city>
<company>Zynk Software</company>
<country>United Kingdom</country>
<country-code>GB</country-code>
<default>true</default>
<first-name>John</first-name>
<id>207119551</id>
<last-name>Smith</last-name>
<name>John</name>
<phone>0191 820 1484</phone>
<province>Tyne and Wear</province>
<zip>NE1 4XF</zip>
</address>
</addresses>
<email-marketing-consent>
<state>subscribed</state>
<opt-in-level>confirmed_opt_in</opt-in-level>
<consent-updated-at>2023-01-01T00:00:00</consent-updated-at>
</email-marketing-consent>
<first-name>John</first-name>
<last-name>Smith</last-name>
<metafields>
<metafield>
<id>8576298526</id> <!-- Matches an existing metafield by ID -->
<key>sage_account_code</key> <!-- Matches an existing metafield by key and namespace -->
<namespace>custom</namespace> <!-- Matches an existing metafield by key and namespace -->
<value>ZYNK0001</value>
<type>single_line_text_field</type> <!-- Required when creating a new metafield -->
</metafield>
</metafields>
<multipass-identifier>14152562462</multipass-identifier>
<note>Placed an order that had a fraud warning</note>
<password>password</password>
<password-confirmation>password_confirmation</password-confirmation>
<phone>+441913037279</phone>
<sms-marketing-consent>
<state>subscribed</state>
<opt-in-level>single_opt_in</opt-in-level>
<consent-updated-at>2023-01-01T00:00:00</consent-updated-at>
<consent-collected-from>OTHER</consent-collected-from>
</sms-marketing-consent>
<tags>loyal,b2b</tags>
<tax-exempt>true</tax-exempt>
<tax-exemptions>
<tax-exemption>CA_STATUS_CARD_EXEMPTION</tax-exemption>
<tax-exemption>CA_BC_RESELLER_EXEMPTION</tax-exemption>
</tax-exemptions>
</customer>
</customers>