Consent Bulk Import Webhook Integration
You can use a built-in webhook trigger to import large volumes of consent records. The following are instructions for configuring the integration workflow needed to launch the Consent Bulk Import workflow integration.
Prerequisites
To set up the integration workflow
-
A valid user with the CONSENT and INTEGRATIONS scopes.
-
A valid access token for the user which will be used to connect with the Schedule endpoint. For more information, see Client Credentials.
-
A valid SFTP/External FS where the Bulk import file will be shared. For more information, see SFTP Server .
-
A valid Schedule Service Credential using a valid access token or API key. For more information see Schedule Service .
-
The following services should be deployed in the corresponding environment:
-
Schedule
-
Scheduler
-
Document
-
Document-Gateway
-
Consent
-
API details
A new public API has been added in Schedule Service to trigger the import job. See below the details:
|
Path |
Method |
Response |
Authentication |
|---|---|---|---|
|
/v3/jobs |
POST |
201 CREATED |
Bearer token (the user must have CONSENT scope) |
- Payload Field
- Description
-
Name -
Name for the import job.
-
Description -
Description for the import job.
-
Type -
Import job type has to be "stream_consent_receipts.
-
Token -
Blank for now.
-
EntityId -
Reference ID of the Bulk import file stored in Document Storage.
{
"Name":"consent stream log",
"Description":"this is a consent stream import request",
"Type":"stream_consent_receipts",
"Token": "",
"EntityId": "cb203ff9-fc57-4e83-9763-9ab3c1a591b4"
}
Client Credentials
If the user already exists, you may use an existing token or regenerate a new token based on Client Secret or use an existing API Key. If the user does not exist, please follow the procedure below and note the bearer token or API Key for future steps.
-
In the OneTrust platform, click the gear icon
in the upper right-hand corner to access Global Settings.
-
Navigate to .
-
Select the Client credentials tab and click the Add button.
-
Select the CONSENT and the INTEGRATIONS scopes.
-
Click the Create button.
For more information, see Managing OAuth 2.0 Client Credentials.
Integration Credentials
SFTP Server
-
Navigate to The Credentials screen appears.
-
Click the Add credential button. The Create credentials screen appears.
-
In the Select existing system field, select SFTP from the list. Click the Next button.
-
Enter the SFTP connection details and click Save.
Schedule Service
-
Navigate to The Credentials screen appears.
-
Click the Add credential button. The Create credentials screen appears.
-
In the Select existing system field, select Generic from the list. Click the Next button.
-
Enter the Schedule Service details and click the Save button.
-
In the Hostname field, add the host details where the service is running specific to the environment.
-
Open the Test settings (recommended) collapsible menu and paste this URL into the Test URL field: https://OT_ENV_URL/api/schedule/v1/jobs.
-
Add the generated bearer token in the Token field if you have selected the Bearer token Authentication method. If other, proceed with the corresponding configuration.
-
-
Click the link in the Credential name column for the credential that you have created. The Credential details screen appears.
-
Click the Test Credentials button to check if the connection was successful.
For more information, see Configuring Integration Credentials.
To create the integration workflow
Manual Workflow Creation
For more information, see Managing Custom Integration Workflows.
Importing an Existing Workflow
Follow this procedure to create the Consent Bulk Import integration workflow by importing a .json file.
For more information, see Managing Custom Integration Workflows.
To verify the workflow
Ensure that the generated client credentials and the Schedule Service credential details are valid for the user and have been tested.
You can call the workflow from an external system to test the webhook. These instructions use Postman as a proxy system to demonstrate this verification.
For more information, see Integrating with Webhooks.