Context Mapping (POST, PATCH)

Create and update context mappings.

Resource 

1/connect/context-definitions/{contextDefinitionId}/context-mappings

The {contextDefinitionId} parameter is the ID of the context definition.

Example for POST 

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

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

Example for PATCH 

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

Available Version 

59.0

Requires Chatter 

No

HTTP Methods 

POST, PATCH

Request Body for POST 

JSON Example 

1{
2  "contextMappings": [
3    {
4      "name": "ExampleMapping",
5      "description": "Example Mapping Description",
6      "isDefault": true,
7      "intents": [
8        "ASSOCIATION",
9        "HYDRATION",
10        "PERSISTENCE",
11        "TRANSLATION"
12      ]
13    }
14  ],
15  "generateInputMappings": false,
16  "generateSObjectMappings": false
17}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
contextMappingIdStringID of this context mapping. Required for update.Required59.0
contextNodeMappingsContext Node Mappings Input[]List of context node mappings.Optional59.0
descriptionStringDescription of context mapping.Optional59.0
isDefaultBooleanIndicates whether to make a default mapping for the context definition (true) or not (false).Optional59.0
intentsList<String>Purpose that’s used to identify the type of required context mapping.
Valid values are:
  • HYDRATION—To load cache from a data source.
  • PERSISTENCE—To load the sink objects from cache. Sink objects are the final destinations for the processed data.
  • ASSOCIATION—To create a mapping without validating database relationships, attaching context structure nodes and their attributes with data source nodes and their attributes.
  • TRANSLATION—To transform the data loaded in the cache to another representation defined by the mapping.
Optional61.0
nameStringName of the context mapping.Required59.0

Response Body for POST 

Context Mapping List Output

Request Body for PATCH 

JSON Example 

1{
2    "contextMappings": [
3      {
4        "contextMappingId": "11jxx0000005UXnAAM",
5        "contextNodeMappings": {
6          "contextNodeMappings": [
7            {
8              "attributeMappings": {
9                "contextAttributeMappings": [
10                  {
11                    "hydrationDetails": {
12                      "contextAttrHydrationDetails": []
13                    },
14                    "contextAttributeId": "11nxx000001ihzFAAQ",
15                    "contextInputAttributeName": "Node1A1"
16                  }
17                ]
18              },
19              "contextNodeId": "11oxx000001HS0iAAG",
20              "sObjectName": "Node1"
21            }
22          ]
23        }
24      }
25    ]
26  }

Response Body for PATCH 

Context Mapping List Output