gmo / common

MIT License
0 stars 0 forks source link

Integrate UL Survey into Path Discipleship Metrics #19

Closed robmomary closed 2 years ago

robmomary commented 2 years ago

For any GMO seekers handed off to UL, a followup survey is sent to the seeker using UL's survey platform at the following time increments:

3 Days 2 Weeks 2 Months 6 Months 1 Year

We need to pull data from that survey for GMO contacts into the GMO platform and be able to view those discipleship metrics inside PATH.

When a new metric is recorded in UL server, a post request will be made to the GMO webhook platform: /receive-impact-metrics.

The metric will get processed and mapped in this method to the appropriate GMO discipleship metric and recorded in the GMO database.

robmomary commented 2 years ago

The code for the GMO endpoint is built out here: https://github.com/gmo/path/pull/891

it touches: seeker table , preferences column discipleship_metric table discipleship_metric_progress table

For salvation, boolean true/false passed along with date For all others, we map the UL response to a level "3" and record date

robmomary commented 2 years ago

One item to note. The seeker -> preferences column appears to be storing JSON for discipleship metrics in 2 different ways:

{"prefs": {"what_can_i_be": null}, "seeker": {"name": null, "created_at_human": "2021-03-20 19:00"}, "social": {"preferred": "Email"}, "seeker_name": "", "conversation": {"assigned_to": "Thami Tam (celant)", "average_respond_time": "30 minutes", "usual_time_available": "13:00 - 19:00"}, "discipleship": {"bible": 3, "church": 1, "prayer": 4, "salvation": false, "next_steps": 0.55, "holy_spirit": 5, "bible_growth": "life-application", "church_growth": "consistent", "look_to_jesus": 0.25} }

And

{"discipleship": { "salvation": false, "next_steps": "", "bible_growth": "", "share_growth": "", "church_growth": "", "look_to_jesus": "", "prayer_growth": "", "holy_spirit_growth": ""} }

Before we deploy, we need to know which one we need to account for, or if we need to account for both!