Skip to content

CHI-3295: use new prepopulate config in Twilio Lambda #2970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 31 commits into
base: CHI-3295-formdef_package_move
Choose a base branch
from

Conversation

stephenhand
Copy link
Collaborator

@stephenhand stephenhand commented May 14, 2025

Description

  • Change the new form definition file to use the form definition name rather than the contact rawjson property name (makes more sense since it's part of form defs)
  • Wire up this in the twilio lambda
  • Removed DefinitionVersionId enum from production code - it seems to just cause bugs and bring no benefit (did this trying to fix the build, probably not relevant to the issue in the end but probably worth keeping in, sorry it muddys the PR)

Checklist

  • Corresponding issue has been opened
  • New tests added
  • Feature flags added
  • Strings are localized
  • Tested for chat contacts
  • Tested for call contacts

Other Related Issues

None

Verification steps

AFTER YOU MERGE

  1. Cut a release tag using the Github workflow. Wait for it to complete and notify in the #aselo-deploys Slack channel.
  2. Comment on the ticket with the release tag version AND any additional instructions required to configure an environment to test the changes.
  3. Only then move the ticket into the QA column in JIRA

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

@stephenhand stephenhand changed the base branch from master to CHI-3295-formdef_package_move May 15, 2025 14:37
@stephenhand stephenhand requested review from GPaoloni and mythilytm May 16, 2025 08:32
Copy link
Collaborator

@GPaoloni GPaoloni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

One question: I see that only the Lambda version of pre-populate is updated here. Does this means that we intend to deploy this only after all accounts are relying on "backend contact creation"? If that's the case, could we also remove all the code regarding Flex contact creation as cleanup PR?

@@ -24,16 +24,16 @@ ENV lambda_name ${lambda_name}
# copy the hrm-lib package and labmdas folders so that the file: based
# dependency in package.json can be resolved
COPY ${lambda_dir}/${lambda_name} /tmp/build/${lambda_dir}/${lambda_name}
COPY ${lambda_dir}/../packages /tmp/build/${lambda_dir}/../packages
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few github lint notes up in this file, maybe address them?

const { preEngagement: preEngagementKeys, survey: surveyKeys }: PrepopulateKeys =
await loadConfigJson(formDefinitionRootUrl, 'PrepopulateKeys');

const isValidSurvey = Boolean(answers?.aboutSelf); // determines if the memory has valid values or if it was aborted
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ticket says

with no chatbot survey at all, the pre-engagement form should be used to prepopulate both the caller and child tabs.

I thought aboutSelf will be supported from preEngagementData too. Shouldn't that be the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants