Skip to content

Export Customers from Shopify

This task will export a list of customers from your Shopify store, and save them to 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.

Export Meta Data

Required
Optionally export the custom meta data for records. Set to True to export all meta data, otherwise False to not have the data included. Defaults to False.

Export Settings

  • Date Created
    Used when exporting new records.

  • Date Modified
    Used when exporting modified records.

  • Export Modified, New or All Records
    If modified, new or all records should be exported.

From ID

Required
If an ID number is specified, the task will only export customers with an ID number greater than the ID number entered.

Page Size

Required
Used to control the number of records that are exported per page. Defaults to 100.

Record IDs

Optional
The number of records to export per page. Please note, this is the Shopify ID present in the URL rather than the Shopify Order Number.

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.

Output File

Required
The XML file to save the list of customers to.

Zynk Settings

See Common Task Settings.

Permissions

This task requires the following permissions in your Shopify app:

  • read_customers

Examples

Sample output file:

<?xml version="1.0" encoding="utf-8"?>
<customers type="array" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <customer>
    <id>5529424855106</id>
    <created-at>2022-04-20T14:42:32+01:00</created-at>
    <updated-at>2023-01-05T14:50:49+00:00</updated-at>
    <addresses>
      <address>
        <id>6786848751682</id>
        <address1>6 Charlotte Square</address1>
        <address2 />
        <city>Newcastle upon Tyne</city>
        <company>Zynk Software</company>
        <country>United Kingdom</country>
        <country-code>GB</country-code>
        <country-name>United Kingdom</country-name>
        <customer-id>5529424855106</customer-id>
        <default>false</default>
        <first-name>John</first-name>
        <last-name>Smith</last-name>
        <name>John Smith</name>
        <phone />
        <province>England</province>
        <province-code>ENG</province-code>
        <zip>NE1 4XH</zip>
      </address>
      <address>
        <id>7227884175426</id>
        <address1>Zynk Software Limited</address1>
        <address2>i6</address2>
        <city>Newcastle upon Tyne</city>
        <country>United Kingdom</country>
        <country-code>GB</country-code>
        <country-name>United Kingdom</country-name>
        <customer-id>5529424855106</customer-id>
        <default>true</default>
        <first-name>John</first-name>
        <last-name>Smith</last-name>
        <name>John Smith</name>
        <province>England</province>
        <province-code>ENG</province-code>
        <zip>NE1 4XF</zip>
      </address>
    </addresses>
    <currency>GBP</currency>
    <default-address>
      <id>7227884175426</id>
      <address1>Zynk Software Limited</address1>
      <address2>i6</address2>
      <city>Newcastle upon Tyne</city>
      <country>United Kingdom</country>
      <country-code>GB</country-code>
      <country-name>United Kingdom</country-name>
      <customer-id>5529424855106</customer-id>
      <default>true</default>
      <first-name>John</first-name>
      <last-name>Smith</last-name>
      <name>John Smith</name>
      <province>England</province>
      <province-code>ENG</province-code>
      <zip>NE1 4XF</zip>
    </default-address>
    <email>[email protected]</email>
    <email-marketing-consent>
      <state>subscribed</state>
      <opt-in-level>single_opt_in</opt-in-level>
      <consent-updated-at>2022-12-29T16:26:14+00:00</consent-updated-at>
    </email-marketing-consent>
    <first-name>John</first-name>
    <last-name>Smith</last-name>
    <last-order-id>4732650881090</last-order-id>
    <last-order-name>#1020</last-order-name>
    <metafields>
      <metafield>
        <id>20546431877186</id>
        <created-at>2023-01-05T14:50:49+00:00</created-at>
        <updated-at>2023-01-05T14:50:49+00:00</updated-at>
        <admin-graphql-api-id>gid://shopify/Metafield/20546431877186</admin-graphql-api-id>
        <key>account_balance</key>
        <namespace>custom</namespace>
        <owner-id>5529424855106</owner-id>
        <owner-resource>customer</owner-resource>
        <value>1000.0</value>
        <type>number_decimal</type>
      </metafield>
      <metafield>
        <id>20546431909954</id>
        <created-at>2023-01-05T14:50:49+00:00</created-at>
        <updated-at>2023-01-05T14:50:49+00:00</updated-at>
        <admin-graphql-api-id>gid://shopify/Metafield/20546431909954</admin-graphql-api-id>
        <key>sage_account_code</key>
        <namespace>custom</namespace>
        <owner-id>5529424855106</owner-id>
        <owner-resource>customer</owner-resource>
        <value>John0001</value>
        <type>single_line_text_field</type>
      </metafield>
    </metafields>
    <note />
    <orders-count>1</orders-count>
    <state>disabled</state>
    <tags />
    <tax-exempt>false</tax-exempt>
    <tax-exemptions />
    <total-spent>136.91</total-spent>
    <verified-email>true</verified-email>
  </customer>
</customers>