> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dema.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Commercetools

> Integrating commercetools with our platform allows for the seamless synchronization of orders and inventory data, enhancing your e-commerce operations.

export const HistoricalDataNote = () => <Tip>
    <strong>Historical data recommendation</strong> — For accurate forecasting, marketing-mix modeling, and cohort analytics, we recommend providing data going back to at least two years. Our default start date for data ingestion is <strong>January 1, 2023</strong>. The more historical data available, the better our ML models perform.
  </Tip>;

### Supported data types

<CardGroup cols={3}>
  <Card title="Orders" icon="file-invoice-dollar">
    Customer transactions
  </Card>

  <Card title="Inventory" icon="boxes-stacked">
    Stock levels & product data
  </Card>

  <Card title="Returns" icon="rotate-left">
    Order return details (included in order sync)
  </Card>
</CardGroup>

## Prerequisites

<HistoricalDataNote />

* An API client with the following scopes on your commercetools project:
  * `view_orders` — required for order synchronization
  * `view_products` — required for product and inventory data
  * `view_published_products` — required for inventory verification

## Step-by-step integration guide

<Steps>
  <Step title="Initial setup">
    To set up the integration, you'll need to provide us with specific credentials that allow our platform to access your commercetools data securely.

    1. **Gather required information**: Ensure you have the following details from your commercetools account:

       * Scope
       * API endpoint
       * Auth endpoint
       * Project key
       * Client ID
       * Client secret
       * Store key

    2. **Provide credentials**: Share the collected credentials with your Customer Success Manager.

    <Note>For security reasons, send this information via a secure password sharing method.</Note>

    ```json Commercetools Example theme={null}
    {
      "scope": "view_orders:exampleProject view_products:exampleProject view_published_products:exampleProject",
      "apiEndpoint": "https://api.us-east1.gcp.commercetools.com",
      "authEndpoint": "https://auth.us-east1.gcp.commercetools.com/oauth/token",
      "projectKey": "exampleProject",
      "clientId": "ZZ-z-exampleclientid",
      "clientSecret": "exampleClientSecret",
      "storeKey": "exampleStore"
    }
    ```
  </Step>

  <Step title="Configuring the integration">
    Once your credentials are received, our team will configure the integration, ensuring secure and efficient data synchronization between commercetools and our platform.

    * **Access configuration**: We will use the provided credentials to configure access to your commercetools data, focusing on orders and inventory.

    * **Data synchronization**: Our platform will begin to fetch and sync data based on your specified scope, enabling up-to-date visibility into your e-commerce operations.
  </Step>

  <Step title="Finalizing integration">
    After the integration is configured, you'll be able to access and analyze your orders and inventory data directly from our platform. This integration facilitates better decision-making, helping you optimize your e-commerce strategy for increased efficiency and growth.
  </Step>
</Steps>

## Troubleshooting and support

Should you encounter any issues during the integration process or have questions regarding the setup, our support team is readily available to assist you.

## Additional resources

For more information on managing your commercetools account and understanding the API, visit the [commercetools Documentation](https://docs.commercetools.com/).
