> ## Documentation Index
> Fetch the complete documentation index at: https://help.treble.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# fact_hsm_responses

> Answers users gave to HSM template questions.

# fact\_hsm\_responses

Each row is one answer a user gave to a flow step that sent an HSM (WhatsApp template) — typically the buttons or quick replies of a campaign's opening message. It is a focused subset of [`fact_treble_session_nodes`](/en/docs/data-warehouse-v2/fact-treble-session-nodes): only steps with a template that received an answer.

## What questions does it answer?

* Which button/option do users pick when they answer a template?
* Which templates get the most engagement?
* What exactly did users reply to each template?

## Columns

| Column                  | Type       | Description                                                                                           |
| ----------------------- | ---------- | ----------------------------------------------------------------------------------------------------- |
| `interaction_answer_id` | Int64      | Unique identifier of the answer — equals `fact_treble_session_nodes.node_record_id` for the same step |
| `company_id`            | Int32      | Your company (filtered automatically)                                                                 |
| `session_id`            | Int64      | The conversation flow it belongs to                                                                   |
| `hsm_id`                | Int32      | HSM template (join `dim_hsms`)                                                                        |
| `hsm_name`              | String     | Template name                                                                                         |
| `answer_text`           | String     | The user's reply text                                                                                 |
| `responded_at`          | DateTime64 | When the user answered (always set — unanswered templates are not in this table)                      |
| `poll_id`               | Int32      | Flow identifier                                                                                       |
| `poll_name`             | String     | Flow name                                                                                             |
| `cellphone`             | String     | User's phone number                                                                                   |
| `synced_at`             | DateTime64 | When this row was last written/corrected                                                              |

## Example queries

### Answer distribution per template, last 30 days

```sql theme={null}
SELECT hsm_name, answer_text, count() AS answers
FROM fact_hsm_responses
WHERE responded_at >= today() - 30
GROUP BY hsm_name, answer_text
ORDER BY hsm_name, answers DESC
```
