Serialize Hierarchical Context Data

Serializes the hierarchical context data from the Apex embeddedai__RecordApexRepresentation records that are passed as 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/vXX.X/actions/standard/serializeHierarchicalContextData

Where XX.X is the latest API version.

Formats: JSON, XML

HTTP Methods: GET

Authentication: Authorization: Bearer TOKEN

Where TOKEN is your OAuth access token.

Inputs 

InputTypeDescription
recordApexRepresentationApex typeRequired
A collection of Apex embeddedai__RecordApexRepresentation records that contain the details of the hierarchical data to serialize context data

Outputs 

OutputTypeDescription
serializedContextDataStringA JSON string of serialized hierarchical context data.

Example 

Sample Request

1{
2    "inputs": [
3        {
4            "recordApexRepresentation": {
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}

Sample Response

1{
2        "serializedContextData": {
3            "CareProgram": {
4                "Name": "Drug Use Satisfaction Improvement Program",
5                "Outcome": [
6                    {
7                        "Name": "Reduced Symptoms",
8                        "IndicatorAssignment": [
9                            {
10                                "IndicatorDefinitionName": "Symptom Monitoring",
11                                "UnitOfMeasureName": "Percentage"
12                            }
13                        ]
14                    }
15                ]
16            }
17        }
18    }