Using SOAP APIs in OneTrust Integrations

In addition to REST APIs, OneTrust integration workflows can also leverage Simple Object Access Protocol (SOAP) APIs. These calls allow users to enable XML standard-based communication primarily over HTTP and perform API calls to support their integration use case.

Note:

OneTrust integrations using SOAP calls require at least the SOAP Envelope and Body of the request and response to be included in the workflow.

SOAP API Credentials

You will need to create credentials for the system when configuring integration workflows with SOAP calls. These credentials can be any authentication methods which are supported by your system.

Note:

For more information on credentials, see Configuring Integration Credentials.

XML Envelope Options

You can enable support for sending of username/password in SOAP envelopes via Basic Authentication and any form of OAuth 2.0 which sends the token in the SOAP envelope rather than in the HTTPS headers. There are some systems that require sending via envelopes in the body of an actionable request. This is used when the credential is leveraged by a specific workflow action and those XML tags must be included in the body.

  1. On the Integrations menu, select Credentials. The Credentials screen appears.

  2. Click the Add New button. The Select System screen appears.

  3. Enter your system in the Select System field, then click the Next button. The Enter Credential Details screen appears.

  4. Complete the fields. You will need to select XML Envelope in the Send Credentials In field, then complete the following fields:



    Field
    Description
    XML Parent Tag

    Used to lookup where the XML Authentication tag will be placed.

    Example: s:Header

    XML Authentication Tag

    Used to replace where the XML Parent Tag is cited in the workflow action.

    • Basic Example: <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"<UsernameToken><Username>{{username}}</Username><Password>{{password}}</Password></UsernameToken></Security>

    • OAuth Example: <fueloauth xmlns="http://exacttarget.com">{{AccessToken}}</fueloauth>

    XML Search Regular Expression

    Logic that informs the XML Authentication Tag how to replace the XML Parent Tag based on starting and ending values.

    • Basic Example: <Security(?s)(.*?)</Security>

    • OAuth Example: <fueloauth(?s)(.*?)</fueloauth>

  5. Click the Save button.

Creating actions for SOAP integrations

After you've initially created the Generic system integration and identified your desired trigger, you can configure the workflow actions with calls and actions to enhance the workflow execution.

  1. In the Integration Builder screen, click the Add Action button.

  2. Select HTTP Post Request from the System tab.

  3. Select the credential configured for the intended system integration.

  4. Enter the designated Request URL.

  5. Add a Content-Type Header with a value of text/xml;charset=UTF-8.

  6. Paste the XML envelope for the request in the Body and include any dynamic reference(s) needed for the SOAP API.

    Note:

    You'll need to replace the value in the XML body with the dynamic variable for the given reference, as seen with this example of passing an email from a data subject/consumer request.

    CODE
    ${(event.payload.request.email)!}


Configuring the sample response

  1. Click the Response tab.

  2. Select XML as the Payload Type.

  3. Paste a sample of the XML envelope into the Sample field from the expected response when the SOAP API is called.



  4. Click the Finish button to exit the action configuration.

  5. Continue customizing the workflow, as necessary, with additional logic steps to enhance the automation of the integration.

  6. Click the Save button.

  7. Click the Activate button.

  8. After you've saved and activated the workflow, you can now call the SOAP APIs to support your integration use case just as you would for REST APIs.

Referencing SOAP APIs

This example call demonstrates how you can reference the response from a SOAP API in integration workflows which includes any future actions similarly to REST API calls. Here, the SOAP API is triggered by a created data subject request with the action to POST Targeted Data Discovery Results conditional to an If Yes logic.