Skip to content
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

Support multiple eligibility verifiers per agency #317

Closed
19 tasks done
thekaveman opened this issue Mar 15, 2022 · 1 comment
Closed
19 tasks done

Support multiple eligibility verifiers per agency #317

thekaveman opened this issue Mar 15, 2022 · 1 comment
Labels
epic Issues that document a large set of features and/or decisions

Comments

@thekaveman
Copy link
Member

thekaveman commented Mar 15, 2022

Date: March 2022
Deciders: @angela-tran @thekaveman

Background

Early thinking

To introduce Courtesy Card support, we outlined a wholesale refactor of the data model and the way in which the UI was composed in #253. After some early exploration in #230, #265, and #266 -- we have decided that this is not an appropriate scope of changes to be making and actually reduces some amount of flexibility we have with the current architecture.

What we actually need

A simple way to express the need to support Courtesy Cards (and similar programs) in terms of benefits technical architecture is to say: Transit agencies in Benefits need to support multiple Eligibility verifiers. A user, having chosen their Transit agency in Benefits, must be able to choose which of the agency's verifiers they would like to use.

Coming full circle

An early data model in benefits had this notion that a Transit agency may have one or more Eligibility verifiers. In #26, the data model was simplified so that each agency had only a single verifier. Now we need to go back and undo what #26 removed in some sense (not necessarily verbatim).

User stories

Tasks

Selecting an Eligibility verifier

We need a new page where the user picks from the list of EligibilityVerifiers for the selected TransitAgency.

Decisions

  • Rework the eligibility app index page to present this selection
  • Django form is needed for this page to capture the choice
  • Store selection in session like agency
  • Edge case: If the agency only has one verifier, user could shortcut directly to the “Start eligibility” instructions page

Eligibility verification customizations

A few UI elements are now variable and must be configurable per TransitAgency:

Eligibility verification selection

The "discount option" labels, with (optional) extra description

image

Pre-form instructions page

The title, verification media item, and page blurb may all differ

image

Form page

The title, blurb, labels, and placeholders may all differ

image

Success page

No changes needed (page doesn't have anything that needs to be configurable per TransitAgency).

Failure page

The page content title and blurb need to be configurable per TransitAgency (see #319 (comment)).

Decisions

  • Store each of these items as new fields (TextField) on the EligibilityVerifier model
  • Store the msgid keys with database model, use to dereference message and translate at runtime
  • Handle form field validation as part of this by storing a regex pattern on the verifier for the sub field; update the common eligibility form to put a (generous) max length on the name field.
  • Look at adding fields to EligibilityType and pursuing Refactor model to split eligibility from benefit #90 only if/when we need to override labels or messaging for different scenarios

Eligibility verification flow

The Eligibility Verification API spec defines the fields that are sent with each request, only two of which are user-supplied. This means the eligibility form and verification logic should more or less work the same for any verifier. If a user is verified, regardless of which verifier that got them there, they proceed into the same enrollment flow.

Decisions

@thekaveman
Copy link
Member Author

The bulk of the work for the Courtesy Card integration in Benefits was completed, via the Task List above.

Some User Stories remain open, and will be fully addressed when the integration with a Courtesy Card verification server is complete.

This Epic is now closed.

Repository owner moved this from This Sprint to Done in Digital Services Apr 1, 2022
@thekaveman thekaveman unpinned this issue Apr 1, 2022
angela-tran added a commit to cal-itp/eligibility-api that referenced this issue May 18, 2022
This is to reflect the change that was made in cal-itp/benefits#317
(agency supports multiple verifiers).)
angela-tran added a commit to cal-itp/eligibility-api that referenced this issue May 18, 2022
This is to reflect the change that was made in cal-itp/benefits#317
(agency supports multiple verifiers).)
angela-tran added a commit to cal-itp/eligibility-api that referenced this issue May 19, 2022
This is to reflect the change that was made in cal-itp/benefits#317
(agency supports multiple verifiers).)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Issues that document a large set of features and/or decisions
Projects
Archived in project
Development

No branches or pull requests

1 participant