The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.

Invoke Cache Migration when OAuth2 is Deployed

Make sure you have completed the DCG OAuth2 Setup and Usage and received the credentials from Technical Support. When OAuth2 credentials are mentioned in this topic, use the cmig set of credentials.

If you are using ​Salesforce Industries Communications, Media, and Energy Fall '20 or later, then set the following parameter values:

CacheAPI.ExternalSystemAuthHeaderJSON with { "oauth2_server":"" , "customer_app_key":"" ,"customer_app_secret":""}
oauth2_serverOAuth2 URL
customer_app_keyOAuth2 application key
customer_app_secretOAuth2 application secret

For example:

{ "oauth2_server": "", "customer_app_key": "testKey", "customer_app_secret": "testSecret" }

Then, add the URL to the remote site URL.

For versions Salesforce Industries Communications, Media, and Energy Summer '20 and prior, you can migrate CachedAPIResponse__c records from the Salesforce platform to DCG when OAuth2 is deployed by using the:

  • Command Line Interface: Obtain the OAuth2 JWT token and call GET /cm/migrate endpoint.

  • GUI (this solution is valid for one hour, after which the CacheAPI.ExternalSystemAuthHeader needs to be updated again).

    • Obtain the OA uth2 JWT token.

    • Replace the CacheAPI.ExternalSystemAuthHeader field with the Bearer token value (oauth2_jwt_token_value).

    • Make the API GET call.