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:
- Log into the Commercetools Merchant Center.
- Navigate to Settings > Developer Settings.
- Click Create new API client.
- Provide a name.
- Under Scopes, make the following selections:
- Categories > View
- Products (all) > View
- Products (published) > View
- At the bottom of the screen, in the download your credentials section, switch to Environment Variables (.env).
- API credentials are displayed. Save these values because you will need them in the next section.
Add integration
In Uniform, open your project.
Navigate to the Integrations tab.
Scroll to the section Browse Integrations.
Click Commercetools.
Click Add to project.
Enter the required fields:
Field Commercetools 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
Enter the optional fields, if applicable:
Field Description Locale Sets the locale for product titles Canvas users see in product fields. Currency Code Sets the currency displayed to Canvas users on products. Click Save.
Next steps
Explore the new parameter types that are available when you configure components using Uniform Canvas.