> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/others/integrating-with-shopify.md).

# 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="/files/9PjYX4Yvg3hJfYwIxd97" 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="/files/sTftuT7O4cACRvjWqjt5" 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/others/integrating-with-shopify.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
