Export to your warehouse
Deploy (or update) the stack with DataExport=enabled and it creates a private, encrypted S3 bucket of its own (ExportBucketName output) and writes every day's responses into it. Nothing to configure beyond the parameter; nothing leaves your account.
What lands in the bucket
| Key |
Content |
responses/dt=YYYY-MM-DD/responses.json |
one JSON object per line per response whose contact happened that local day: ids, survey, channel, language, queue, agent, status, times, answers keyed by question id, flattened scores (csat, nps, ces, five, agentFive, low), sentimentLabel, evaluationPct, follow-up status, hours and outcome, customerHash |
responses/dt=YYYY-MM-DD/responses.csv |
the same day as the console's CSV export |
surveys/latest.json |
the survey definitions, so question ids join to their text, driver and type |
manifests/YYYY-MM-DD.json |
what was written, when, and how many responses were completed |
The function runs every hour and rewrites the previous local day (the stack's Timezone), so the first run after midnight creates the files and later runs pick up surveys completed late. Same keys, same content: a downstream loader that watches for new objects sees one file per day. Files expire with the stack's RetentionDays, like the table.
The web survey token never leaves the table. customerHash is the SHA-256 of the phone number or email, so repeat customers can be counted without the number itself.
Athena, ready made
The stack also creates a Glue database named after it (surveycx_<stack>, the ExportDatabaseName output) with a responses table over the JSON files, partitioned by dt through partition projection, so new days appear without crawlers or MSCK REPAIR. Three saved queries whose names start with "SurveyCX" sit in the Athena console: CSAT by queue for the last 30 days, CSAT by day for the last 90, and agents for the last 30. Open the Athena query editor, pick the database, run one. Athena charges per data scanned; the files are small and the queries filter on dt.
QuickSight
A dashboard takes about ten minutes once QuickSight is enabled in the account (it is a separate AWS subscription, per author and per reader):
- In QuickSight, Manage QuickSight › Security & permissions, allow access to Athena and to the export bucket (the
ExportBucketName output).
- Datasets › New dataset › Athena, data source name "SurveyCX", workgroup
primary. Choose the database surveycx_<stack> and the table responses. Use Direct query for live figures or SPICE for speed.
- Add calculated fields:
csat_top2 = ifelse(csat >= 4, 1, 0), promoter = ifelse(nps >= 9, 1, 0), detractor = ifelse(nps <= 6, 1, 0), day = parseDate(dt, 'yyyy-MM-dd'), and a filter status = 'completed'.
- Visuals that work well: a KPI of
avg(csat_top2) formatted as a percent; a line of avg(five) by day; a horizontal bar of avg(csat_top2) by queue; a table of agentname with count, avg(agentfive) and sum(low); a donut of sentimentlabel; a bar of language. The answers map is readable as answers.<question id> in Athena custom SQL if you want per-question charts.
- Share the dashboard with the supervisors who should see it; row-level security on
queue or agentarn keeps teams to their own numbers.
The hand-written Athena table below is the same thing for an account that prefers to manage its own catalog.
Athena, by hand
CREATE EXTERNAL TABLE surveycx_responses (
contactId string, surveyId string, surveyName string, channel string, language string, queue string,
agentArn string, agentName string, tenant string, status string, startedAt string, completedAt string,
csat double, nps double, ces double, five double, agentFive double, low boolean,
sentimentLabel string, evaluationPct double, followUpStatus string, followUpHours double, followUpOutcome string, resolved string,
customerHash string, answers map<string,string>
)
PARTITIONED BY (dt string)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
LOCATION 's3://<ExportBucketName>/responses/';
MSCK REPAIR TABLE surveycx_responses;
Then, for example, CSAT by queue for last month:
SELECT queue, round(avg(csat), 2) AS csat, count(*) AS answered
FROM surveycx_responses WHERE dt >= '2026-11-01' AND status = 'completed' AND csat IS NOT NULL
GROUP BY queue ORDER BY answered DESC;
QuickSight, Databricks Auto Loader, Snowflake external stages and Redshift Spectrum read the same files. For a pull model instead of files, the data endpoint returns the same rows with a data key.
Cost
S3 storage for the files (a busy centre produces a few megabytes a day) and one Lambda invocation an hour, both inside the free tier for most stacks. Athena charges per query by data scanned; partition by dt in every query.
Current as of version 0.20.0. See the release notes for what changed since.