Salesforce Commerce Cloud - sales data

📘

Provided by: Splio
Connector type: source
Third-party system: E-commerce
Available for Splio
• License: Only for CDP
• Add-ons: Predictive AI, Identity Resolution

Overview

This documentation will walk you through the setup of an automatic transfer of data from Salesforce Commerce Cloud (CRM, product catalog, transactions) to Splio.

Prerequisites

  • Download the cartridge from the Salesforce Commerce Cloud AppExchange
  • Save the SFTP credentials that Splio has provided you (URL & username)
  • Contact your Salesforce representative

Unless you have access to the Salesforce Commerce Cloud admin section, you will need to contact your Salesforce representative to complete this setup.

Compatibility

This Cartridge works best with the SFRA version of 4.4.1 and compatibility mode 19.10

Privacy & payment

No credit card details are stored within SFCC using this integration.

Integration components

Components

The Tinyclues Integration has the following cartridges:

  • bc_tinyclues - Business Manager extension cartridge for exporting data to Splio.

Adding the cartridge in Salesforce Commerce Cloud UX Studio

To upload the cartridges into the SFCC server, you first need to add the cartridges in SFCC UX Studio. In order to do this, follow these instructions:

  1. In UX Studio, select in the menu File > Import.
  2. In the import dialog, select General > Existing Projects in the workspace and click on Next.
  3. Ensure Select archive file is selected and select the compressed cartridge file by clicking on the Browse button.
  4. Click on the Finish button to import the cartridges.
  5. Studio will now ask you if you want to link the cartridge to your active DigitalServer connection. Click on Yes or manually link the cartridge to your server by checking the project under project references in the server connection properties.

Business Manager configurations

For the Splio integration to work, the following object structures (metadata) need to be configured in the Business Manager.

Importing metadata

  1. In the cartridge bundle, find jobs.xml file inside the metadata/Tinyclues-meta-import folder.
  2. Open this jobs.xml file in any text editing application
  3. Change all occurrences of email address[email protected]” to any valid merchant email address.
  4. Save the jobs.xml file
  5. Compress (.zip) this file: Tinyclues-meta-import folder. This will generate the Tinyclues-meta-import.zip file.
  6. Go to Business Manager Menu > Administration > Site Development > Site Import & Export
  7. Under Import: Upload Archive: Ensure that the radio button with “Local” label is enabled (If not, click on the radio button to enable it).
  8. Click on Choose File input field, select the Tinyclues-meta-import.zip file from the open dialog box, and click on the upload button
  9. After finishing the upload, from the Archives list, click the radio button corresponding to Tinyclues-meta-import.zip and click on the Import button.
  10. Click on the OK button of the confirmation box asking, “Are you sure that you want to import the selected archive?”

Custom site preferences

After the successful metadata import following attributes should have been created:

In Business Manager, navigate to the Site > Site Preferences > Custom Preferences. Custom site preference groups with the ID Tinyclues General Config will be available after the successful import of metadata. Please select it and edit the attributes as needed.

Find the usage of each custom site preference field below:

  1. SFTP Base Folder Path (ID - TinycluesFolderPath, Type - String) – This is the base folder path in the Splio SFTP server to which all the exported feeds need to be uploaded. The user is expected to create these folders in the SFTP server. Other below-mentioned sub-folders will be automatically generated by relevant jobs.
  2. Products Feed Folder Name (ID - TinycluesProductsFeed, Type - String) – Name of the folder under the base folder to which product feeds need to be uploaded.
  3. Orders Feed Folder Name (ID - TinycluesOrdersFeed, Type - String) – Name of the folder under the base folder to which order feeds need to be uploaded.
  4. Customers Feed Folder Name (ID - TinycluesCustomersFeed, Type - String) – Name of the folder under the base folder to which customers' feeds need to be uploaded.
  5. Products Active Data Feed Folder Name (ID - TinycluesProductsActiveFeed, Type - String) – Name of the folder under the base folder to which products active data feeds need to be uploaded.
  6. Customers Active Data Feed Folder Name (ID - TinycluesCustomersActiveFeed, Type - String) – Name of the folder under the base folder to which customers' active data feeds need to be uploaded.
  7. Service Name (ID - TinycluesServiceName, Type - String) – Keep Tinyclues’ service object’s name here. Service object names are available at Business Manager Menu > Administration > Operations Services
  8. SFTP Connection Type (ID - TinycluesSftpConnectionType, Type – Enum of String) – Specify the SFTP connection method here. 2 possible values:
    1. Password: The password of the SFTP account must be kept under Service Credential Object which can be found under Business Manager Menu > Administration > Operations > Services > Service Credentials
    2. Private Key: Go to Business Manager Menu > Administration > Operations > Private Keys and Certificates. Import private key (Explained in subtitle 2.3.4). Keep Private Key Alias to refer it through the connector.

In both of the above cases, the SFTP host URL and SFTP Username must be kept under the Service Credential Object.

  1. Private Key Alias (ID – TinycluesPrivateKeyAlias, Type - String) – If the value selected for the custom site preference field ‘SFTP Connection Type’ is ‘Private Key’ then enter private key alias here.

How to generate a P12 private key file from a PEM file

  1. Identify the style of the PEM file

Check whether the PEM file is of PKCS1 or PKCS8 style. For that run the following command in the command terminal where the file resides. (Guessing that file name is id_rsa_sfcc.pem)

head -1 id_rsa_sfcc.pem && tail -1 id_rsa_sfcc.pem

You will see the following output in either of the cases:

  • If the file is PKCS1 style

-----BEGIN RSA PRIVATE KEY-----

-----END RSA PRIVATE KEY-----

  • If the file is PKCS8 style

-----BEGIN PRIVATE KEY-----

-----END PRIVATE KEY-----

If you find your PEM file is of PKCS1 style, then convert it into PKCS8 style.

  1. Convert PKCS1 into PKCS8 style
  • Generate .CSR file

Run following command to generate .CSR file:

openssl req -new -days 3650 -key p8_id_sfcc.pem -out id_sfcc.csr

It will ask to enter several details like Country Name, Email Address. Enter all the details as you wish, except challenge password. It is recommended to leave the challenge password blank.

  • Generate .CER file

Run the following command:

openssl x509 -days 3650 -signkey p8_id_sfcc.pem -req -in id_sfcc.csr -out id_sfcc.cer

  • Generate .P12 private keyt file

Run the following command:

openssl pkcs12 -export -out id_sfcc.p12 -inkey p8_id_sfcc.pem -in id_sfcc.cer -certfile id_sfcc.cer

How to import .P12 file into Salesforce Commerce Cloud

  • Go to Business Manager Menu > Administrator > Operations > Private Keys and Certificates
  • Find the Import button on top right corner of the page and click on it
  • In the popup window titled as Import Private Key or Certificate click on Select button to choose the .P12 file from local system
  • Enter any single word as mandatory field Alias
  • Hit Save button
  • Copy this Alias text and enter in to the custom site preference field – Private Key Alias2.3.5 SFTP SERVICE OBJECT
  • Go to Business Manager Menu > Administrator > Operations > Services
  • Ensure that there is a service object namely “Tinyclues.service.sftp”
  • Open the credential object namely “Tinyclues.credentials.sftp”
  • Enter the URL and username which you received from Tinyclues as part of the SFTP credentials
  • Keep the correct password if the custom site preference field “SFTP Connection Type” is set as “Password”
  • Keep the password blank if the custom site preference field “SFTP Connection Type” is set as “Private Key”

Jobs

Go to Business Manager Menu > Administrator > Operations > Jobs

The following are the Splio jobs:

Full Export

  • TinycluesFullExportProducts
  • TinycluesFullExportOrders
  • TinycluesFullExportCustomers

Delta Export

  • TinycluesDeltaExportProducts
  • TinycluesDeltaExportOrders
  • TinycluesDeltaExportCustomers