# CommerceTools

This guide is intended for CommerceTools merchants who are connecting their store to Violet. During this process, the merchant will create a new API Client in their CommerceTools dashboard and then provide the generated credentials to Violet through the Violet Connect onboarding tool. The merchant will retain full control of the created API Client and can remove it at any time from within their CommerceTools dashboard. *Total time for completion is around 3 minutes.*

## Step 1: Creating App Credentials

1. Within your CommerceTools admin dashboard navigate to the **Developer settings** page. This can be done by activating the Settings section in the left sidebar and clicking `Developer settings`.
2. From the **Developer settings** page click the `Create new API client` button. This button is generally located in the upper right corner of the page.
3. Enter a **Name** for the new API Client that will remind you of the reason for creating this client. This can be as simple as “Violet” or the name of the channel you are connecting to.
4. In the **Scopes** section check ensure that each of the following boxes is checked.

![](https://res.cloudinary.com/ddhjp8mca/image/upload/v1695964420/mintlify/violet_commercetools_min_scopes_uql6bg.png)

5. Click the **`Create API client`** button. Your API Client will now be created.
6. The **`Client ID`** and **`Client Secret`** for the newly created application will now be revealed. Copy these values and keep them available for Step 2 of this guide. *Once you close the screen with the credentials you will no longer be able to see them again.*

## Step 2: Provide App Credentials to Violet

Once you have your **Client ID** and **Client Secret**, it’s time to return to the Violet Connect onboarding tool and enter the follow credentials created in the previous steps:

1. When prompted for your store URL, enter the URL of the storefront, including the protocol, that is powered by your CommerceTools backend. Example - **`https://yourstore.com`.**
2. Enter your **`Client ID`** obtained in the previous steps in the ”**Client ID**” field.
3. Enter your **`Client Secret`** obtained in the previous steps in the ”**Client Secret**” field.
4. Enter your `**Project Key**` in the “**Project Key**” field.
5. Select the **`Region`** your CommerceTools instance operates in. Available options are:
   1. `North America (Google Cloud)`
   2. `North America (AWS)`
   3. `Europe (Google Cloud)`
   4. `Europe (AWS)`
   5. `Australia (Google Cloud)`
6. Enter the URL that includes product page path in the “**Product Path URL**” field. This is the part of the URL that precedes the individual page of each product in your store. As an example, if you sell a product called “Purple Shirt” that is located at `https://yourstore.com/products/purple-shirt` your product path URL would be `https://yourstore.com/products`. This is the value you would enter in this field.

Once entered, click the **Connect** button to validate the credentials and complete the connection between your store and Violet. If the credentials are invalid you should check for any spaces or other copy/paste errors and try again.

Upon success you will be redirected back to the channel who first sent you to Violet.


---

# Agent Instructions: 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:

```
GET https://merchant-help.violet.io/platform-guides/commercetools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
