Set Up Point of Sale Connector for Salesforce Core CRM Connector

Use REST APIs to integrate POS with the Salesforce Core CRM Connector for clienteling purposes. Create a Salesforce Connected App in Salesforce for Point of Sale to access the requisite APIs. The primary objects of interaction are Accounts and Notes. POS provides capabilities like search, create, and update for customer accounts that are maintained in Salesforce Core CRM.

Customer must have a Salesforce Core product that has access to Person Account objects. This object is available with core products, including but not limited to Service, Sales, Field Service, Order Management, and other industry clouds. Work with your Salesforce Account Executive to confirm your access to the right supporting Salesforce Product to use as your POS CRM source.

Refer to POS Access List - URLs and IP Addresses for a list of URLs and IP addresses to be allowlisted. This is to turn on the necessary communication. Turn on the Person Accounts feature in your Salesforce environment. Point of Sale's API connectors use queries for "Person Account" account types. It won't function if not turned on.

  1. In CMS, go to Integrations | CRM Configuration.
  2. Fill out the fields .
    Field Section Field Type Required Description Example
    URL base General Settings Text Yes The URL base of your Salesforce Core CRM. https://urlbase.com
    API Version General Settings Text Yes The API version of your Salesforce Core CRM. v51.0
    Username User Text Yes The username of your Salesforce Core CRM account. username123
    Password User Text Yes The password of your Salesforce Core CRM account. password123
    Client ID Client Text Yes The client ID of your Salesforce Core CRM. myClientId
    Client Secret Client Text Yes The client secret of your Salesforce Core CRM. myClientSecret
    Alternate Customer Identifier General Settings Text No The Custom Field name in Salesforce Core CRM that identifies the corresponding customer.  
  3. Click SAVE in the upper right-hand of the screen.
    Note
    Note Custom Account and Custom Account Data configurations are automatically updated to Salesforce Core CRM Connector specific Account classes in the Merchant Configuration (CMS > Advanced > Merchant Configuration > Checkout Settings) when the Salesforce Core CRM Configuration is created for the first time.
Note
Note Using SFCC as a CRM with SFOM for orders may cause issues because their customer identifiers don’t align. SFCC’s customer ID isn’t available in SFOM, but the Salesforce Core CRM customer ID is visible in SFOM.

POS Flows

  • Search Customer/Account
  • Fetch Customer Profile
  • Sign up new Customers
  • Update Customer Profile
  • Fetch Notes
  • Create New Notes
  • Update Notes
  • Delete Note

Reference Architecture

Understand the architecture of the integration between the Point of Sale Cloud, Salesforce Core CRM Connector, and app.

A block diagram outlines integration between Point of Sale cloud, Salesforce Core CRM Connector, and the app

POS UI - Salesforce Core CRM Mapping

Get details of the mapping between Point of Sale and Salesforce Core CRM objects.

POS Screens Point of Sale Object Salesforce Core CRM Objects
  • Customer Search
  • Clienteling Screen/Customer Profile
  • Create New Customer SignUp
  • Update Customer Profile
  • Checkout
Customer Account
  • Clienteling - Add, Update, Delete notes
CustomerNote ContentDocument, ContentDocumentLink, ContentNote

Salesforce Core CRM Integration Details

See the connected APP creation steps.

Salesforce Core CRM Connector APIs

Get details of the Salesforce Core CRM Connector APIs.

Authorization: Session ID based Authorization

API: /services/oauth2/token

grant_type:password

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart_oauth.htm

Customer Search

API:

Parameterized Search: /services/data/v<>/parameterizedSearch

SOQL Base Search: /services/data/v<>/query?q=

SObject: Account

When using Person Accounts, an account of the Person Account record type represents an individual shopper. When not using Person Accounts, a standard account and contact together represent an individual shopper. A business account shopper always has a standard account and contact.

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_account.htm

HTTP Method GET
API Reference

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_search_parameterized.htm

Fetch Customer Profile

API:

Get Account By ID: /services/data/v<>/sobjects/Account/<AccountID>

HTTP Method GET
Reference https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_retrieve.htm

Update Customer Profile

API:

Update Account: /services/data/v<>/sobjects/Account/<AccountID>

HTTP Method PATCH
Reference https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_update_fields.htm

Get Notes List

API:

SOQL based retrieve notes: /services/data/v<>/query?q=

HTTP Method GET
SOQL

SELECT contentDocument.Id,

contentDocument.Title, contentDocument.CreatedDate,

contentDocument.LastModifiedDate, contentDocument.latestPublishedVersion.versionData

from ContentDocumentLink where linkedEntityId = \'<AccountID>\' and contentDocument.fileType=\'SNOTE\' order by contentDocument.LastModifiedDate desc";

Reference https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contentdocumentlink.htm

Get Notes Test

API: /services/data/v<>/sobjects/sObject/id/<latest published versionData>

HTTP Method GET

Update Note

API: /services/data/v<>/sobjects/ContentNote/<contentNoteId, i.e. contentDocument.id>

HTTP Method PATCH

Delete Note

API: /services/data/v<>/sobjects/ContentNote/<contentNoteId, i.e.contentDocument.id>

HTTP Method DELETES

Create Note & Create Document Link with Account/Customer

API: /services/data/v<>/sobjects/ContentNote

API: %s/services/data/v<>/sobjects/ContentDocumentLink

HTTP Method POST for both APIs

Object-Attribute Mapping

Get details of the object to attribute mapping.

Point of Sale Customer Object Salesforce Core CRM Account Object
customerData.profile.firstName Account.FirstName
customerData.profile.lastName Account.LastName
customerData.profile.customerId Account.ID
customerData.profile.salutation Account.Salutation
customerData.profile.phoneMobile Account.Phone
customerData.profile.email Account.PersonEmail
customerData.profile.address Account.BillingAddress
customerData.profile.addressList[1] Account.ShippingAddress
customerData.consents.newsLetterSignUp Account.PersonHasOptedOutOfEmail

Available POS Clienteling Fields can be mapped to and from custom fields on Salesforce Core CRM side if required.

Example:

  • customerData.profile.alternateCustomerID
  • customerData.profile.birthday
  • customerData.profile.birthmonth
  • customerData.consents.newsLetterSignUp
  • customerData.profile.CustomerGroup
  • customerData.storeId
  • customerData.associateId
  • etc.

If POS Clienteling or User Profile field needs to be mapped to or from Merchant defined custom field in SFSC, then that shall be called out and configured. Merchant should provide exact custom field which they have already defined in SFSC Person Account object.

Example:

  • customerData.profile.alternateCustomerID can be mapped to/from Account.Customer_Number__c on Salesforce Core CRM side.
  • customerData.profile.birthday can be mapped to/from Account.BirthDay__pc on SFSC side.
  • customerData.profile.birthday can be mapped to/from Account.BirthMonth__pc on SFSC side.
  • customerData.consents.newsLetterSignUp can be mapped to/from Account.POSEmailOptIn__pc on Salesforce Core CRM side.
  • customerData.profile.CustomerGroup can be mapped to/from Account.CustomerGroup__pc on Salesforce Core CRM side.
  • customerData.storeId can be mapped to/from Account.Store_id__pc on Salesforce Core CRM side.
  • customerData.associateId can be mapped to/from Account.Opt_in_EmployeeID__c on SFSC side.
  • etc.
Point of Sale CustomerNote Object Salesforce Core CRM Objects
customerNote.noteId ContentDocument.Id
customerNote.title ContentDocument.Title
NA ContentDocument.CreatedDate
customerNote.updateTimeStamp ContentDocument.LastModifiedDate
NA ContentDocument.LatestPublishedVersion
customerNote.title ContentNote.title
customerNote.noteText ContentNote.Content
customerData.profile.customerId ContentDocumentLink.LinkedEntityId
From SFSC - ContentNote.Id ContentDocumentLink.ContentDocumentId
“V” contentDocumentLink.ShareType