This knowledge article shows you how to install the unmanaged package in you Salesforce Sales or Service Cloud. This package makes it possible to show interactions and/or scores from Activation Studio on any subscriber, lead, contact or custom object.
Step 1: Installing the package:
1: Navigate to the following link
Production link: https://login.salesforce.com/packaging/installPackage.apexp?p0=04td2000000OMKL
Sandbox link: https://test.salesforce.com/packaging/installPackage.apexp?p0=04td2000000OMKL
2: Login with your Salesforce User.
3: Install the package based on your requirements for Admins Only, All Users or Specific Profiles
4: Wait until the installation is complete, and click Done.
Step 2: Setup Marketing Cloud Installed Package
1: Go to your Marketing Cloud, and switch to the Business Unit that you would like to use for the data representation in your Sales or Service Cloud.
2: Navigate to settings -> setup -> apps -> installed packages
3: Create a new installed package called “Activation Studio – SFSC integration” and click save

4: Click “add component -> API integration ” with the integration type Server-to-Server and click next


5: Navigate to the header Data, and add the scope Read for the type Data Extension and save the component

6: Copy over the client id, client secret and authentication base uri, and continue to step 3 for setting up the named credential in your Salesforce org.

Be aware that the integration only works for one business unit at a time.
Step 3: Setup the named credential in your Salesforce org
1: Login to your Salesforce environment, and navigate to setup.
2: Search for Named Credentials within the section ‘Security’, and click on the label ‘Marketing Cloud Rest’.
3: Click on Edit and change the URL section {{tenant-specific-subdomain}} with your tenant specific subdomain from your Marketing Cloud (this is shown in your new Installed Package from step 2) in the format https://{{tenant-specific-subdomain}}.rest.marketingcloudapis.com and click Save.

4: Navigate to the linked External Credential from the Authentication Section.
5: Click on Edit and change the URL section {{tenant-specific-subdomain}} with your tenant specific subdomain from your Marketing Cloud (this is shown in your new Installed Package from step 2) in the format https://{{tenant-specific-subdomain}}.auth.marketingcloudapis.com/v2/token and click Save.
6: Locate the principal within the Principals section on the External Credential, and click on Edit within the Actions dropdown.
7: Set the Client ID and Client Secret to the ones copied over from step 2, and click save.

8: Navigate to the profile that you would like to give access to the score and/or interactions information, and click on “External Credential Principal Access” under the Apps section.
9: Click Edit and add the “MarketingCloudExternalCredential -0auth” Principal to the right side and click save.

10: Navigate to the “Object Settings” on the current profile and enable “User External Credentials” Read access.

11: Repeat the previous two steps for any other profile that you would like to use.
Step 4: Adjusting the Custom Meta Data in Salesforce
1: Navigate to “Custom Code -> Custom Metadata Types”
2: Search for the “AS_Component_Config” custom meta data type and click the Label.

3: Click on “Manage AS_Component_Configs”

4: Create a new configuration where the Label and AS_Component_Config Name are set to “default” (this needs to be all lowercase).
5: (Optional): If you use Activation Studio to collect anonymized web data, and therefore use a mapping table, fill the remaining fields with the following information and check the Mapping Table Enabled checkbox:
Mapping Table Anon ID Column Name: The name of the column where the anonymized identifier (usually the Google Analytics ID) is collected. e.g. GAID
Mapping Table DE External Key: External key of the Mapping Table data extension.
Mapping Table Subscriber Column Name: The name of the column where the subscriber identifier is stored, usually “SubscriberKey”

Step 5: Adding the components to the desired detail pages.
1: Navigate to the desired Salesforce App, and the desired page where the component should be added.
2: Edit the lightning page, and locate the two custom components

3: Add the ScoreDesigner anywhere on the page you want, and configure to your needs:

- The Test Record Id field can be used to retrieve test data for testing purposes based on any ID that has specific data. Keep this empty when you save the component.
- The Relation Field(s) field can be used to enter the API names of the fields that relate to the SubscriberKey. You can add multiple fields seperated by a comma (,). Fields should use the format [OBJECT_NAME].[API_FIELD_NAME] (e.g. Account.PersonContactId). If you leave the field empty it defaults to the id of the object you’re adding the component to (e.g. Account.id).
- By default the component doesn’t show scores with 0 points. You can choose to also show these by checking the “Show Empty Scores” checkbox.
4: Add the InteractionDesigner anywhere on the page you want, and configure to your needs:

- The Test Record Id field can be used to retrieve test data for testing purposes based on any ID that has specific data. Keep this empty when you save the component.
- The Relation Field(s) field can be used to enter the API names of the fields that relate to the SubscriberKey. You can add multiple fields seperated by a comma (,). Fields should use the format [OBJECT_NAME].[API_FIELD_NAME] (e.g. Account.PersonContactId). If you leave the field empty it defaults to the id of the object you’re adding the component to (e.g. Account.id).
- The Interaction Name Contains List field can be used to rename interactions. Keep empty if you don’t want to make use of this option.
- The Variable Name Order List field can be used to rearrange the order of the variable names. Keep empty if you don’t want to make use of this option.
- The Interaction Name Exclusion List can be used to exclude interactions you don’t want to show. Keep empty if you want to show all interactions collected.
5: Save/activate the page.
6: Validate if the component is showing the correct information or the message “This record has no interactions/scores”.
7 (Optional): You can alter the Lightning Web Component bundles to your own preferences in a sandbox and deploy the alterations to your production org
8: If you do have any issues you are running into, need support on customizing the components or just want to give us ideas for improvements, please feel free to contact us via Our Service Desk
Step 6: Enable component for users
1: Navigate to the profile that you would like to give access to the score and/or interactions information, and click on “External Credential Principal Access” under the Apps section
2: Click Edit, and add the “MarketingCloudExternalCredential -0auth” Principal to the right side and click save

3: Navigate to the “Object Settings” on the current profile and enable “User External Credentials” Read access.

4: Navigate to the “Enabled Apex Class Access” settings and add the following classes:

5: Repeat the previous steps for any other profile that you would like to use.