---
schema_version: "1"
id: 6697f55eb09059adf510927f2431d3408321f0b6fa2cd8cc7b48ce87097deb46
title: Set Up Consumer Goods Cloud Processing Services
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/cg_concept_admin_pair_processing_service.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.cg_concept_admin_pair_processing_service.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2a8562f8b31dfdddf6971410e4d2d21dee0166b93e59397de544bd60bb21142f
description: 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.
products:
  - Consumer Goods
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions that have Consumer Goods Cloud enabled</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d70908e68">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d70908e68 ">To set up Consumer Goods Cloud Processing Services:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d70908e68 ">CGC Cloud Processing Services Register</td>

          </tr>
        </tbody>
      </table>

## 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/resources-product/images/cg_processing_service_register.png)
    
    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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience in <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions that have Consumer Goods Cloud enabled</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
            <colgroup>
              <col style="width:50%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d70908e506">User Permissions Needed</th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d70908e506 ">To replace a certificate:</td>

                <td class="slds-cell-wrap" style="vertical-align:top;" headers="d70908e506 ">CG Cloud Processing Services Register</td>

              </tr>
            </tbody>
          </table>

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/images/icon_important.png)

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](https://help.salesforce.com/s/articleView?id=xcloud.external_client_apps.htm&language=en_US) instead. If you must continue creating connected apps, contact Salesforce Support.

See [New connected apps can no longer be created in Spring ‘26](https://help.salesforce.com/s/articleView?id=005228017&type=1&language=en_US) 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](https://help.salesforce.com/s/articleView?id=sf.cg_task_admin_use_pairing_app.htm&language=en_US).
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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/images/icon_note.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/images/icon_important.png)
    
    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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/images/icon_important.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/resources-product/images/retail_dropdown_icon.png), 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**.

#### See Also

- [Assign Permission Sets to Consumer Goods Managed Package Users](https://help.salesforce.com/s/articleView?id=ind.cg_concept_admin_offline_app_permsets.htm&release=264.0.0&type=5 "Give users access to specific features and functions without altering the existing profiles of the users.")