Dynamic Content Variation Object

Dynamic content personalizes parts of your website based on what you know about a viewer. Variations are the blocks of content that are displayed to prospects dynamically, based on criteria. Learn more about dynamic content in Salesforce Help.

The API to access the dynamic content variation object follows the conventions described in Version 5 Overview.

Supported Operations 

OperationHTTP VerbURL FormatAbility Requirements
ReadGEThttps://pi.pardot.com/api/v5/objects/dynamic-content-variations/<id>?<params>Content > Dynamic Content > View ability
QueryGEThttps://pi.pardot.com/api/v5/objects/dynamic-content-variations?<params>Content > Dynamic Content > View ability
CreatePOSThttps://pi.pardot.com/api/v5/objects/dynamic-content-variations?<params>Content > Dynamic Content > Create ability

Fields 

Required Fields 

FieldTypeDescription
dynamicContentIdIntegerID of the dynamic content this variation is associated with.
operatorEnumThe operator found in the logic used to set the criteria for a variation. See Operator Enums below.
value1StringThe value found in the logic used to set the criteria for a variation. All operators except between require one value.

Optional Fields 

FieldTypeDescription
contentStringThe text content of the variation.
value2StringThe value found in the logic used to set the criteria for a variation when using the between operator. All other operators don’t support two values.

Read-Only Fields 

FieldTypeDescription
idIntegerAccount Engagement ID for this dynamic content variation.
comparisonStringThe logic used to set the criteria for a variation. This field works together with the Dynamic Content basedOn field to determine which variation a prospect is served.
dynamicContentDynamic ContentThe dynamic content the variation is associated with.

Dynamic Content Variation Read 

Retrieve a single dynamic content variation following the conventions described in the Version 5 Overview.

Example Request

1GET /api/v5/objects/dynamic-content-variations/1000?fields=id,dynamicContentId,comparison,content HTTP/1.1
2Host: pi.pardot.com
3Authorization: Bearer <access-token>

Example Response

1{
2  "id": 3381,
3  "comparison": "is \"Pre\" Conversion",
4  "content": "Learn More",
5  "dynamicContentId": 1119
6}

Dynamic Content Variation Query 

Retrieve a collection of dynamic content variations following the conventions described in the Version 5 Overview.

Sortable Fields 

  • id

Filtering Results 

When executing a query, the following parameters can be used to filter the returned results. These parameters can be specified in the request along with any shared parameters defined in Version 5 Overview. When specifying more than one parameter, all parameters must match the record in order for it to be returned in the results.

ParameterDescription
idReturns any dynamic content variation where ID is equal to the given integer value.
idListReturns any dynamic content variation where ID is included in the given list of values.
idGreaterThanReturns any dynamic content variation where ID is greater than the specified value, non-inclusive.
idGreaterThanOrEqualToReturns any dynamic content variation where ID is greater than or equal to the specified value.
idLessThanReturns any dynamic content variation where ID is less than the specified value, non-inclusive.
idLessThanOrEqualToReturns any dynamic content variation where ID is less than or equal to the specified value.
dynamicContentIdReturns any dynamic content variation whose dynamic content ID is equal to the given integer value.
dynamicContentIdGreaterThanReturns any dynamic content variation where ID is greater than the specified value, non-inclusive.
dynamicContentIdGreaterThanOrEqualToReturns any dynamic content variation where ID is greater than or equal to the specified value.
dynamicContentIdLessThanReturns any dynamic content variation where ID is less than the specified value, non-inclusive.
dynamicContentIdLessThanOrEqualToReturns any dynamic content variation where ID is less than or equal to the specified value.

Example Request

1GET /api/v5/objects/dynamic-content-variations?fields=id,dynamicContentId,comparison,content&dynamicContentId=1115 HTTP/1.1
2Host: pi.pardot.com
3Authorization: Bearer <access-token>

Example response:

1HTTP/1.1 200 OK
2Content-Type: application/json
1"values": [
2    {
3        "id": 1000,
4        "comparison": "is less than or equal to A+",
5        "content": "Variation 1",
6        "dynamicContentId": 1115
7    },
8    {
9        "id": 1001,
10        "comparison": "is CTO",
11        "content": "Lead your organization to more efficiency.",
12        "dynamicContentId": 1115
13    }
14]

Dynamic Content Create 

Create a single dynamic content variation following the conventions described in the Version 5 Overview.

Example request:

1POST /api/v5/objects/dynamic-content-variations?fields=id,dynamicContentId,comparison,content,operator,value1
2Host: pi.pardot.com
3Authorization: Bearer <access-token>
1{
2  "dynamicContentId": 1115,
3  "operator": "less-than-or-equal",
4  "value1": "A+",
5  "content": "Variation 1"
6}

Example response:

1HTTP/1.1 201 OK
2Content-Type: application/json
1{
2  "id": 1000,
3  "comparison": "is less than or equal to A+",
4  "content": "Variation 1",
5  "dynamicContentId": 1115,
6  "operator": "less-than-or-equal",
7  "value1": "A+"
8}

Enums 

The object supports these enums.

Operator 

  • is
  • contains
  • between
  • less-than
  • less-than-or-equal
  • greater-than
  • greater-than-or-equal