Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Get Context Data Action

Retrieves the context data that is passed as an input to a prompt template that generates a summary of the data.

This action is available in API version 62.0 and later.

Supported REST HTTP Methods

URI
/services/data/v68.0/actions/standard/getContextData
Formats
JSON, XML
HTTP Methods
GET
Authentication
Authorization: Bearer token

Inputs

Input Details
contextInputRepresentation
Type
List<Apex>
Description
Required
A collection of Apex embeddedai__ContextInputRep records that contain details of the hierarchical data of the sObjects to get the context data for.
contextDefinitionName
Type
String
Description
Required
The name of the context definition to use to get the context data.

Outputs

Output Details
recordApexRepresentation
Type
List<Apex>
Description
A collection of Apex embeddedai__RecordApexRepresentationrecords that contain the context data.

Example

Sample Request

1{
2    "inputs": [
3        {
4            "contextInputRepresentation": [
5                {
6                    "mappingName": "OutcomeSummaryMapping",
7                    "ids": [
8                        "9OCxx0000004C92GAE"
9                    ],
10                    "objectName": "Outcome",
11                    "nodeName": "SummaryContext"
12                }
13            ],
14            "contextDefinitionName": "CareProgramOutcomeSummary__stdctx"
15        }
16    ]
17}

Sample Response

1[
2    {
3        "recordApexRepresentation": [
4            {
5                "relatedRecordData": [
6                    {
7                        "relatedRecordData": [
8                            {
9                                "recordData": [
10                                    {
11                                        "value": "Percentage",
12                                        "key": "UnitOfMeasureName"
13                                    },
14                                    {
15                                        "value": "Symptom Monitoring",
16                                        "key": "IndicatorDefinitionName"
17                                    }
18                                ],
19                                "objectType": "IndicatorAssignment"
20                            }
21                        ],
22                        "recordData": [
23                            {
24                                "value": "Reduced Symptoms",
25                                "key": "Name"
26                            }
27                        ],
28                        "objectType": "Outcome"
29                    }
30                ],
31                "recordData": [
32                    {
33                        "value": "Drug Use Satisfaction Improvement Program",
34                        "key": "Name"
35                    }
36                ],
37                "objectType": "CareProgram"
38            }
39        ]
40    }
41]