After I add step-by-step guides to Amazon Connect, I get schema errors when I render the guide in the agent workspace.
Resolution
Schema errors can occur when you incorrectly configure the JSON file in the Show view block. Use the Views UI template to build the JSON object structure. Then, add the JSON object to the Show view block in the contact flow.
To correctly configure the template, complete the following steps:
- Open the Amazon Connect admin account at https://yourinstancename.my.connect.aws/.
Note: You must use an Admin account. In the URL, replace yourinstancename with your instance's name.
- In the navigation pane, under Routing, choose Flows.
- On the Views tab, select your custom flow. The UI template is displayed on the navigation pane of the flow details page.
- Update the JSON object to match the schema criteria that you configured for your contact flow. For example, if your view has a List item that has dynamic Heading fields, then the schema for the view looks similar to the following:
{
"type": "object",
"properties": {
"List_1724068537123": {
"properties": {
"Items": {
"items": {
"properties": {
"Heading": {
"anyOf": [{
"type": "string",
"pattern": "^$|^(?!\\$\\.).+"
},
{
"type": "number"
}
]
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
In the preceding example, dynamic fields are displayed in camel case and start with a capital letter. The Items field has an array of objects for the field's type. The Heading field can be a string or number type.
To resolve the schema errors, update the JSON input in the contact flow based on your schema configurations. In the preceding example schema, update the contact flow object JSON to the following:
{"Items":[{"Heading":"Management Service"}]}
For more information, see What are views? in the Amazon Connect interactive documentation.
Related information
amazon-connect-step-by-step-guides-module-library on the GitHub website
Best practices for Amazon Connect step-by-step guides