Overview
The Report Builder V2 lets you analyze and export contact custom field data in CloudChat, cross-referencing that information with conversation data.
Step by step
1. Access the Report Builder V2
In the sidebar, go to the "Relatórios" (Reports) tab and click the last item — "Construtor de Relatórios V2" (Report Builder V2).
2. Create a new report
On the home page, click "Novo" (New) in the top right corner. You will see the full catalog of tables available in CloudChat.
3. Select the correct table
To analyze contact custom fields, select the CloudChat Conversations table — the first conversation option on the list.
Do not select the second conversation option. It has no direct association with conversation data and is meant for a different type of analysis.
4. Select the columns
With the table open, select the columns you want. We recommend including:
-
Conversation ID — unique identifier of each conversation
-
Created At — date on which the conversation was started
5. Apply a time period filter
To optimize performance and work with more recent data, apply a time period filter on the Created At column. We recommend using the last 90 days.
6. Add the contact custom fields column
In the columns area, search for "contact" and select Contact Custom Fields.
This field has a dictionary format:
-
The key is the identifier of the custom field
-
The value is the stored content
A conversation can have multiple custom fields, resulting in several key-value pairs. Example:
{"customAttribute1": "valor_x", "customAttribute2": "valor_y"}
7. Use the AI agent to extract the field you want
Click the sparkles icon (✨) to open the AI agent. Copy the prompt below, replace the two highlighted fields and paste it into the agent:
Generate a new column from the Contact Custom Fields field.
The Contact Custom Fields field is a text (varchar) field that can store multiple custom fields of the contact associated with that conversation, in a format similar to a dictionary, with this structure: {"key1": "value1", "key2": "value2"}. Do a brief analysis of the possible values in this column to get more context.
You must generate a new column called <<INSERT THE DESIRED COLUMN NAME HERE>> with the values of the field/key <<INSERT THE DESIRED KEY HERE>>.
Additional context:
#You are working on a Redshift database
#You must not use the JSON_VALUE function or try to convert the field to the JSON type. The user has already made it clear that, although the column is stored in a format similar to a dictionary, it is of the text type, so you will not succeed with JSON functions
#Sometimes the dictionary values are wrapped in double quotes "value" and other times in single quotes ''. Check whether this happens and, if confirmed, make sure it is handled
Replace:
-
<<INSERT THE DESIRED COLUMN NAME HERE>>→ the name you want to give the new column (e.g.:campo_customizado_1) -
<<INSERT THE DESIRED KEY HERE>>→ the exact key as it appears in the data (e.g.:customAttribute1)
After adjusting the prompt, send it to the agent and wait for processing.
8. View and export the results
Once the analysis is complete, you will have a table with the processed data. From there you can:
Export the data: click the download icon to run external analyses.
Create charts in the builder itself:
-
Remove the columns that will not be used in the visualization
-
Add an aggregation (e.g.: distinct count of conversations per field value)
-
Click "Gráfico" (Chart) and set up the axes:
-
X axis: custom field
-
Y axis: conversation count
-
9. Save as a dashboard
In the top right corner, click + Dashboard to turn the analysis into a dashboard and save it in your company's folder on the "ClaudIA Panel/Centro" (ClaudIA Panel/Center) tab. That way anyone on your team can reuse the report at any time without having to recreate it from scratch.