Understanding OneTrust Integrations: From business event to API outcome
OneTrust Integrations help you connect OneTrust with other OneTrust modules and external systems. They can move information, trigger actions, apply business logic, and automate processes that span multiple applications.
You do not need to be an API developer to understand the basic integration flow. The key idea is:
A business event starts a workflow. The workflow prepares and sends a request to another system, then records what happened.
The building blocks of an integration
An integration is made up of several building blocks. Together, they describe where the process starts, what it does, how it communicates, and what happens next.
1. Trigger: what starts the workflow?
A trigger is the event or request that starts an integration workflow. Depending on the use case, a workflow can be started by:
-
A system event in OneTrust, such as a record being created or updated
-
A scheduled operation
-
A webhook or API request from an external system
-
Another OneTrust integration workflow
For example, a consent profile update could trigger a workflow that sends the updated consent status to a marketing platform.
2. Workflow: what should happen?
The workflow contains the steps that should be executed after the trigger. It can include actions, conditions, data transformations, loops, and calls to other workflows.
A workflow might:
-
Retrieve information from OneTrust
-
Retrieve information from an external system
-
Check whether a condition is met
-
Transform or enrich data
-
Create or update a record in another system
-
Continue, stop, or follow a different path based on the result
The workflow is the process that connects the business event to the desired business outcome.
3. Authentication: who is allowed to communicate?
Before a system can access a protected API, it must authenticate. Authentication establishes the identity of the application or workflow making the request.
OneTrust integrations commonly use credentials and access tokens to authenticate API calls. A token is not automatically authorised to access every API. Scopes are configured by module and determine which module APIs the token can call.
OAuth 2.0 is a standard that lets an application obtain a temporary access token to call a protected API without sending its underlying credentials with every request. When using OAuth 2.0 with the client credentials grant, authentication and API access use two separate calls.
Call 1: Obtain an access token
The client sends its credentials and requested scope to the OAuth token endpoint. The authentication service validates them and returns a temporary access token.
Call 2: Access the protected API
The client then makes the API request itself. It includes the access token in the Authorization header as a bearer token. A bearer token is a temporary access token that an application presents in the Authorization header to access a protected API.
The first call authenticates the client and obtains the token. The second call presents that token to the protected API so the requested action can be performed.
Illustrative examples: Endpoint paths, methods, headers, and scopes may vary depending on the target API, module, and integration configuration.
For example:
-
The credential identifies the application requesting access.
-
The access token provides temporary access for API calls.
-
The scope grants access to a specific module’s APIs. An Integrations scope authorises Integrations module APIs; it does not automatically authorise Consent or Inventory APIs.
Follow the principle of least privilege: request only the scopes required by the workflow’s API calls.
This is why a request can fail even when a valid token was obtained. If the token does not have the scope required by the module API being called, the target API may reject the request.
4. API action: what does the workflow send or retrieve?
After obtaining the access token, the workflow makes the protected API request. This API action uses the token in the Authorization header to retrieve or update data in OneTrust or an external system.
An API is a defined way for one application to request information or ask another application to perform an operation. It is similar to a waiter in a restaurant:
-
You make a request.
-
The waiter takes the request to the kitchen.
-
The kitchen processes it.
-
The waiter returns the result.
In an integration, the API action carries the request from the workflow to the target system and brings the response back into the workflow.
5. Transformation and mapping: how should the data be reshaped?
Different systems often represent the same business concept in different ways. One system might call a field recordId, while another expects id. One system might represent a verified value as true, while another expects the text VERIFIED.
Mapping and transformation translate the source data into the structure required by the target system.
OneTrust Integrations can use Apache FreeMarker to insert runtime values, apply conditions, handle defaults, and transform data between workflow steps.
FreeMarker is a template language that allows a workflow to insert runtime values and apply simple logic when constructing a request.
6. Response and outcome: what happened?
After an API request is sent, the target system returns a response. The workflow can use that response to determine what should happen next.
A successful response may allow the workflow to continue. Depending on the workflow design, a failure may lead to a retry, an alternative path, or troubleshooting.
The response can include:
-
A status code indicating whether the request succeeded
-
A response body containing data or a message
-
An identifier that can be used to trace the request
-
Information needed by a later workflow step
Understanding an API request
An API request usually contains four important parts:
-
Endpoint: the destination URL
-
Method: the operation, such as GET, POST, PUT, or PATCH
-
Headers: additional information about the request, such as content type and authentication
-
Payload: the business data carried in the request body
For example:
POST /api/records HTTP/1.1
Content-Type: application/json
Authorization: Bearer <access_token>
The request body could contain:
{
"recordId": "rec-2048",
"status": "VERIFIED",
"email": "person@example.com"
}
The API endpoint URL, method, and headers describe the call. The payload carries the business data.
What is JSON and what is a payload?
JSON is a structured format used to represent data. A payload is the data carried by a request or response.
A payload may contain simple values, nested objects, or lists of values. For example:
{
"eventType": "record.updated",
"eventId": "evt-98765",
"payload": {
"recordId": "rec-2048",
"verified": true
}
}
In this example:
-
eventTypedescribes what happened. -
eventIdidentifies this particular event. -
payloadcontains the business values that later workflow steps can use. -
recordIdidentifies the affected record. -
verifiedindicates the current status.
The structure of a payload depends on the source and target systems. Always confirm the expected fields and data types for the specific event and API being used.
From an event payload to an action payload
The data received by a workflow is not always in the format required by the target API. The workflow may need to rename fields, change values, add information, or remove fields.
For example, the incoming event might contain:
{
"recordId": "rec-2048",
"verified": true
}
The target system might expect:
{
"id": "rec-2048",
"status": "VERIFIED"
}
A transformation can perform this translation:
recordId → id
verified = true → status = VERIFIED
verified = false → status = FAILED
A simplified FreeMarker example could be:
{
"id": "${recordId!}",
"status": "${verified?string('VERIFIED','FAILED')}"
}
In a real workflow, the values may be referenced directly from the event or from the output of a previous action, for example:
${(event.payload.recordId)!}
The exact expression depends on the structure of the event and the workflow step being referenced.
What does orchestration mean?
Orchestration means coordinating a sequence of activities across systems.
An integration is not only a connection between two API endpoints. It can also decide:
-
When the process should start
-
Which information should be retrieved
-
Which conditions should be evaluated
-
Which system should receive the data
-
How data should be transformed
-
What should happen when the target system succeeds or fails
For example, a workflow could retrieve a record from one system, check a condition, transform the data, send it to another system, and then record the result in OneTrust.
This is the difference between simple connectivity and orchestration: connectivity moves data, while orchestration coordinates the process and its outcome.
Integrations versus direct API usage
Use OneTrust Integrations when the main requirement is to coordinate data or actions across systems. Integrations are particularly useful when you need workflow conditions, field mapping, data transformation, reusable workflows, or central execution visibility.
Direct API usage may be more appropriate when an external application owns the complete request lifecycle, including its own business logic, retries, and response handling.
The right approach depends on factors such as:
-
Which system should own the process
-
Whether data must be transformed between different models
-
Whether the workflow will be reused
-
How execution and failures should be monitored
-
How much orchestration is required
A simple example
Suppose a customer wants to send an updated consent status to an external marketing platform.
The integration could work as follows:
-
A consent-related event occurs in OneTrust.
-
The event payload provides the data subject and consent details.
-
The workflow evaluates any required conditions.
-
The workflow authenticates to the marketing platform.
-
The workflow maps the OneTrust fields to the marketing platform fields.
-
An API action sends the request.
-
The marketing platform returns a response.
-
The workflow records the result and follows the appropriate next step.
The customer does not need to think of this as a series of isolated technical calls. It is one controlled business process whose individual steps happen through APIs.
Key takeaway
OneTrust Integrations connect business events to controlled actions across OneTrust and external systems:
Trigger → Workflow → Authenticate → Transform → Call the API → Evaluate the outcome
Understanding this sequence makes it easier to discuss integration requirements, ask the right design questions, and collaborate with technical teams.