Context Definition (GET, POST)

Create a context definition, clone an existing context definition, extend a standard definition (file based definition) or to persist entire context definition.

Resource 

1/connect/context-definitions

Example for GET 

1https://{yourInstance}.salesforce.com/services/data/v59.0/connect/context-definitions

{yourInstance} is the domain name of your Salesforce instance.

Example for POST 

1https://{yourInstance}.salesforce.com/services/data/v59.0/connect/context-definitions

Available Version 

59.0

Requires Chatter 

No

HTTP Methods 

GET, POST

Response Body for GET 

Context Definition List

Request Body for POST 

JSON Example 

1{
2   "name":"Example Definition",
3   "description":"Example Description",
4   "developerName":"John Doe",
5   "startDate":"2023-06-02T00:00:00.000Z",
6   "endDate":"2025-06-20T00:00:00.000Z",
7   "isActive":false,
8   "payload":"{\"contextDefinition\":{\"name\":\"ExampleDefinition\",\"description\":\"Example Description\",\"developerName\":\"ExampleDefinition\",\"contextDefinitionVersionList\":[{\"contextDefinitionVersion\":{\"isActive\":\"TRUE\",\"startDate\":\"2023-06-02T00:00:00.000Z\",\"endDate\":\"2025-06-20T00:00:00.000Z\",\"contextNodes\":[{\"name\":\"Claim\",\"isTransposable\":\"TRUE\",\"contextNodeId\":\"$param_claimId\",\"attributes\":[{\"dataType\":\"STRING\",\"type\":\"INPUT\",\"isFinal\":\"TRUE\",\"isKey\":\"false\",\"isValue\":\"true\",\"contextAttributeId\":\"$param_claimaccountId\",\"name\":\"Account\",\"contextTagList\":[{\"name\":\"ClaimAccount\"}]}],\"nodeChildren\":[{\"name\":\"ClaimItem\",\"isTransposable\":\"TRUE\",\"contextNodeId\":\"$param_claimItemId\",\"attributes\":[{\"dataType\":\"STRING\",\"type\":\"INPUT\",\"isFinal\":\"TRUE\",\"isKey\":\"FALSE\",\"isValue\":\"FALSE\",\"contextAttributeId\":\"$param_assetId\",\"name\":\"Asset\",\"contextTagList\":[{\"name\":\"ClaimItemAsset\"}]}],\"contextTagList\":[{\"contextNodeId\":\"$param_claimItemId\",\"name\":\"ClaimItem\"}]}],\"contextTagList\":[{\"contextNodeId\":\"$param_claimId\",\"name\":\"Claim\"}]}],\"contextMapping\":[{\"name\":\"Claim Order Mapping\",\"isDefault\":\"TRUE\",\"contextNodeMappings\":[{\"contextNodeId\":\"$param_claimId\",\"sObjectName\":\"Claim\",\"contextAttributeMappings\":[{\"contextAttributeId\":\"$param_claimaccountId\",\"hydrationSource\":\"SObject\",\"contextSObjectHydrationInfoList\":[{\"sObjectDomain\":\"Claim\",\"queryAttribute\":\"Account\",\"parentContextSObjectHydrationInfoList\":[{\"sObjectDomain\":\"Account\",\"queryAttribute\":\"Name\"}]}]}]},{\"contextNodeId\":\"$param_claimItemId\",\"sObjectName\":\"ClaimItem\",\"contextAttributeMappings\":[{\"contextAttributeId\":\"$param_assetId\",\"hydrationSource\":\"SObject\",\"contextSObjectHydrationInfoList\":[{\"sObjectDomain\":\"ClaimItem\",\"queryAttribute\":\"Asset\",\"parentContextSObjectHydrationInfoList\":[{\"sObjectDomain\":\"Asset\",\"queryAttribute\":\"Name\"}]}]}]}]}]}}]}}",
9   "sourceDefinitionId":"11Oxx0000007MnhEAE",
10   "contextTtl":30
11}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
contextTtlIntegerTime to live (TTL) of context.Optional59.0
descriptionStringShort description of context definition.Optional59.0
developerNameStringDeveloper name.Required59.0
endDateStringEnd date till context definition is valid.Optional59.0
isActiveBooleanSpecifies whether context is active (true) or not (false).Optional59.0
nameStringName of the context definition.Required59.0
payloadStringJSON payload containing all the definitions and mappings.Optional59.0
sourceDefinitionIdStringSource context definition ID.Optional59.0
startDateStringStart date from when context definition is valid.Required59.0

Response Body for POST 

Context Definition Information