Repository navigation
Conversation
This was referenced Nov 11, 2026
gpaoloni
marked this pull request as draft
November 12, 2026 20:19
gpaoloni
force-pushed
the
gian_CHI-4039-cleanup
branch
2 times, most recently
from
November 18, 2026 19:20
add5c1d to
9d11518
Compare
…ilder Move buildDataObject into a postSurvey module and share the post survey control task attributes, so the upcoming partial post survey saving can reuse them. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add recordPostSurveyAnswers, which stores the answered questions on the post survey control task (raw answers plus their Insights attributes) and upserts the post survey in HRM with all the answers so far. Blank surveys record nothing. Expose it to Studio as postSurvey/recordAnswers, and create the control task before triggering a post studio flow whose configuration sets createSurveyControlTask, passing its SID to the flow. Flows without the flag keep working as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the post studio flow TaskRouter listener unaware of what the flow it triggers does: instead of creating the control task there (behind the createSurveyControlTask flag), expose postSurvey/createControlTask so a post survey flow creates it as its first step and passes the returned controlTaskSid to postSurvey/recordAnswers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The post studio flow listener now sends the task language (or the helpline language, or en-US) to the flow it triggers: as taskLanguage on the inProgressCall redirect, and as the taskLanguage execution parameter for rest flows, which used to get an empty string when the task had none. postSurvey/createControlTask accepts it as an optional language, stored on the control task like the chatbot post survey does. getTaskLanguage moves to task/taskLanguage.ts so both listeners share it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Post survey chatbots (post-chat and post-call SMS) now record the answers after every helpseeker message instead of only when the bot finishes, so a survey left halfway keeps the answers given. Finishing the survey now only cancels the control task. Lower the post survey control task TTL from 1 hour to 15 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matches the 15 minute lifetime of the post survey control task. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the final hrm/savePostSurvey call with a postSurvey/recordAnswers call after each question, so answers survive a hang up mid-survey. The last question also sends surveyComplete. Failures continue to the next question. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iven Replace the final hrm/savePostSurvey call with a postSurvey/recordAnswers call after each valid answer, keeping the same question keys. The last question, and the paths that used to save after repeated invalid answers, send surveyComplete. Failures continue the survey; the closing message is the thank-you message, since earlier answers are already recorded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…recording Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
USNC and KHP English post-call survey flows call postSurvey/createControlTask as their first widget and pass its controlTaskSid to every recordAnswers call, instead of relying on the post studio flow listener to create the task behind the createSurveyControlTask service configuration flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ontrol task Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Voice post surveys now record their answers through postSurvey/recordAnswers as they are given, so hrm/savePostSurvey and the unused hrm/voicePostSurveyAction (Sync document based) are no longer called. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gpaoloni
force-pushed
the
gian_CHI-4039-cleanup
branch
from
November 18, 2026 19:44
9d11518 to
368a14f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Stacked PRs for CHI-4039 (save partial post-survey answers). Review and merge in order:
Removes the endpoints that saved post surveys only when they ended, now that every channel records answers as they are given:
hrm/savePostSurvey(savePostSurveyHandler) — replaced bypostSurvey/recordAnswersin the voice flows (PR 4).hrm/voicePostSurveyAction(voicePostSurveyActionHandler) — a Sync-document based variant no flow in this repo calls.hrm/savePostSurvey.ts(savePostSurvey) — no longer used by the chatbot (PR 3).hrm/savePostSurveysection ofSTUDIO_ROUTES.md.Merge and deploy only after PR 4 has been applied in every environment (USNC staging + production, CA staging), so no deployed flow still calls
hrm/savePostSurvey. After that, HRM'sPOST postSurveysis no longer used by the lambdas.Checklist
Other Related Issues
None
Verification steps
npm run test:unitinlambdas/.hrm/savePostSurveyorhrm/voicePostSurveyActionin the week before merging.AFTER YOU MERGE
You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P
🤖 Generated with Claude Code