Integrating with Marketo for Targeted Data Discovery

You can integrate Marketo's REST APIs with the OneTrust application to produce Targeted Data Discovery (TDD) results by building an integration workflow with conditional logic and system subtasks.

To create an access token in Marketo

For additional information on creating access tokens in Marketo, see Marketo's authentication documentation.

  1. Log in to your Marketo account.
  2. Navigate to Admin > Integration > Launchpoint.
  3. Locate your desired custom service, then click View Details.


    The Details modal appears.

  4. The Client Id and Client Secret will be used to set up your credential in OneTrust.


  5. Click the Get Token button to generate your access token, which will be used to set up your credential in OneTrust.


  6. Navigate to Admin > Web Services.
  7. Locate the Identity URL in the REST API section, which will be used to set up your credential in OneTrust.


To set up credentials in OneTrust

  1. On the Integrations menu, click Credentials.

    The Credentials screen appears.

  2. Click the Add New button.

    The Add Credential modal appears.

  3. Create a new credential using your Marketo information. For more information, see Add Credential Modal Reference .




Add Credential Modal Reference

Field
Description
Credential Name

Enter a name to identify the credential.

Description

Enter a description of the credential.

Connector Type

Select HTTP.

Auth Type

Select OAuth 2 as the credential type.

Test URL

Enter a test URL for the new credential, if applicable.

Protocol

Enter a protocol for the credential.

Hostname

Enter the hostname for the credential.

Key

Select the type of key which should be used in the header of the call made by the connection.

You can add additional keys if your credential requires more than one header.

Value

Enter the value of the key which should be used in the header of the call made by the connection.

Grant Type

Select Client Credentials.

Access Token URL

Enter the Identity URL from the Marketo Rest API section.

Client ID

Enter the Client ID from the Marketo Details modal.

Client Secret

Enter the Client Secret from the Marketo Details modal.

Scope

Enter the Authorized User from Marketo in the Scope field.

Access Token

Enter the Access Token generated in the Marketo Details modal.

To create a workflow for Marketo in OneTrust

  1. On the Integrations menu, click Connections.

    The Connections screen appears.

  2. Click the Add New button.

    The Create Workflow modal appears.

  3. Create a new workflow for your Marketo TDD integration by providing a name and description. Enter Marketo in the System field.


  4. Click the Create button.

    The Workflow Builder screen appears.

To configure the Marketo Integration Workflow

GET Action Configuration

  1. On the Workflow Builder screen, click on Data Subject Request in the Add OneTrust Trigger block.


  2. Click Data Subject Access System Subtask Created.


  3. Click the Add Action button to populate a new action block.
  4. In the System tab, click GET Leads by Filter Type.


  5. Select your Marketo credentials in the Select Credential field, then click the Next button.


  6. Enter the URL of your Marketo instance in the Request URL field.
    Note:

    Ensure the Content-Type is set to application/json and that Method is set to GET.



  7. Click the Finish button.

POST Action Configuration

  1. Click the Add Action button to populate a new action block.
  2. In the OneTrust tab, click Privacy Rights Automation.


  3. Click POST Targeted Data Discovery Summary Results.


  4. Enter the response fields from Marketo you want to write back to OneTrust.


    Note:

    The following is a sample Body:

    JSON
    {
       "language": "en-us",
       "system":"Marketo",
       "results": {
            "Marketing Information": {
            "id": "${(step.http_0.result[n].id)!}",
            "firstName": "${(step.http_0.result[n].firstName)!}",
            "lastName": "${(step.http_0.result[n].lastName)!}",
            "email": "${( step.http_0.result[n].email)!}" 
          }
       }
    }
  5. Click the Finish button.

Subtask Trigger Configuration

  1. Click the Add Action button to populate a new action.
  2. In the OneTrust tab, click Privacy Rights Automation.


  3. Click PUT Updates an existing Subtask to complete.


  4. Enter ${(event.payload.subtaskId)!} the TaskId field.
    Note:

    Add any desired comments when the action is completed in the Body field.



  5. Click the Finish button.
  6. Click the Save button, then click the Activate button.

To update the Request Workflow

  1. On the Privacy Rights Automation menu, click Workflows.

    The Workflows screen appears.

  2. Click the workflow you want to update with the Marketo TDD integration.

    The Workflow Details screen appears.

  3. Click the Edit button to enable editing.
  4. Click the System Subtask button.

    The Add System Subtask modal appears.

  5. Add a system subtask that triggers the newly created Marketo TDD integration. Ensure that you enter Marketo in the System field to populate the Marketo TDD integration workflow in the System Integration Workflow field.


  6. Click the Save button to close the modal.
  7. In the Workflow Details screen, click the Save button.
  8. Click the Activate button to reactivate the workflow.