Using Integration Functions
This article is intended as reference for OneTrust customers of the specific FreeMarker variables and functions available for use within the Integrations module.
For more information and resources for FreeMarker, see the following:
Custom Functions
|
Action |
Function Example |
|---|---|
|
Generate MD5 Hash |
|
|
Generate SHA256 Hash |
|
|
Generate SHA512 Hash |
|
|
Convert Object to Valid JSON |
|
Creation and Access of Dynamic Values
|
Action |
Function Example |
|---|---|
|
Store a Scalar in a Dynamic Value |
|
|
Store a List in a Dynamic Value |
|
|
Store an Object in a Dynamic Value |
|
|
Retrieve a Scalar from a Dynamic Value |
|
|
Retrieve a List from Dynamic Value |
|
|
Retrieve an Object from a Dynamic Value |
|
List Manipulation
The following table is organized in a procedural manner. Each new action introduces a new function manipulation to the list.
|
Action |
Function Example |
|---|---|
|
Create a List |
|
|
Add an Element at the End |
|
|
Add at the Beginning |
|
|
Removes a sequence of elements and replaces with another sequence
CODE
After splice, list has [zero, mid1, mid2, mid3, third, fourth] |
|
|
Remove and return element at the end After pop, list has [zero, mid1, mid2, mid3, third] |
|
|
After pop, list has [zero, mid1, mid2, mid3, third] Shift removes and returns an element from the beginning |
|
|
After first shift, has [mid1, mid2, mid3, third] |
|
|
After second shift, has [mid2, mid3, third] |
|
|
Splice can also be used to remove elements. Set an empty replacement |
|
|
Check size, should be zero |
|
Object Manipulation Functions
The following table is organized in a procedural manner to demonstrate how each new action manipulates an object in the given function example.
|
Action |
Function Example |
|---|---|
|
Create a hash and manipulate, these functions only work on the top level properties of an object |
|
|
Get the 'first' property |
|
|
Replace the 'first' property |
|
|
Get the 'second' property, this returns a hash |
|
|
Delete the 'second' property |
|
|
The get operation returns null, provide a default |
|
|
Add another property |
|