The OneTrust connector lets you use OneTrust to manage receipts for user consent in your PingOne DaVinci flow.
Using OneTrust as part of your user privacy and data governance solution, this connector lets you track whether a user has consented to a specific document, such as your terms and conditions. Specifically, the connector can create a consent receipt or get an existing consent receipt.
Setup
Resources
For information and setup help, see the following documentation:
- OneTrust documentation (sign on required)
- DaVinci documentation:
Requirements
To use the connector, you'll need:
- A OneTrust license
Setting up OneTrust consent management
- Set up consent management in OneTrust as shown in Consent Management.
For your Collection Point, use the following settings:
- Choose the Custom API type.
- On the Enable Consent Withheld Transactions on this Collection Point. tab, turn on
- Create client credentials as shown in Managing OAuth 2.0 Client Credentials, with
the following settings:
- Access Token Lifetime: 1 hour
- Restrict IP Addresses: Off
- Scopes:
- CONSENT
- CONSENT_READ
Note your client ID and secret. You'll use them to set up the connector configuration.
Configuring the OneTrust connector
Add the connector in DaVinci as shown in Adding a connection, then configure it as follows.
Connector configuration
Client ID
Client Secret
Setting up PingOne
The example flows below use the PingOne user directory to store consent receipts. To use the provided flow templates:
- If you don't have an existing PingOne connection in DaVinci, set up the PingOne connector, including the required PingOne setup.
- In PingOne, add a user
attribute to hold a list of the user's consent receipts. For help, see Adding user attributes. Use the following details:
- Attribute Type: JSON
- Name: consentReceipts
- Select Allow multiple values
Setting up OneTrust URL variables in DaVinci
The flow templates provided below use variables to populate your organization's OneTrust URLs.
To use the flow templates, set the following variables in DaVinci.
For help, see Adding a variable in the DaVinci documentation.
Name | Variable Context | Data Type | Example Value |
---|---|---|---|
oneTrustPrivacyPortalDomain | string | company | https://yourorganization-privacy.my.onetrust.com |
oneTrustApplicationDomain | string | company | https://yourorganization.my.onetrust.com |
oneTrustDataSubjectPortal | string | company | https://yourorganization-privacy.my.onetrust.com |
Using the connector in a flow
Creating a consent receipt
This flow collects the user's consent and user ID, checks that the user account exists, and sends the consent and user information to OneTrust. After OneTrust generates a consent receipt, the flow adds the new receipt to the user's list of existing receipts and updates the user account in PingOne.
This flow uses PingOne as an example user directory. You can modify the flow to use a different directory.
Flow template name: OneTrust - New consent receipt
- Download the flow template and use it to create a new flow. For help, see Using DaVinci flow templates.
- Customize the consent form:
- Select the Consent Form node.
- In the HTML Template field, modify the HTML to include
the text of the terms and conditions (or other document) that you want consent
for, and modify the example form controls to show the relevant "purposes",
"options", and "custom preferences" in your OneTrust consent management
scheme.Tip:
- Click Switch View to see the HTML formatted with syntax highlighting.
- Click the Maximize (
) icon to give yourself more room to work.
- To access a variety of useful tools, right-click the field when you're in syntax highlighting mode (dark background).
- In the Output Fields List section, edit the Property Name of the purposes, options, and custom preferences to match the element IDs of the purposes and options you included in the HTML form. Remove any unwanted properties by clicking Edit at the end of the list.
- Click Apply.
- Add the IDs for your OneTrust purposes, options, and custom preferences.Note:
The flow uses a custom function to match the consent form inputs with the IDs of your OneTrust consent management elements. The function then builds a
purposes
object that is ready to send to OneTrust.- In OneTrust, get the
id
value for each purpose, option, and custom preference you want to use:- Go to the OneTrust Universal Consent & Preference Management portal. For example, https://company.my.onetrust.com/consent.
- For purposes, see .
- For custom preferences, see Options and note the options listed. . Also, go to
- For options, see
Options
with the options that you noted in the Custom Preferences view.
. Match the IDs under
- Select the Combine Form Results node.
- In the Variable Input List section, edit the Variable Name of the purposes, options, and custom preferences to match the Property Name in your Consent Form node. In the Value field, click {} and select the matching variable from your Consent Form node. Remove any unwanted properties by clicking Edit at the end of the list.
- In the Code field, modify the code to use the name and ID of your own purposes, options, and custom preferences and remove unused elements.
- Click Apply.
- In OneTrust, get the
- Configure the OneTrust node:
- Select the OneTrust node.
- In the API Token field, enter the API token from in OneTrust.
- Modify the Additional Data Elements list to reflect the data elements you included when configuring your collection point in OneTrust. To see the data elements, go to .
- Click Apply.
- Test the flow:
- Click Save, Deploy, then Run.
- On the consent form, enter the email address for one of the identities in your PingOne directory, select the purposes, options, and custom preferences, then click I Agree.
- See the resulting consent receipt, including the receipt ID.Tip:
Note the value of
x-onetrust-receiptId
. You'll use this to test the "Get information about an existing consent receipt" use case below.
Getting information about an existing consent receipt
You can use a receipt ID to check for an existing consent receipt in OneTrust. This allows you to check whether a user has consented to your terms before using your service, for example.
Flow template name: OneTrust - Consent receipt retrieval
- Download the flow template and use it to create a new flow. For help, see Using DaVinci flow templates.
- Test the flow:
- Click Save, Deploy, then Run.
- In the Enter Receipt ID form, enter the receipt ID that
you copied from your test run of the Creating a consent
receipt flow. Click Next.
- See the receipt information.
Capabilities
- Create Consent Receipt
-
Create Receipt from a Collection Point
Properties - Get Receipt Information
-
Get Receipt Information
Properties