# Integrating with Shopify

[Prerequisites](#prerequisites) \
[Shopify Setup](#shopify-setup) \
&#x20;   [Step 1: Create a Private App](#step-1-create-a-private-app)

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

1. An active Shopify account.
2. Admin priviliges in Shopify.

### Shopify Setup <a href="#shopify-setup" id="shopify-setup"></a>

Drivetrain connects to Shopify by using an Private App API key created in Shopify for this Integration. To setup this integration, you need to log in via an admin account and create a private app, assign the relevant permissions to access your shopify objects and share the API key and password with us. This guide covers the mentioned steps in detail below.

#### Step 1: Create a Private App <a href="#step-1-create-a-private-app" id="step-1-create-a-private-app"></a>

1. Log in to your Shopify account and Click on **Settings ⚙** (Bottom Left).
2. Click on **Apps and sales channels** and click on **Develop apps.**

<figure><img src="https://docs.drivetrain.ai/~gitbook/image?url=https%3A%2F%2F1383008947-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmByiugojsjqsjrYS7HGI%252Fuploads%252Fe7qUvTSX1ddBW61tBgEl%252Fimage%2520%2849%29.png%3Falt%3Dmedia%26token%3D691aa7d1-957a-421a-895e-723c9bec92d5&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=76a392c0&#x26;sv=2" alt=""><figcaption></figcaption></figure>

3. Click on **Allow custom app development** in the next two screens.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2ForY8Qll6cSg7N62P0BGZ%2Fshopify-steps-drivetrain.png?alt=media&#x26;token=374c20b5-5fa7-4a5f-852d-d47a3c366fe9" alt=""><figcaption></figcaption></figure>

<figure><img src="https://docs.drivetrain.ai/~gitbook/image?url=https%3A%2F%2F1383008947-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmByiugojsjqsjrYS7HGI%252Fuploads%252FkTkTb1svCUaWjlxiR6Fu%252Fimage%2520%2851%29.png%3Falt%3Dmedia%26token%3D140dd8cd-dbdd-4090-8765-a4e598f12d0d&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=8707d7f6&#x26;sv=2" alt=""><figcaption></figcaption></figure>

4. Click on **Create an App.**

<figure><img src="https://docs.drivetrain.ai/~gitbook/image?url=https%3A%2F%2F1383008947-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmByiugojsjqsjrYS7HGI%252Fuploads%252FOAKjTYsdxt0McP4F9yUi%252Fimage%2520%2852%29.png%3Falt%3Dmedia%26token%3Dc4d21ebb-367b-40bb-8646-3599a596f409&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=27ec08bd&#x26;sv=2" alt=""><figcaption></figcaption></figure>

5. Enter the App Name as “Drivetrain Integration” and click on **Create app.**

<figure><img src="https://docs.drivetrain.ai/~gitbook/image?url=https%3A%2F%2F1383008947-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmByiugojsjqsjrYS7HGI%252Fuploads%252F0Cw3IDoeLyqSNB12X2ou%252Fimage%2520%2853%29.png%3Falt%3Dmedia%26token%3Dd3e25769-3e4f-4d11-ac1d-463fe58db5dc&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=e5f24339&#x26;sv=2" alt=""><figcaption></figcaption></figure>

6. Click on **Configure Admin API scopes** and select the necessary scopes you want to pull into Drivetrain. Enable **Read** access in every scope you select, and click on **Save.**

<figure><img src="https://docs.drivetrain.ai/~gitbook/image?url=https%3A%2F%2F1383008947-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmByiugojsjqsjrYS7HGI%252Fuploads%252FG2NBx3baXKqCn6GrGiSK%252Fimage%2520%2854%29.png%3Falt%3Dmedia%26token%3D1c1f1fbd-0dfb-45a4-878d-5aac2b4e70af&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=3d2a32b0&#x26;sv=2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fl5XLr2efeG99uopTIVwQ%2Fshopify-steps-2.avif?alt=media&#x26;token=26deaabb-8c32-4ad0-bdd2-07f7c20bbc7d" alt=""><figcaption></figcaption></figure>

7. After adding necessary scopes for your integration, click on **Install App.**

<figure><img src="https://docs.drivetrain.ai/~gitbook/image?url=https%3A%2F%2F1383008947-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmByiugojsjqsjrYS7HGI%252Fuploads%252F7bKHF8SdYOjrzQ8hTbXu%252Fimage%2520%2856%29.png%3Falt%3Dmedia%26token%3D5936e879-5ece-4c32-acaa-6030e56b98e4&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=400eef31&#x26;sv=2" alt=""><figcaption></figcaption></figure>

8. Click on **Reveal Token Once** and store **Admin API Access Token** in a secure document.

<figure><img src="https://docs.drivetrain.ai/~gitbook/image?url=https%3A%2F%2F1383008947-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmByiugojsjqsjrYS7HGI%252Fuploads%252FnzVpDJkVqctEO4hdJuej%252Fimage%2520%2857%29.png%3Falt%3Dmedia%26token%3D65c7bfba-313e-4ddf-82a0-abb47944e836&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=6f1a4fb3&#x26;sv=2" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Please note that you won’t be able to access Admin API Access Token again, store it in a document when you copy it.
{% endhint %}

9. Copy the API key and Secret Key in the same secure document.

<figure><img src="https://docs.drivetrain.ai/~gitbook/image?url=https%3A%2F%2F1383008947-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmByiugojsjqsjrYS7HGI%252Fuploads%252FunZNPkDiqwB9swBE5ltH%252Fimage%2520%2858%29.png%3Falt%3Dmedia%26token%3Dd2203409-82c2-43ac-a9c8-3e8c12d7f74b&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=39884686&#x26;sv=2" alt=""><figcaption></figcaption></figure>

10. Copy the Store URL in the same secure document.

<figure><img src="https://docs.drivetrain.ai/~gitbook/image?url=https%3A%2F%2F1383008947-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmByiugojsjqsjrYS7HGI%252Fuploads%252FaHbWVCN3SPuk0agk3YeI%252Fimage.png%3Falt%3Dmedia%26token%3D53ba237c-9ae5-4eaf-bc38-8e95f2174f1b&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=4c517382&#x26;sv=2" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
That's it! Share the below information with your customer success manager or solutions consultant so that they can get started:

* API key
* API Secret Key
* API Access Token
* Store URL
  {% endhint %}
