Build Context Action

Build and cache context data associated with a context definition.

This action is available in API version 59.0 and later.

Available in Developer, Enterprise, Professional, and Unlimited editions for Industries clouds where Context Service is enabled.

URI: /services/data/vXX.X/actions/standard/buildContext

Where XX.X is the latest API version.

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is a variable.

InputTypeDescription
contextDatastringOptional. JSON data that’s used to build context data.
contextDefinitionIdstringRequired. The ID or developer name of the context definition record that’s used to build context data.
contextMappingIdstringOptional. The context mapping record ID or name that identifies which Salesforce object and mappings to use for building context data.
isTaggedDatabooleanOptional. Indicates whether the associated context node is tagged with a key (true) or not (false).
OutputTypeDescription
contextDefinitionIdstringThe ID or Developer Name of the Context Definition record that was used to build context data.
contextIdstringID of the cached context data.
contextMappingIdstringThe Context Mapping record ID or Name that identifies which Salesforce object and mappings to use for building context data.

Build context invocable action is a wrapper over Build Context business API. The API fetches the data passed in request and saves the data to the cache. This is useful when the same data is required in multiple steps of the process.

POST

This sample request is for the Build Context action. In this example, we are inserting new records to hydrate input values (input hydration). To use existing records instead, reference the IDs directly rather than providing full record data.

This sample response is for the Build Context action.