Skip to content

Amazon Connect - when creating custom attributes from $.Views.ViewResultData add a dot to the value

2

I am working with views in Amazon Connect trying to add a disposition code, when I end the call a view is opened, it contains a form with a dropdown, each option is a possible code to categorize the call, after the Show View block I have a Set contact attributes for setting the category or disposition code as custom attribute. blocks

I set the attribute with $.Views.ViewResultData.FormData.categoria.0 <- this is the option selected in the dropdown

Works as expected but the value of the attribute contains a dot at the start as following image shows: attribute

is this a normal behaviour or am I doing something wrong?

Could you give me hand with this?

  • You sure the . Isn’t coming from your form?

asked 2 years ago1.4K views

1 Answer
-2

The behavior you're experiencing with the dot appearing at the beginning of your attribute value is not typical and suggests there might be an issue with how the attribute is being set or how the view data is being processed.

When working with custom views in Amazon Connect, the output data from a view is typically set to the $.Views.ViewResultData flow attribute. For custom views with form components, the form data should be directly under the output, not nested under a "FormData" key.

Based on your description, you're trying to access the selected option from a dropdown in a custom view. The correct way to access this data would typically be:

$.Views.ViewResultData.categoria

You shouldn't need to include ".FormData" or the ".0" at the end. The ".0" suggests you're trying to access an array element, which isn't necessary for a single dropdown selection.

To resolve the issue:

  1. Double-check the structure of your view's output. Make sure the dropdown's value is being correctly set in the view definition.

  2. In your Set contact attributes block, try using just $.Views.ViewResultData.categoria as the value for your custom attribute.

  3. If the issue persists, you might want to add a Check contact attributes block before setting the attribute to log the contents of $.Views.ViewResultData. This will help you understand the exact structure of the data you're working with.

  4. Ensure that there are no unexpected spaces or characters in your view definition that could be causing this behavior.

If after trying these steps you still see the dot at the beginning of your attribute value, it would be worth reaching out to AWS support as this could indicate an unexpected behavior in how the view data is being processed or how attributes are being set in your specific instance of Amazon Connect.
Sources
Custom views in the Amazon Connect agent workspace - Amazon Connect
Amazon Connect launches APIs to programmatically configure views in step-by-step guides

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.