Group And Format
Group And Format brings together the records that share the value of a field and, for each group, writes a single text that joins the information of all its records using the template you define. It is useful for preparing summaries or documents per customer, per category or by any other criterion.
When to use it
- You have a list of incidents and want one text per customer with all of theirs, so an agent can summarise it.
- You want to prepare one document per product category with each product’s description.
- You need to put together all the survey answers per department before analysing them.
Configuration
| Field | What it does |
|---|---|
| Key Column | The field to group by, for example customer. Values that differ only in upper case or spaces are treated as the same group. |
| Data | The records you want to group. |
| Template | How each record is written inside the group’s text. Put a field name in braces to insert its value, for example {date}: {description}. Default: {text}. |
Advanced options
| Field | What it does |
|---|---|
| Separator | What goes between one record and the next inside the group’s text. Default: a line break. |
| Metadata keys | Extra fields, separated by commas, that you want to keep in each group. They are taken from the group’s first record. |
Output
The Processed Data output returns one record per group, with:
text: the group’s text, with all its records written according to Template and joined with Separator.- The Key Column field with the group’s value.
id: the group’s value in lower case and with underscores instead of spaces.- The Metadata keys fields, if you set any.
Example
A technical support team wants a weekly report per customer.
- Connect the week’s incident list to Data.
- In Key Column, type
customer. - In Template, type
{date} - {type}: {description}. - Connect Processed Data to an agent that writes, for each customer, a summary of their incidents from the
textfield.
Good practices
- Use as Key Column a field every record has, such as a name or a code. Numbers are grouped by their value; records without that field are put together in one group with an empty
id.
Related components
- Group By Keys: groups records keeping their data as a list, without turning it into text.
- Parse Data: turns records into text with a template, without grouping.