Salesforce Commerce Cloud is not a whole ecommerce platform. Merchants typically attach an Order Management System (OMS) and Inventory Management System (IMS) to their SFCC store to create a whole solution. Violet is unable to access these OMS and IMS platforms through the SFCC API so we must integrate directly with these tools as well. We ask that merchants share the name(s) of their OMS and/or IMS tools with the channel they are connecting with so that Violet can ensure that it covers those tools with direct integrations.
This guide is intended for Salesforce Commerce Cloud merchants who are connecting their store to Violet. During the connection process, the merchant will configure their store to connect it to Violet. Total time for completion is around 20 minutes.
From the account manager you will create and configured a new API Client for use by Violet. You can learn more about API Clients in the Salesforce Commerce Cloud documentation. The API Client should be created while you are logged into the account who’s email address you will be sharing with Violet.
Navigate to the Account Manager and sign in. The email address used to sign in is the Account Manager Email Address value in Violet Connect.
From the left sidebar menu click API Client.
Click the Add API Client button.
Enter a display name that will help you identify this API client with Violet.
Enter a secure password. This is the OCAPI Client Password value in Violet Connect.
Ensure that Access Control is Enabled.
Add your organization to the client.
If you are testing with a Sandbox store follow these steps:
a. Search for the Sandbox API User
role and select the role.
b. To assign the role to the API client, click Add.
c. Select the filter icon to specify the role scope.
d. In the Add Instance Filters tab, select your organization.
e. Enter the names of the instances to which you want the API client to have access.
f. Select the instances.
g. Click Add.
In the Default Scopes field, enter the following values:
mail
roles
tenantFilter
profile
openId
Enter the following in the redirect URL field: https://admin.us01.dx.commercecloud.salesforce.com/oauth2-redirect.html.
In the Token Endpoint Auth Method selector select client_secret_post
.
In the Access Token Format selector select JWT
.
Click the Save button.
As the new API client is created, an ID will be generated. Keep track of this value as it will be used in the next step. This is the OCAPI Client ID value in Violet Connect.
Next you will configure the OCAPI. This will require you to enter the following code snippets into the OCAPI configuration area of your system for both the Data and Shop API’s.
Data
.Global
.CLIENT_ID_FROM_PREVIOUS_STEP_HERE
with the ID of the API Client you created in the previous step.Shop
.CLIENT_ID_FROM_PREVIOUS_STEP_HERE
with the ID of the API Client you created in the previous step.Next you will generate an Access Key which acts as a password with access limited only to the OCAPI. Violet will use the key when accessing your system through the OCAPI.
Agent User Login and OCAPI
scope and click the Generate button. Note: If the Agent User Login and OCAPI
is not listed it means there is already a key generated with this scope. If you have that key available, you are done with this section. If not you must responsibly delete the existing key and generate a new one.Next you will configure a new payment method that will be utilized by Violet when submitting orders back into your system. This will involve creating a new Customer Group, Payment Processor, and Payment Method, each of which will only be utilized by Violet.
Static
as the type.VIOLET_API
as the customer group ID. Optionally enter a description indicating that this customer group is for customers created through the Violet API.VIOLET_API
as the ID then click the Apply button to save it.VIOLET_API
as the payment method ID and Violet
as the payment method name.Yes
.VIOLET_API
customer group and click the Assign button to apply it to the payment method. This will limit the payment method to only orders created by Violet.VIOLET_API
.Through the OCAPI connection that was configured in the previous steps Violet will be able to provide end-to-end commerce functionalities for the channels connected to your store. There are a few functionalities though that are not available in the OCAPI and can only be enabled through the SCAPI. These include the following:
If the automation of these actions is important to your operations than you will need to perform the following additional steps.
f_ecom_[Realm ID]_[Instance ID]
. As an example, if your Organization ID is f_ecom_aaaa_001
your Realm ID is aaaa
and your instance ID is 001
. These are the Realm ID and Instance ID values in Violet Connect.From the account manager you will create and configured a new API Client for use by Violet. You can learn more about API Clients in the Salesforce Commerce Cloud documentation. The API Client should be created while you are logged into the account who’s email address you will be sharing with Violet.
Next you will create a new API Client. Unfortunately SFCC does not allow us to use the same API Client that was created for OCAPI when interacting SCAPI. You will be performing the same actions you did when configuring the OCAPI Client, but with slightly different Roles and Scopes.
Navigate to the Account Manager and sign in.
From the left sidebar menu click API Client.
Click the Add API Client button.
Enter a display name that will help you identify this API client with Violet.
Enter a secure password. This is the SCAPI Client Password value in Violet Connect.
Ensure that Access Control is Enabled.
Add your organization to the client.
Under Roles perform the following steps:
a. Search for the Salesforce Commerce API
role and select the role.
b. To assign the role to the API client, click Add.
c. Select the filter icon to specify the role scope (the scope is required by the Salesforce Commerce API).
d. In the Add Instance Filters tab, select your organization.
e. Enter the names of the instances to which you want the API client to have access.
f. Select the instances.
g. Click Add.
In the Default Scopes field, enter the following values:
mail
roles
tenantFilter
profile
openId
sfcc.shopper-baskets-orders.rw
sfcc.orders.rw
sfcc.catalogs.rw
sfcc.products.rw
https://admin.us01.dx.commercecloud.salesforce.com/oauth2-redirect.html.
client_secret_post
.JWT
.As there is no concept of refunds in both the OCAPI and SCAPI, Violet is unable to be notified of refunds or access any refund data. As a temporary workaround, you will need to perform one of the following steps.
Option 1: Mark Order as Cancelled
This option requires the least amount of effort. Simply mark any Violet orders as cancelled
when the order is refunded and Violet will treat it as a refund.
Option 2: Notify Violet of Refunds This option will likely require the involvement of your engineering team. When a refund occurs, you will need to send information about the refund to Violet so that it can process the refund accordingly. If you choose this option, the integration documentation will be shared with you by Violet or the channel that onboarded you.
Whats Next Violet will begin integrating with the order management systems that you connect to your Salesforce Commerce Cloud stores. Once we have an integration with the OMS you use you will be able to remove/skip the above fallback options as Violet will be able to discover refunds automatically.
Salesforce Commerce Cloud is not a whole ecommerce platform. Merchants typically attach an Order Management System (OMS) and Inventory Management System (IMS) to their SFCC store to create a whole solution. Violet is unable to access these OMS and IMS platforms through the SFCC API so we must integrate directly with these tools as well. We ask that merchants share the name(s) of their OMS and/or IMS tools with the channel they are connecting with so that Violet can ensure that it covers those tools with direct integrations.
This guide is intended for Salesforce Commerce Cloud merchants who are connecting their store to Violet. During the connection process, the merchant will configure their store to connect it to Violet. Total time for completion is around 20 minutes.
From the account manager you will create and configured a new API Client for use by Violet. You can learn more about API Clients in the Salesforce Commerce Cloud documentation. The API Client should be created while you are logged into the account who’s email address you will be sharing with Violet.
Navigate to the Account Manager and sign in. The email address used to sign in is the Account Manager Email Address value in Violet Connect.
From the left sidebar menu click API Client.
Click the Add API Client button.
Enter a display name that will help you identify this API client with Violet.
Enter a secure password. This is the OCAPI Client Password value in Violet Connect.
Ensure that Access Control is Enabled.
Add your organization to the client.
If you are testing with a Sandbox store follow these steps:
a. Search for the Sandbox API User
role and select the role.
b. To assign the role to the API client, click Add.
c. Select the filter icon to specify the role scope.
d. In the Add Instance Filters tab, select your organization.
e. Enter the names of the instances to which you want the API client to have access.
f. Select the instances.
g. Click Add.
In the Default Scopes field, enter the following values:
mail
roles
tenantFilter
profile
openId
Enter the following in the redirect URL field: https://admin.us01.dx.commercecloud.salesforce.com/oauth2-redirect.html.
In the Token Endpoint Auth Method selector select client_secret_post
.
In the Access Token Format selector select JWT
.
Click the Save button.
As the new API client is created, an ID will be generated. Keep track of this value as it will be used in the next step. This is the OCAPI Client ID value in Violet Connect.
Next you will configure the OCAPI. This will require you to enter the following code snippets into the OCAPI configuration area of your system for both the Data and Shop API’s.
Data
.Global
.CLIENT_ID_FROM_PREVIOUS_STEP_HERE
with the ID of the API Client you created in the previous step.Shop
.CLIENT_ID_FROM_PREVIOUS_STEP_HERE
with the ID of the API Client you created in the previous step.Next you will generate an Access Key which acts as a password with access limited only to the OCAPI. Violet will use the key when accessing your system through the OCAPI.
Agent User Login and OCAPI
scope and click the Generate button. Note: If the Agent User Login and OCAPI
is not listed it means there is already a key generated with this scope. If you have that key available, you are done with this section. If not you must responsibly delete the existing key and generate a new one.Next you will configure a new payment method that will be utilized by Violet when submitting orders back into your system. This will involve creating a new Customer Group, Payment Processor, and Payment Method, each of which will only be utilized by Violet.
Static
as the type.VIOLET_API
as the customer group ID. Optionally enter a description indicating that this customer group is for customers created through the Violet API.VIOLET_API
as the ID then click the Apply button to save it.VIOLET_API
as the payment method ID and Violet
as the payment method name.Yes
.VIOLET_API
customer group and click the Assign button to apply it to the payment method. This will limit the payment method to only orders created by Violet.VIOLET_API
.Through the OCAPI connection that was configured in the previous steps Violet will be able to provide end-to-end commerce functionalities for the channels connected to your store. There are a few functionalities though that are not available in the OCAPI and can only be enabled through the SCAPI. These include the following:
If the automation of these actions is important to your operations than you will need to perform the following additional steps.
f_ecom_[Realm ID]_[Instance ID]
. As an example, if your Organization ID is f_ecom_aaaa_001
your Realm ID is aaaa
and your instance ID is 001
. These are the Realm ID and Instance ID values in Violet Connect.From the account manager you will create and configured a new API Client for use by Violet. You can learn more about API Clients in the Salesforce Commerce Cloud documentation. The API Client should be created while you are logged into the account who’s email address you will be sharing with Violet.
Next you will create a new API Client. Unfortunately SFCC does not allow us to use the same API Client that was created for OCAPI when interacting SCAPI. You will be performing the same actions you did when configuring the OCAPI Client, but with slightly different Roles and Scopes.
Navigate to the Account Manager and sign in.
From the left sidebar menu click API Client.
Click the Add API Client button.
Enter a display name that will help you identify this API client with Violet.
Enter a secure password. This is the SCAPI Client Password value in Violet Connect.
Ensure that Access Control is Enabled.
Add your organization to the client.
Under Roles perform the following steps:
a. Search for the Salesforce Commerce API
role and select the role.
b. To assign the role to the API client, click Add.
c. Select the filter icon to specify the role scope (the scope is required by the Salesforce Commerce API).
d. In the Add Instance Filters tab, select your organization.
e. Enter the names of the instances to which you want the API client to have access.
f. Select the instances.
g. Click Add.
In the Default Scopes field, enter the following values:
mail
roles
tenantFilter
profile
openId
sfcc.shopper-baskets-orders.rw
sfcc.orders.rw
sfcc.catalogs.rw
sfcc.products.rw
https://admin.us01.dx.commercecloud.salesforce.com/oauth2-redirect.html.
client_secret_post
.JWT
.As there is no concept of refunds in both the OCAPI and SCAPI, Violet is unable to be notified of refunds or access any refund data. As a temporary workaround, you will need to perform one of the following steps.
Option 1: Mark Order as Cancelled
This option requires the least amount of effort. Simply mark any Violet orders as cancelled
when the order is refunded and Violet will treat it as a refund.
Option 2: Notify Violet of Refunds This option will likely require the involvement of your engineering team. When a refund occurs, you will need to send information about the refund to Violet so that it can process the refund accordingly. If you choose this option, the integration documentation will be shared with you by Violet or the channel that onboarded you.
Whats Next Violet will begin integrating with the order management systems that you connect to your Salesforce Commerce Cloud stores. Once we have an integration with the OMS you use you will be able to remove/skip the above fallback options as Violet will be able to discover refunds automatically.