Marketing App Extensions

Set up the metadata for extensions and activity types.

Endpoints and Parameters 

Use these endpoints to set up an extension.

EndpointDescription
MarketingAppExtensionThe metadata that defines the third-party application.
MarketingAppExtensionAssignmentThe relationship between the extension and a business unit. This object determines which business unit to pass data to and from.
PardotTenantThe metadata for the business unit. Use this endpoint to identify when you create a MarketingAppExtensionAssignment.

Create the Marketing App Extension 

Set up an extension to represent a third-party app. In this example, we set up a webinar extension and assign it to the HappyHomeTX business unit.

  1. Authenticate to the Salesforce API.
  2. Make a request to create an extension for a webinar service and set IsActive to true. We recommend naming it after the service to make it easy to recognize the source. Here is an example request.
1POST /services/data/v55.0/tooling/objects/MarketingAppExtension HTTP/1.1
2Host: YOUR_DOMAIN
3Authorization: Bearer YOUR_ACCESS_TOKEN
4Content-Type: application/json
5Cookie: YOUR_COOKIE_ID CookieConsentPolicy=0:0
6Content-Length: 123
7
8{
9  "DeveloperName": "VidYard",
10  "MasterLabel": "VidYard",
11  "Description": "Extension for Webinar",
12  "IsActive": "true"
13}

Response:

1{
2  "id": "01987654321098MAA",
3  "success": true,
4  "errors": [],
5  "warnings": [],
6  "infos": []
7}

Assign the Extension to a Business Unit 

Next, assign the extension to the business unit you want to pass data to or from. This step is required even if you have only one business unit.

  1. Use query to find your PardotTenant ID. This value is your business unit ID. You can also find this ID in Setup under Business Unit Setup.
1GET /services/data/v55.0/tooling/query?q=select+id,PardotTenantName+from+PardotTenant HTTP/1.1
2Host: YOUR_DOMAIN
3Authorization: Bearer YOUR_ACCESS_TOKEN
4Cookie: YOUR_COOKIE_ID CookieConsentPolicy=0:0

The response includes IDs for all of the business units in your accounts.

1{
2  "size": 3,
3  "totalSize": 3,
4  "done": true,
5  "queryLocator": null,
6  "entityTypeName": "PardotTenant",
7  "records": [
8    {
9      "attributes": {
10        "type": "PardotTenant",
11        "url": "/services/data/v55.0/tooling/objects/PardotTenant/01234567890123KAM"
12      },
13      "Id": "01234567890123KAM",
14      "PardotTenantName": "HappyHomeCA"
15    },
16    {
17      "attributes": {
18        "type": "PardotTenant",
19        "url": "/services/data/v55.0/tooling/objects/PardotTenant/01234567890123KAP"
20      },
21      "Id": "01234567890123KAP",
22      "PardotTenantName": "HappyHomeTX"
23    },
24    {
25      "attributes": {
26        "type": "PardotTenant",
27        "url": "/services/data/v55.0/tooling/objects/PardotTenant/01234567890123KAE"
28      },
29      "Id": "01234567890123KAE",
30      "PardotTenantName": "HappyHomePA"
31    }
32  ]
33}
  1. To assign the extension, send a POST request to the /tooling/objects/MarketingAppExtAssignment endpoint. In the request body, include the tenant ID as the value of the ParentId property, and the app ID as the value of the MarketingAppExtensionId property.
1POST /services/data/v55.0/tooling/objects/MarketingAppExtAssignment HTTP/1.1
2Host: YOUR_DOMAIN
3Authorization: Bearer YOUR_ACCESS_TOKEN
4Content-Type: application/json
5Cookie: YOUR_COOKIE_ID CookieConsentPolicy=0:0
6Content-Length: 84
7{
8  "ParentId": "01234567890123KAM",
9  "MarketingAppExtensionId" : "01987654321098MAA"
10}

A successful request returns a 201 Created response.