Skip to content

Import Products into Shopify

This task will import products and variants into your Shopify store using the data in an XML file.

The task supports matching products based on the following fields. They take precedence in the order they are shown below:

  • Id
  • Metafield (if specified via the 'Product Identifier Metafield' task setting)
  • Handle

You can provide up to 100 product variants for each product. The task supports matching product variants based on the following fields. They take precedence in the order they are shown below:

  • Id
  • OptionValues

Warning

When updating an existing product, any variants not provided in the XML will be removed from Shopify.

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.

Product Identifier Metafield

Optional
You can specify a metafield to use as the unique identifier for products. When doing this, the task will use the metafield specified to search for matching products in Shopify. Simply provide the namespace and key of the metafield you would like to use, separated by a full stop, for example custom.product_sku. The metafield must be configured with the data type 'ID' in Shopify.

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 product 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

See Common Task Settings

Permissions

This task requires the following permissions in your Shopify app:

  • write_products
  • read_products

Examples

A sample input file is shown below.

<?xml version="1.0" encoding="utf-8"?>
<Products xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Product>
    <Category>
      <Id>gid://shopify/TaxonomyCategory/ap-2-1</Id>
      <FullName>Animals &amp; Pet Supplies > Pet Supplies > Bird Supplies</FullName>
      <Name>Bird Supplies</Name>
    </Category>
    <ClaimOwnership>
      <Bundles>false</Bundles>
    </ClaimOwnership>
    <Collections>
      <Record>
        <Id>gid://shopify/Collection/94099996761</Id>
        <Title>Summer 2025</Title>
      </Record>
    </Collections>
    <CombinedListingRole>PARENT</CombinedListingRole>
    <DescriptionHtml>A wooden bird feeder</DescriptionHtml>
    <GiftCardTemplateSuffix>default</GiftCardTemplateSuffix>
    <Handle>bird-feeder</Handle>
    <IsGiftCard>false</IsGiftCard>
    <Metafields>
      <Record>
        <Key>product_sku</Key>
        <Namespace>custom</Namespace>
        <Value>BF0001</Value>
      </Record>
    </Metafields>
    <Options>
      <Option>
        <Name>Colour</Name>
        <Position>1</Position>
        <Values>
          <Value>Red</Value>
          <Value>Yellow</Value>
          <Value>Blue</Value>
        </Values>
      </Option>
    </Options>
    <ProductType>Garden</ProductType>
    <RedirectNewHandle>false</RedirectNewHandle>
    <RequiresSellingPlan>false</RequiresSellingPlan>
    <Seo>
      <Description>A wooden bird feeder</Description>
      <Title>Bird feeder</Title>
    </Seo>
    <Status>ACTIVE</Status>
    <Tags>
      <Tag>garden</Tag>
    </Tags>
    <TemplateSuffix>default</TemplateSuffix>
    <Title>Bird Feeder</Title>
    <Variants>
      <Record>
        <Barcode>12345678910</Barcode>
        <CompareAtPrice>10.00</CompareAtPrice>
        <Id>gid://shopify/ProductVariant/42309202509913</Id>
        <InventoryItem>
          <CountryCodeOfOrigin>GB</CountryCodeOfOrigin>
          <HarmonizedSystemCode>12345678</HarmonizedSystemCode>
          <Measurement>
            <Weight>
              <Unit>KILOGRAMS</Unit>
              <Value>0.25</Value>
            </Weight>
          </Measurement>
          <RequiresShipping>true</RequiresShipping>
          <Sku>BF0001-RED</Sku>
          <Tracked>true</Tracked>
          <UnitCost>
            <Amount>4.00</Amount>
          </UnitCost>
        </InventoryItem>
        <InventoryPolicy>DENY</InventoryPolicy>
        <InventoryQuantities>
            <InventoryQuantity>
              <LocationId>gid://shopify/Location/16144367705</LocationId>
              <LocationName>6-8 Charlotte Square</LocationName>
              <Name>on_hand</Name>
              <Quantity>6</Quantity>
            </InventoryQuantity>
        </InventoryQuantities>
        <Metafields>
          <Record>
            <Key>large_item</Key>
            <Namespace>custom</Namespace>
            <Value>false</Value>
          </Record>
        </Metafields>
        <OptionValues>
          <OptionValue>
            <Name>Red</Name>
            <OptionName>Colour</OptionName>
          </OptionValue>
        </OptionValues>
        <Position>1</Position>
        <Price>8.00</Price>
        <RequiresComponents>false</RequiresComponents>
        <Sku>BF0001-RED</Sku>
        <Taxable>true</Taxable>
        <TaxCode>T1</TaxCode>
      </Record>
      <Record>
        <OptionValues>
          <OptionValue>
            <Name>Yellow</Name>
            <OptionName>Colour</OptionName>
          </OptionValue>
        </OptionValues>
        <Position>2</Position>
        <Price>8.00</Price>
        <Sku>BF0001-YELLOW</Sku>
        <Taxable>true</Taxable>
      </Record>
      <Record>
        <OptionValues>
          <OptionValue>
            <Name>Blue</Name>
            <OptionName>Colour</OptionName>
          </OptionValue>
        </OptionValues>
        <Position>3</Position>
        <Price>8.00</Price>
        <Sku>BF0001-BLUE</Sku>
        <Taxable>true</Taxable>
      </Record>
    </Variants>
    <Vendor>Zynk</Vendor>
  </Product>
</Products>