# Shopify Import Integration You can use the data connector for Shopify and directly import data from your Shopify to Treasure Data. For sample workflows on how to import data from Shopify, view [Treasure Boxes](https://github.com/treasure-data/treasure-boxes/tree/master/td_load/shopify). # Prerequisites - Basic knowledge of Treasure Data - Basic knowledge of Shopify ## Obtain Shopify Credentials To get Shopify Credentials, complete the following steps: 1. Sign up at [https://www.shopify.com/](https://www.shopify.com/) to create an online store for the user. 2. Enter the details about the user. 3. Enter additional details about business. 4. Create a custom app. 5. The user can see and use the API credentials to store and to connect with different external applications. ## store_name Configuration Shopify translates your free-form Store Name into URL-friendly value. For example, it truncates special characters and replaces spaces with hyphens. For example: Example Shop-123-!#$ becomes example-shop-123: ![](/assets/image2020-11-25_15-46-9.d1e34300a2d3e085fefa41de5061a2e81285047e5198c98de794acb5688e8c16.240488a1.png) You need to use the translated value (in Admin URL, after signing in): ![](/assets/image2020-11-25_15-46-24.08a7272ce0f78946bc7208605de1c17931086d9605d15bbdb37983c9b7d37583.240488a1.png) ## Use the TD Console to Create Your Connection ### Create a New Connection 1. Go to **Integrations Hub** > **Catalog** and search and select Shopify. 2. Select **Create.** You are creating an authenticated connection. ![](/assets/screen-shot-2019-11-16-at-12.07.39-pm.7c1a081729fee61cce5cc8cdf5fe521d5c42d1490460835098864cde6d8e687b.240488a1.png) The following dialog opens. Check **Admin API access token** in Shopify console for Password value. ![](/assets/screen-shot-2019-11-16-at-12.08.47-pm.877d111a8b97ca07e802e9f170ecebf2d666925250978ae96e584023d794ce72.240488a1.png) 1. Complete the required fields and then select **Continue**. 2. Name your new Shopify connection. Select **Done**. ### Transfer Your Data to Treasure Data After creating the authenticated connection, you are automatically taken to the Authentications tab. ![](/assets/image-20200708-201126.0e761577b758dca083f31b4ef278b6ae53e731f6aee6178e63c796e59c5daed2.240488a1.png) 1. Look for the connection you created and select **New Source**. Edit the following fields. | Field | Description | | --- | --- | | **Source** | The type of object that you want to transfer from Shopify such as products, customers, transactions, orders, inventory, and metafields. The following list identifies supported elements: - Objects - inventory level - inventory_items - location - Order status - open - closed - canceled - any - Metafields resource - product - customer - order - online_store - shop - Product resource objects - product - product_variant - product_image - collection - Order resource objects - order - draft_order - Online_store resource objects - blog - article - page | | **Incremental** | Load data into Treasure Data incrementally. This selection enables the Incremental field**.** | | **Incremental field** | The data field used to sort the objects. There are two options: created_at and updated_at. | | **Data type** | The data field used to sort the metadata objects. There are two options: created_at and updated_at. | | **Start date** | Defining the 'start_date' allows you to select only objects that have been created or updated since the 'start_date'. This field is dependent on the Incremental field. When incremental is set to false, created_at is considered the Start date target when you import from products, customers, transactions, orders object | | **Use precise 'End date'** | Specify the **End date**or leave blank. | | **Number of days to fetch** | Specify how many days, starting from the 'start_date,'that you want to fetch data. | | **End date** | Specify a date by which objects have been updated: - If **End date** is not specified, all the objects up to now are retrieved. - **If Start time** and **End time** can be combined to specify a specific period, from'start_date' until 'end_date'. | | **Inventory Item IDs** | A list of inventory_ids. | | **Location IDs** | Alist of location_ids. | | **Updated at** | The time in which `inventory_level` objects have been updated_at, from a specified time until present. | | **Fetch all customer's metafields** | Download all customer's metafields | 1. Preview your data. To make changes, select **Advanced Settings,** otherwise select **Next**. ![](/assets/screen-shot-2019-11-16-at-12.16.12-pm.5709abe26d10772f4a5b5927db3545e6103b799745be13e8ea82bdb5f38fd6e3.240488a1.png) 1. Select a database and a table where you want to transfer your data. ![](/assets/screen-shot-2019-11-16-at-12.19.27-pm.85d36ab90c39a1e285d5642d19a46653bb157a8f655ac300feb5ee48b31c7f3c.240488a1.png) 1. Specify the schedule of the data transfer using the following dialog and select **Next**. ![](/assets/screen-shot-2019-11-16-at-12.21.49-pm.f8cbc1b5834f02af93857afd3f49fceed03578c63c990da41cf75673b087869b.240488a1.png) 1. Name your source and select **Done**. ![](/assets/screen-shot-2019-11-16-at-12.23.03-pm.4852f8b98949f26e9a59d74e24d1991e9aacb713db39db14e87ac25e14e72018.240488a1.png)