commercetools

commercetools allows you to create powerful, highly customized commerce experiences while building a profitable, sustainable brand.

This integration allows business users to build personalized landing pages and storefronts by repurposing product content from your commercetools product catalog. It also enables developers to use their preferred front-end tools to build these applications.

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 to complete this setup:

  • commercetools account with administrator access.
  • Uniform account with administrator access. If you don't already have one, you can request an account at https://uniform.dev/try.

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.
  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 UrlCTP_API_URL
    Auth URLCTP_AUTH_URL
    Client IDCTP_CLIENT_ID
    Client SecretCTP_CLIENT_SECRET
    Project KeyCTP_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.