Statement JSON schema reference
Introduction
Access control statements for Uptempo Campaign Management activities are defined using a JSON (JavaScript Object Notation) schema.
In addition to the visual Statement Editor, you can create and modify access control statements directly in the Raw JSON editor. The Raw JSON editor provides greater flexibility and control for users who are comfortable using JSON syntax.
This reference guide describes the JSON schema used for activity access controls. It explains the required structure, supported fields, and accepted data types and values needed to create valid access control statements in Uptempo Campaign Management.
Basic syntax rules
When writing an activity access control statement in JSON, use standard JSON syntax:
Begin and end statements and objects with curly braces:
{...}.Begin and end arrays (such as conditions) with square brackets:
[...].For key-value pairs, use the format:
"key": "value".Separate the key and value with colon:
:.Keys must be strings in double quotes:
"key".If the value is a string, it must be in double quotes:
"value".
Separate individual key-value pairs and items in arrays with a comma:
,. Do not place a trailing comma after the last item.JSON is data-only: do not include comments in statements.
Statement structure
Access control statements use the following general structure:
- Example
The following example statement allows viewing of all activities within three specified activity types:
{ "effect": "ALLOW", "action": "View", "resourceType": "ACTIVITY", "resourceLocator": "*", "conditions": [ { "field": { "name": "ACTIVITY_TYPE" }, "operator": "IS_ONE_OF", "value": ["21", "74", "41"] } ] }
Resource IDs
Many access control statements are scoped to specific Uptempo Campaign Management resources, such as activities or attributes. To reference a specific resource in your statements, you use its ID. These IDs are system-generated identifiers that uniquely identify each resource. Statements use the following types of ID:
- Activity ID (
activityId) Identifies a specific activity.
- Activity Type ID (
activityTypeId) Identifies a specific activity type.
- Activity Type Group ID (
activityTypeGroupId) Identifies a specific activity type group.
- Attribute Definition ID (
attributeDefinitionId) Identifies a specific attribute.
- Attribute Option ID (
attributeOptionId) Identifies a specific list option for a Drop-Down List or Multi-Select List attribute.
To learn how to find resource IDs in Uptempo Campaign Management, see Find resource IDs in Uptempo.
Primary properties
The primary properties in an access control statement are:
Property Name | Type | Required | Description |
|---|---|---|---|
| String (enum) | Yes | Specifies whether the action defined by the statement is allowed or denied. |
|
| Yes | Defines the action permitted or restricted for the resource. |
| String (enum) | Yes | Specifies the type of resource controlled by the statement. |
|
| Yes | Uniquely identifies the resource to which the policy applies. |
| Array of objects | No | Specifies additional conditions that must be met for the statement to apply. |
effect
Description | Specifies whether the action defined by the statement is allowed or denied. |
|---|---|
Type | String (enum) |
Required | Yes |
Values |
|
- Example (fragment)
- { ... "effect": "ALLOW", ... }
action
Description | Defines the action permitted or restricted for the resource. The required structure varies based on the value of the |
|---|---|
Type | One of:
|
Required | Yes |
ActivityAction
Description | Actions that can be specified when the value of |
|---|---|
Type | String (enum) |
Values |
|
- Example (fragment)
- { ... "action": "View", "resourceType": "ACTIVITY", ... }
ActivityTypeAction
Description | Actions that can be specified when the value of resourceType is |
|---|---|
Type | String (enum) |
Values |
|
- Example (fragment)
- { ... "action": "CreateActivity", "resourceType": "ACTIVITY_TYPE", ... }
ActivityAttributeAction
Description | Actions that can be specified when the value of resourceType is |
|---|---|
Type | String (enum) |
Values |
|
- Example (fragment)
- { ... "action": "SetValue", "resourceType": "ACTIVITY_ATTRIBUTE", ... }
resourceType
Description | Specifies the type of resource controlled by the statement. |
|---|---|
Type | String (enum) |
Required | Yes |
Values |
|
- Example (fragment)
- { ... "resourceType": "ACTIVITY_TYPE", ... }
resourceLocator
Description | Uniquely identifies the resource to which the policy applies. The required structure varies based on the value of the |
|---|---|
Type | One of:
|
Required | Yes |
ActivityResource
Description | Specifies the activity when |
|---|---|
Type | String (numeric string) |
Values |
|
- Example (fragment)
- { ... "resourceType": "ACTIVITY", "resourceLocator": "*", ... }
ActivityTypeResource
Description | Specifies the activity type when |
|---|---|
Type | String (numeric string) |
Values |
|
- Example (fragment)
- { ... "resourceType": "ACTIVITY_TYPE", "resourceLocator": "*/12" ... }
ActivityAttributeResource
Description | Specifies the activity type when |
|---|---|
Type | String (numeric string) |
Values |
|
- Example (fragment)
- { ... "resourceType": "ACTIVITY_ATTRIBUTE", "resourceLocator": "*/123456" ... }
conditions
Description | Specifies one or more additional conditions that must be met for the statement to take effect. |
|---|---|
Type | Array of objects |
Required | No |
Properties |
|
- Example (fragment)
- { ... "conditions": [ { "field": { "name": "ACTIVITY_TYPE" }, "operator": "IS", "value": ["123"] }, { "field": { "attributeDefinitionId": "987654" }, "operator": "IS_ONE_OF", "value": ["123456", "789012"] } ] }
conditions[] object properties
Each object in the conditions array describes a separate condition that must be met for the statement to apply, and consists of the following properties:
Property Name | Type | Required | Description |
|---|---|---|---|
| Object | Yes | Specifies what the condition is based on. Conditions can be based on the selected options of an attribute, or on activity types or activity type groups. |
| String (enum) | Yes (see note) | Specifies that the condition is based on matching activity types or activity type groups provided in the `value` array. |
| String | Yes (see note) | Specifies that the condition is based on matching the selected options of an attribute. Provides the ID of the attribute definition to compare against the `value` array. |
| String (enum) | Yes | Specifies the logical operator used to evaluate the ID values in the `value` array against the condition basis defined by the `field` property. |
| Array of strings | Yes | Provides one or more IDs or attribute options to compare against the condition basis defined by the `field` property. |
conditions[].field
Description | Specifies what the condition is based on. Conditions can be based on the selected options of an attribute, or on activity types or activity type groups. |
|---|---|
Type | Object |
Required | Yes |
Properties | Must include one of:
|
conditions[].field.name
Description | Specifies that the condition is based on matching either activity types or activity type groups provided in the |
|---|---|
Type | String (enum) |
Required | No |
Values |
|
- Example (fragment)
- { "field": { "name": "ACTIVITY_TYPE" }, ... }
conditions[].field.attributeDefinitionId
Description | Specifies that the condition is based on matching the selected options of an attribute. Provides the ID of the attribute definition to compare against the |
|---|---|
Type | String (numeric string) |
Required | No |
Values |
|
- Example (fragment)
- { "field": { "attributeDefinitionId": "123456" }, ... }
conditions[].operator
Description | Specifies the logical operator used to evaluate the ID values in the |
|---|---|
Type | String (enum) |
Required | Yes |
Values |
|
- Example (fragment)
- { ... "operator": "IS_ONE_OF", ... }
conditions[].value
Description | Provides one or more Activity Type IDs, Activity Type Group IDs, or Attribute Option IDs to compare against the condition defined by the |
|---|---|
Description | Array of strings (numeric strings) |
Required | Yes |
Values | Determined by the property and value specified in the
|
- Example (fragment)
- { ... "value": ["123", "456", "789"] }
Find resource IDs in Uptempo
To identify specific resources such as activities and attributes in the conditions object, you must reference them by their resource ID. These IDs in the Uptempo Campaign Management UI.
Find Activity IDs
Use this method to find Activity IDs.
Log in to your Uptempo instance. Click on
Activities in the navigation menu. the
Activities section opens to the Timeline.
In the Timeline, click on the activity (in the Activity column) for which you want to find the Activity ID.
In the browser's URL bar, find the query string parameter beginning with
activity=. The (numeric) value of this parameter is the Activity ID for the selected activity.
Find Activity Type IDs and Activity Type Group IDs
Use this method to find Activity Type IDs and Activity Type Group IDs.
Log in to your Uptempo instance. Click on
Activities in the navigation menu. the
Activities section opens to the Timeline.
In the Timeline, click
Filter Activities. The Filter by menu opens.
In the Select Condition menu for Type, select the condition is.
In the Set a value menu:
In the first panel, select the activity type group for which you want to find the Activity Type Group ID.
Optional: In the second panel, select the activity type for which you want to find the Activity Type ID.
Click Apply. The Filter by menu closes, and the Activities page refreshes.
In the browser's URL bar, find the query string parameter beginning with
filter=:
The value of this parameter provides the IDs for the selected activity type group and activity type:
The value is in the format
typeGroupId~IS~tgXXX-tYYY, where:The numeric string
XXXis the Activity Type Group ID (denoted by the prefixtg).The numeric string
YYYis the Activity Type ID (denoted by the prefixt).
Find Attribute Definition IDs and Attribute Option IDs
Use this method to find Attribute Definition IDs and Attribute Option IDs.
Log in to your Uptempo instance. Click on
Activities in the navigation menu. the
Activities section opens to the Timeline.
In the Timeline, click
Filter Activities. The Filter by menu opens.
In the Select Attribute menu, select the attribute for which you want to find the Attribute Definition ID (or the attribute that contains the list option for which you want to find the Attribute Option ID).
In the Select Condition menu, select the condition is.
In the Set a value menu, select the attribute list option for which you want to find the Attribute Option ID.
Click Apply. The Filter by menu closes, and the Activities page refreshes.
In the browser's URL bar, find the query string parameter beginning with
filter=:
The value of this parameter provides the IDs for the selected attribute definition and attribute option:
The value is in the format
tgXXX-tXXX-aYYY~IS~ZZZ, where:The numeric string
YYYis the Attribute Definition ID (denoted by the prefixa).The numeric string
ZZZis the Attribute Option ID.