Set Up Consumer Goods Cloud Processing Services

To maintain uninterrupted connectivity with and access to the Salesforce org, create a connected app and pair the Salesforce org with the CG Cloud Processing Service.

Required Editions

Available in: Lightning Experience
Available in: Enterprise and Unlimited Editions that have Consumer Goods Cloud enabled
User Permissions Needed
To set up Consumer Goods Cloud Processing Services: CGC Cloud Processing Services Register

Configure Replication Fields in Complex Pricing Condition

Get better performance on data replication in the mobility app by configuring the two replication fields in the Complex Pricing Condition object. The two replication fields are created when you upgrade the managed package.

The replication rule uses the Replication_Key_id__c field by default for replicating data by using the mobile app. To improve the replication performance, use these fields instead of the Replication_Key_id__c field:

Field Name References
Replication_Account__c account ID
Replication_Sales_Organization__c sales organization ID
  1. To migrate the existing data from Replication_Key_id__c to these fields, run a batch process by running this code on an anonymous window from the developer console:
    cgcloud.CGCloudBatch.executePostInstallBatch('BatchPPPConditionsReplicationFields', 2000);

    If Replication_Key_id__c is blank, the batch process updates the Replication_Sales_Organization__c field with the sales organization ID specified in the Sales_Org__c field.

    If Replication_Key_id__c contains an account ID, the batch process updates the Replication_Account__c field with that account ID.

  2. To retrieve the Salesforce ID of the user’s salesOrg, adjust your synchronization rules by creating a named query.
    1. From the App Launcher, find and select Sync Management.
    2. On the Sync Configuration tab, select Named Queries.
    3. Locate the Limited Distribution section and within that section, click New to create the named query. Use this definition:
      Bindable Name SOQL Statement
      SalesOrganizationId Select Id from cgcloud__Sales_Organization__c where Name = $User.cgcloud__Mobility_Sales_Org__c
  3. To verify that the configuration works as expected, click Execute.
  4. To update the where condition for the Complex Pricing Condition object, go to Sync Configuration | Tracked Objects
    1. Edit the Complex Pricing Condition object.

      If you haven’t changed the default configuration provided by the demo data, the “where” condition is similar to:

      cgcloud__Sales_Org__c = $User.cgcloud__Mobility_Sales_Org__c AND cgcloud__Valid_From__c <= NEXT_N_DAYS:14 AND cgcloud__Valid_Thru__c >= LAST_N_DAYS:14 AND ( cgcloud__Replication_Key_id__c ='<EMPTY>' OR cgcloud__Replication_Key_id__c IN ::RelevantHierarchyAccountsForUser:: )
    2. Update the where condition with the new fields:
      cgcloud__Valid_From__c <= NEXT_N_DAYS:14 AND cgcloud__Valid_Thru__c >= LAST_N_DAYS:14 AND (cgcloud__Replication_Account__c IN ::RelevantHierarchyAccountsForUser:: OR cgcloud__Replication_Sales_Organization__c IN ::SalesOrganizationId:: )
  5. To verify that the configuration works as expected, click Execute.
  6. Save the configuration.

Create a Self-Signed Certificate

Log in to your Consumer Goods Cloud org to create a self-signed certificate. You must create a self-signed certificate before you create a connected app.

  1. From Setup, in the Quick Find box, enter Certificate and Key Management, and then select Certificate and Key Management.
  2. Click Create Self-Signed Certificate, and then enter these details.
    • Label: CGCloud_Services
    • Unique Name: CGCloud_Services
    • Key Size: 2048
  3. Select Exportable Private Key.
  4. Save your changes.

Register the Processing Service

Use the self-signed certificate to register your processing service.

  1. From Setup, in the Quick Find box, enter Processing Services and select it.
  2. Register the processing service.
    Register processing service

    If you already have a certificate, you can use that certificate for registration.

Replace the Self-Signed Certificate

When your self-signed certificate expires, you receive an email notification. To prevent any disruption to your Consumer Goods Cloud services, replace the expiring certificate with a new one before the expiration date.

Required Editions

Available in: Lightning Experience in Enterprise and Unlimited Editions that have Consumer Goods Cloud enabled
User Permissions Needed
To replace a certificate: CG Cloud Processing Services Register
  1. From Setup, in the Quick Find box, enter Certificate and Key Management, and then select Certificate and Key Management.
  2. Find the CGCloud_Services certificate with the approaching expiration date.
  3. In the row for that certificate, click Del.
  4. Click Create New Certificate.
  5. Enter the certificate details.
    • Label: CGCloud_Services
    • Unique Name: CGCloud_Services
  6. Click Save.
  7. From Setup, in the Quick Find box, enter Feature Settings, and then select Feature Settings.
  8. In the Consumer Goods Cloud section, click Processing Services.
  9. Register the processing service.
    The registration uses the new self-signed certificate you created.

    When you add or renew the CGCloud_Services self-signed certificate, click Register again. The registration doesn't update automatically, even if the tenant appears as registered.

Download the Public Key

Use the Processing Services Pairing App to download the public key to use digital signatures in your connected app.

In Setup, on the Processing Services page, register the Processing Services.

  1. From the App Launcher, find and select Processing Services Pairing App.
  2. Click Download Certificate.
    The ProcessingServices.crt file is downloaded and valid for 60 minutes.

Create an External Client App

To authenticate, authorize, and integrate your Salesforce org with Consumer Goods processing services, create an external client app.

Important
Important Connected apps creation is restricted as of Spring ‘26. You can continue to use existing connected apps during and after Spring ‘26. However, we recommend using external client apps instead. If you must continue creating connected apps, contact Salesforce Support.

See New connected apps can no longer be created in Spring ‘26 for more details.

  1. From Setup, in the Quick Find box, enter Apps, and then select External Client App Manager.
  2. Click New External Client App.
  3. Enter a name for the app.
  4. Enter contact email ID.
  5. Select Enable OAuth Settings.
  6. In Callback URL, enter https://login.salesforce.com/services/oauth/success.If you are using a testing sandbox, use https://test.salesforce.com/services/oauth/success.
  7. In Selected OAuth Scopes, select these options:
    • Access the identity URL service  (id, profile, email, address, phone)
    • Access unique user identifiers (openid)
    • Manage user data via APIs  (api)
    • Perform requests at any time  (refresh_token, offline_access)
  8. From the Flow Enablement section, select Enable JWT Bearer Flow.
  9. Upload the public key that you downloaded.
    If the pairing process isn’t completed within an hour after you download the public key, download another public key and upload it. See Download a Public Key.
  10. If selected, deselect all security settings.
  11. Click Create.
    External client app is successfully created.
  12. Assign access to user profiles and edit policies.
    1. Click Policies, and then click Edit.
    2. In the OAuth Policies section, from Permitted Users, select Admin approved users as pre-authorized.
    3. Confirm your changes.
    4. Select the required profiles and permission sets.
    5. Save your changes.
  13. Copy consumer key.
    1. Click Setting.
    2. In the OAuth Settings, click Consumer Key and Secrets.
    3. Enter the verification code, and click Verify.
    4. Copy the consumer key.
    You need the consumer key to complete the pairing.

Complete the Pairing

Complete the pairing in the Processing Services Pairing App and schedule a maintenance slot.

  1. From the App Launcher, find and select Processing Services Pairing App.
  2. In the Processing Services Pairing App, click Start.
    1. Enter the consumer key.
    2. Select the users.
      For Processing Service User, select users who sync data between Hyperforce and Salesforce. Only users who have the CGC Processing Services Register permission set are listed.
  3. To schedule a time slot for maintenance activities, enter a day and time.
    The day and time are based on your Salesforce org’s time zone. During this time, the system performs maintenance activity off-core, and the tenant goes into the Maintenance state.
  4. Click Connect.

Configure User Access for Processing Services

Configure user access to objects for each processing service.

Note
Note To send email notifications, a Processing Services user must have a verified email address.
  1. From the App Launcher, find and select Processing Services Pairing App.
  2. Click Manage Users and Services, and select the users.
    For Processing Service User, select users who must sync data between Hyperforce and Salesforce.
  3. Click Next, and select these services:
    If you started to use the Consumer Goods Managed package before Summer ’24, your Processing Service user needs these permission sets to run the respective batches.
    Service Permission Set Required
    Pricing Condition Condensation Batch CGCloud Advanced Pricing Worker
    Hierarchy Org Unit Batch CGCloud Org Unit Hierarchy Flattening Worker
    Hierarchy Customer Batch CGCloud Account Hierarchy Flattening Worker
    Manage CGCloud Processing Services CGC Processing Services Register
    Segmentation Batch CGCloud Account Segmentation Worker
    If you started to use the Consumer Goods Cloud Managed package in Summer ’24, your Processing Service user needs these permission sets to run the respective batches.
    Service Permission Set Required
    Pricing Condition Condensation Batch CGCloud Retail Advanced Pricing Worker
    Hierarchy Org Unit Batch CGCloud Retail Org Unit Hierarchy Flattening Worker
    Hierarchy Customer Batch CGCloud Retail Account Hierarchy Flattening Worker
    Manage CGCloud Processing Services CGC Processing Services Register
    Segmentation Batch CGCloud Retail Account Segmentation Worker
  4. Click Connect.
    Important
    Important If the username for a selected user is changed, the user is no longer associated with the processing service. Re-pair relevant users to continue to use the processing service.

Replace the Self Signed Certificate for Your Connected App

The certificate used for pairing the connected app is valid for one year, and you receive an email 30 days before it expires. You can also check the certificate's expiration date in the Processing Services Pairing app.

Important
Important Before you replace the certificate, make sure that all users configured in the connected app are active users.
  1. Download a new certificate.
    1. From the App Launcher, find and select Processing Services Pairing App.
    2. Click Down arrow image, and then select Download Certificate.
      The downloaded certificate is valid for only 60 minutes. Replace the expiring certificate and confirm the replacement within 60 minutes of the download.
    The ProcessingServices.crt file is downloaded.
  2. Replace the expiring certificate with the new certificate.
    1. From Setup, in the Quick Find box, find and select App Manager.
    2. For the app that you want to replace the certificate, click Edit.
    3. To upload the new certificate, next to Use digital signatures, click Choose File, and then select the certificate that you downloaded.
    4. Save your changes.
  3. Confirm the replacement of the certificate.
    1. From the App Launcher, find and select Processing Services Pairing App.
    2. Click Confirm Certificate Replacement.

Configure Session Settings for Consumer Goods Cloud Processing Services

When you create sessions, Consumer Goods Cloud can interact with multiple environments, such as Hyperforce. As a result, IP addresses aren’t static. To avoid errors when you commit and promote changes, disable the session setting and lock sessions to the IP address that they originate from.

  1. From Setup, in the Quick Find box, enter Session Settings, and then select Session Settings.
  2. Deselect Lock sessions to the IP address from which they originated.