Integrating with Salsify
You can quickly and easily integrate Commerce with Salsify using the Integrations Hub in Commerce Manager. Integrating Salsify with Commerce means you can synchronize catalog data such as products, price, images, and categories between Commerce and Salsify.
When integrating with third-party providers, we recommend you use the closest region in the third-party service to reduce latency as much as possible. See Regions and URLs table.
Collecting your Setup Information
Collecting Salsify Setup Information
Collect the following setup information from Salsify.
Option | Description |
---|---|
API Base URL | Your Salsify API Base URL. Default value is https://app.salsify.com/api/v1/orgs/ . |
API Key | Your Salsify API Key. To collect your API key, log in to your Salsify account, go to My Profile > API Access, and click Show API Key. |
Organization ID | Your Salsify Organization ID. |
Collecting Commerce Manager Setup Information
To create a new application key, go to SYSTEM > Application Keys.
Commerce API Key | Description |
---|---|
Token URL | Your Commerce API token URL. |
Client ID | Your Commerce Client ID. |
Client Secret | Your Commerce Client Secret. |
Synchronizing from Salsify to Commerce
As part of the Salsify Integration, changes in Catalog data in Salsify automatically updates catalog data in Commerce, and vice versa.
Prerequisites
Ensure that you have collected your setup Information.
Ensure that you have created a price book, hierarchies, and templates in Commerce Manager.
Procedure
In Commerce Manager, go to COMPOSER > Integrations Hub.
Under Product Information, click Salsify
Click Configure. The Salsify integration guides you through the steps you need to follow to complete the integration.
Click Next. The Connection page is displayed.
On the Connection page, do the following:
Complete the Commerce Connection credential details:
- Client-ID - Your Commerce Client ID.
- Client-Secret - Your Commerce Client Secret.
- Token URL - Your Commerce API Token URL
Click Connect. The authorization is successfully completed.
Complete the Salsify Connection credentials:
- API Key - Your Salsify API Key.
- Org Id - Your Salsify Organization ID.
- API Base URL - Your Salsify API Base URL. Default value is
https://app.salsify.com/api/v1/orgs/
.
Click Next. The Templates page is displayed.
You can use templates to send your custom data or attributes to another system using JSONata.
Click Edit under ElasticPath Product Template.
Update the Product Template to map the Commerce product templates and attributes to Salsify.
For example, suppose you want to import Salsify field brand and Feature-2 attributes into commerce Manager. You need to update
templateSlug
andfieldSlug
fields to represent attribute slug in Commerce.The following example shows how this should look in the Product Template.
"attributes":[
[
{
"templateSlug":"products(extension)",
"templateAttributes":[
[
$merge([
($product.Brand ?
{
"fieldSlug":"brand",
"type":"string",
"value":$product.Brand
}
)
]),
$merge([
($product.'Feature-2' ?
{
"fieldSlug":"feature2",
"type":"string",
"value":$product.'Feature 2'
}
)
])
] ~> $filter(function($v, $i, $a) {
$v.value
})
]
}
]
] ~> $filter(function($v, $i, $a) {
$count($v.templateAttributes) > 0
})
Click Edit under ElasticPath Price Template. Update the price book name of Commerce in
priceBookName
field. For example, if the price book name isUKandIEPricebook
in Commerce cloud, update the same in the Price Template. For example:"priceBookName": "UKandIEPricebook"
Click Edit under ElasticPath Node Template. Update the name of the hierarchy created in Commerce in the
hierarchySlug
field. For example:"hierarchySlug": "uk-hierarchy"
Click Next. The Configuration page is displayed.
Enable Salsify to Elastic Path Sync, Enable Salsify Event - Product Creation, and Enable Salsify Event - Product Updates are enabled by default to automatically synchronize from Salsify to Commerce.
(Optional) If you want to trigger full sync, turn on the Enable Full Sync Scheduler toggle. The full sync will be triggered as per the Full Sync Cron Job Time. By default it is disabled. :::note Default value of Full Sync Cron Job Time is
0 0 31 12
. You can set your own time to run the full sync periodically. :::Click Finish. Your integration is enabled.
Synchronizing from Commerce to Salsify
As part of the Salsify Integration, changes in catalog data in Commerce automatically updates catalog data in Salsify, and and vice versa.
Prerequisites
Ensure that you have collected your setup Information.
Procedure
Log in to Salsify account.
Go to More > Properties. The Properties Page is displayed.
To create a new property, go to Actions > New Property. The Create Property page is displayed.
Enter the Name and Data Type, and click Save. You can create as many properties as you want to.
In Commerce Manager, go to COMPOSER > Integrations Hub.
Under Product Information, click Salsify.
Click Configure.
Click Next. The Connection page is displayed.
On Connection page, do the following:
Complete the Commerce Connection credential details:
- Client-ID - Your Commerce Client ID.
- Client-Secret - Your Commerce Client Secret.
- Token URL - Your Commerce API Token URL
Click Connect. The authorization is successfully completed.
Complete the Salsify Connection credentials:
- API Key - Your Salsify API Key.
- Org Id - Your Salsify Organization ID.
- API Base URL - Your Salsify API Base URL. Default value is
https://app.salsify.com/api/v1/orgs/
.
Click Next. The Templates page is displayed.
Click Edit under the Salsify Product Template.
Update the Salsify Product Template with new properties that you have created in the Create Property page in Salsify account.
The following example illustrates mapping all the images from Commerce to
ImageMedium
field in Salsify."ImageMedium": [
relationships.main_image.data.id,
relationships.files.data.id
] ~> $filter(function($img) {
$$.images[$.'salsify:id' = $img]
})Click Next. The Configuration page is displayed.
Enable Salsify to Elastic Path Sync, Enable Salsify Event - Product Creation, and Enable Salsify Event - Product Updates toggles are enabled by default. You can disable these toggles if you don't want to synchronize from Salstify to Elastic Path.
(Optional) To automatically synchronize Elastic Path to Salsify, turn on the Enable Elastic Path Sync to Salsify toggle. It is disabled by default.
(Optional) If you want to trigger full sync, turn on the Enable Full Sync Scheduler toggle. The full sync will be triggered as per the Full Sync Cron Job Time. It is disabled by default.
noteDefault value of Full Sync Cron Job Time is
0 0 31 12
. You can set your own time to run the full sync periodically.Click Finish. Your integration is enabled.
In Commerce Manger, go to SYSTEM> Store Settings > Webhooks to see that the your webhook has been enabled.
Demos
Watch the following videos: