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

Define a template in Lob with the least amount of cardinality #183

Open
waldnzwrld opened this issue Apr 21, 2022 · 5 comments
Open

Define a template in Lob with the least amount of cardinality #183

waldnzwrld opened this issue Apr 21, 2022 · 5 comments
Assignees
Labels
⚙️ Back-end Back-end related issues. onboard campaign
Milestone

Comments

@waldnzwrld
Copy link
Contributor

waldnzwrld commented Apr 21, 2022

In order to effectively store sent letters in a database we need those letters to remain fairly consistent.

A template with the lowest cardinality would be as simple as

Hello {{ elected_official }},

{{ body }}

Thank you,

{{ constituent }}

We could utilise a more complex template however we want the same variables in any template that we would use so that database retrieval and storage is not overly complex.

@manishapriya94
Copy link
Contributor

  • Potentially shifting letter_versions to have a letter_object where template_id is. template_id is shifted to campaigns data structure
  • Letter object can have the above structure. Potentially a place to research other outlines too
  • Merge variable to be sent would be in the template ID

Questions:

  • How do people add the default templates from advocacy groups to this letter versions table
    • create a management backend (blank form)

@manishapriya94
Copy link
Contributor

manishapriya94 commented Apr 29, 2022

Session with @waldnzwrld @mayamessinger @JamesMGreene

Calling API (have all letter info in memory)
Will be stored when sent - object in database and link it through ID?
--> concern is PII user info

  • phone
  • address
  • name

Constituent Table: separate user model:
Use phone to verify
Cause has a list of letters (each specific letter is linked to a user)
Use any mapping API

Letters would have campaign ID
Campaigns has a 'has many' relationship with letter_sent
letters.count to replace row of # letters

Constituent table:

  • add phone number
    (we might not need hashing or salting if no API or URL touchpoints with the constituent table or if a user can access through UI)

Current protection of Database:

  • CI specific people to draw from user table? (devs currently)
  • Heroku access in order to see the table data

Auth0 notes to see what backend does

@SAUMILDHANKAR
Copy link
Contributor

@manishapriya94 Hi Manisha, just wanted to check with you if you would recommend me picking up this issue as part of epic 1. Looking forward to your guidance. Thanks.

@manishapriya94
Copy link
Contributor

Sure thing, @paramsiddharth is leading this one

@paramsiddharth
Copy link
Member

@manishapriya94 Hi Manisha, just wanted to check with you if you would recommend me picking up this issue as part of epic 1. Looking forward to your guidance. Thanks.

@SAUMILDHANKAR Hi Saumil! Feel free to pick this up. This is one of the main issues under the epic. Let me know if you have any questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Back-end Back-end related issues. onboard campaign
Projects
Status: Overall Guiding Epics this Cohort
Development

No branches or pull requests

4 participants