Redigera

Dela via


Display custom context in Conversation summary

Important

Power Virtual Agents capabilities and features are now part of Microsoft Copilot Studio following significant investments in generative AI and enhanced integrations across Microsoft Copilot.

Some articles and screenshots might refer to Power Virtual Agents while we update documentation and training content.

The data type of the context variables is a JSON object with two properties—isDisplayable and Value. The JSON object has the following schema.

{
            "type": "object",
             "properties": {
                    "isDisplayable": {
                        " description": " Context variable should display in agent UI or not",
                        "type": "boolean"
                    },
                    "Value": {
                         " description": " Context variable value pass through bot , this can be string Boolean or number",
                        "type": "string or Boolean or Number"
                    }
                },
                "required": [ "isDisplayable", "Value" ]            
        }

The input value for isDisplayable is Boolean (true or false). The input value for Value can be Boolean, String, or Number.

To display the context variables in the Conversation Summary Control of conversations for Copilot Studio and Azure bots, use the isDisplayable property in the body of setContextProvider method.

Here's an example: {\"isDisplayable\":\"true\"," +"\"Value\":\"context variable value as string\"}

The isDisplayable property, when set to true, will display the context variables on the third tab of the Conversation Summary Control for a conversation. The Value property of the JSON object includes the user response or any other information in string, Boolean, or number format.

Display context keys.

Send custom context
setContextProvider