Overview

Shopify is an ecommerce platform that enables you to sell in multiple places including online with your ecommerce store, online marketplaces, social media, and in-person with point of sale.

Integrating Lytics with Shopify allows you to import customer, order, and product data into Lytics so that you can run segmented marketing campaigns and offer relevant recommendations for your Shopify customers.

Authorization

If you haven't already done so, you will need to set up a Shopify custom app before you begin the process described below. To setup a custom app, follow the custom apps documentation. In order for Lytics to import the Shopify customer and order details, the permissions read_orders, read_customers and read_products must be granted to the generated access token. To add these scopes to the API token, navigate to the Configuration tab within your custom app and select Edit to add additional scope permissions within the Shopify Admin API Integration.

To get the access token follow the custom apps authentication instructions on Shopify.

If you are new to creating authorizations in Lytics, see the Authorizations Dashboard documentation for more information.

  1. Select Shopify from the list of providers.
  2. Select the Shopify API Token authorization method.
  3. Enter a Label to identify your authorization.
  4. (Optional) Enter a Description for further context on your authorization.
  5. In the Access Token field, enter your Shopify access token.
  6. Enter your Shopify store Subdomain.
  7. Click Authorize.

Import Audiences & Activity Data

Importing your Shopify customers and their activity data into Lytics enables you to run personalized marketing campaigns for your Shopify customers.

Integration Details

  • Implementation Type: Server-side Integration
  • Implementation Technique: REST API Integration
  • Frequency: Batch Integration
  • Resulting data: User Profiles and Raw Event Data.

This integration utilizes the Shopify APIs to import user data. Once the import is started the job will:

  1. Import all customers and orders from your Shopify account into the shopify_users and shopify_orders streams, respectively.
  2. Continue to import any new customers and orders hourly.

Fields

The following fields are included in the default mapping of the shopify_users stream:

Source FieldLytics User FieldDescriptionType
idshopify_customer_id unique idShopify Customer Idstring
emailemail unique idEmailstring
default_address.address1address_1Address 1string
default_address.address2address_2Address 2string
default_address.citycityCitystring
default_address.country, default_address.country_codecountryCountrystring
first_namefirst_nameFirst Namestring
last_namelast_nameLast Namestring
phonephonePhone Numberstring
default_address.zippostal_codeZipstring
email_marketing_consent.stateshopify_email_marketing_consentShopify Accepts Email Marketingstring
email_marketing_consent.opt_in_levelshopify_email_marketing_consent_opt_in_levelShopify Email Marketing Opt In Levelinterface{}
email_marketing_consent.consent_updated_atshopify_email_marketing_consent_updated_tsShopify Email Marketing Consent Updated Atstring
sms_marketing_consent.stateshopify_sms_marketing_consentShopify Accepts SMS Marketingstring
sms_marketing_consent.opt_in_levelshopify_sms_marketing_consent_opt_in_levelShopify SMS Marketing Opt In Levelstring
sms_marketing_consent.consent_updated_atshopify_sms_marketing_consent_updated_tsShopify SMS Marketing Consent Updated Atstring
sms_marketing_consent.consent_collected_fromshopify_sms_marketing_consent_collected_fromShopify SMS Marketing Consent Collected Fromstring
created_atshopify_created_tsShopify Created Timestring
last_order_nameshopify_last_order_nameShopify Name on Last Orderstring
orders_countshopify_purchase_ctShopify Lifetime Number of Ordersstring
shop_nameshopify_shopsShopify Store Names[]string
shop_name,total_spentshopify_shop_ltvShopify LifeTime Total Spend by Shopmap[string]string
tax_exemptshopify_tax_exemptShopify Tax Exemptstring
tagsshopify_customer_tagsShopify Tags Attached to the Customer[]string
total_spentshopify_total_spentShopify Lifetime Total Spentstring
updated_atshopify_updated_tsShopify Updated Timestring
default_address.statestateStatestring

The following fields are included in the default mapping of the shopify_orders stream:

Source FieldLytics User FieldDescriptionType
order_idshopify_order_ids unique idShopify Order IDs[]string
emailemail unique idEmailstring
customer_idshopify_customer_id unique idShopify Customer IDstring
created_atlast_purchase_tsMost Recent Order Timedate
discount_codesshopify_discount_codesShopify Discount Codes Used[]string
created_atshopify_first_order_tsFirst Order Timedate
item_idsshopify_item_idsShopify Item Ids[]string
currencyshopify_last_order_currencyLast Order Currencystring
total_priceshopify_last_order_priceLast Order Pricestring
product_idsshopify_product_idsShopify Product Ids Ordered[]string
product_namesshopify_product_namesShopify Product Names Ordered[]string
product_titlesshopify_product_titlesShopify Products Titles Ordered[]string
shop_nameshopify_order_shopsShopify Order Store Names[]string
variant_idsshopify_variant_idsShopify Variant Ids[]string

Configuration

Follow these steps to set up and configure an import of Shopify data into the Lytics platform. If you are new to creating jobs in Lytics, see the Data Sources documentation for more information.

  1. Select Shopify from the list of providers.
  2. Select the Import Audiences & Activity Data job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. (Optional) Select the Import Customer Metafields to import metafields associated with each Shopify user.
  7. Select the Keep Updated checkbox to continuously run this import.
  8. Click Start Import.
    shopify-import

Import Products

Importing Shopify products allows you to enrich your use of Affinities with product data from your Shopify store. Serve your customers with relevant messaging and product recommendations based on how they have engaged with your brand.

Integration Details

  • Implementation Type: Server-side Integration
  • Implementation Technique: REST API Integration
  • Frequency: Batch Integration
  • Resulting data: Content

This import utilizes the Shopify Product API to import user data. Once the import is started the job will:

  1. Import all products updated after the configured Start Date and up to the configured End Date into the shopify_products stream. If no dates are specified in the configuration, all products will be imported.
  2. If Keep Updated is selected, the workflow will import modified products daily.

Fields

The following fields are included in the default mapping of the shopify_products stream:

Source FieldLytics Content FieldDescriptionType
variants.created_atcreatedDate Createddate
variants.inventory_quantityinventory_quantityInventory Quantitynumber
variants.pricepricePricenumber
variants.skuskuSKUstring
variants.updated_atupdatedDate Updateddate
body_htmllong_descriptionstring
idshopify_product_id unique idShopify Product IDstring
set(hash(urlmain(url)))hashedurl unique id[]string
set(tags)shopify_product_tags[]string
set(tags)tags[]string
sourcesourcestring
titledescriptionstring
titleshopify_product_titlestring
url(image.src)primary_imagestring
url(url)urlstring

Configuration

Follow these steps to set up and configure an import job for Shopify in the Lytics platform. If you are new to creating jobs in Lytics, see the Data Sources documentation for more information.

  1. Select Shopify from the list of providers.
  2. Select the Import Products job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. In the Start Date input, enter a date in format yyyy-mm-dd to begin importing from.
  7. In the End Date input, enter a date in format yyyy-mm-dd to import until.
  8. Check the Keep Updated checkbox to import products daily.
  9. Click Start Export.
    shopify product configuration