Skip to main content

Add Uniform integration

Adding the Commercetools integration to your Uniform project adds new parameter types that you can add to your Uniform Canvas components.

Before you start

You must the following available in order to complete this setup:

  • Commercetools account with administrator access.
  • Uniform account with administrator access. If you do not already have one, you can sign up for a free account at https://uniform.app.

Get connection settings

In order to configure a connection to Commercetools, you need to create an API client. This gives you the settings that will enable Uniform to use the Commercetools API:

  1. Log into the Commercetools Merchant Center.
  2. Navigate to Settings > Developer Settings.
  3. Click Create new API client.
  4. Provide a name.
  5. Under Scopes, make the following selections:
    • Categories > View
    • Products (all) > View
    • Products (published) > View
  6. At the bottom of the screen, in the download your credentials section, switch to Environment Variables (.env).
  7. API credentials are displayed. Save these values because you will need them in the next section.

Add integration

  1. In Uniform, open your project.

  2. Navigate to the Integrations tab.

  3. Scroll to the section Browse Integrations.

  4. Click Commercetools.

    add-integration-to-project
  5. Click Add to project.

    settings-empty
  6. Enter the required fields:

    FieldCommercetools environment variable
    API Url
    CTP_API_URL
    Auth URL
    CTP_AUTH_URL
    Client ID
    CTP_CLIENT_ID
    Client Secret
    CTP_CLIENT_SECRET
    Project Key
    CTP_PROJECT_KEY
  7. Enter the optional fields, if applicable:

    FieldDescription
    LocaleSets the locale for product titles Canvas users see in product fields.
    Currency CodeSets the currency displayed to Canvas users on products.
  8. Click Save.

Next steps

Explore the new parameter types that are available when you configure components using Uniform Canvas.