Project

General

Profile

Actions

New feature / Change #7567

closed

Twilio / Whatsapp template management

Added by Olivier Bitsch 2 months ago. Updated 2 months ago.

Status:
Done
Priority:
Urgent
Assignee:
-
Category:
-
Target version:
Start date:
09/12/2024
Due date:
% Done:

0%

Estimated time:
48:00 h

Description

Since Twilio and Whatsapp update, it's not possible anymore to send custom body. Instead, templates needs to be used.

There the tasks:

  • Create new admin page to manage Twilio Whatsapp templates.
  • Creating a new template requires:
    • Existing language selection.
    • Sentense selection to send (config/locales/<language>.json, one of "patient invite", "guest invite", "scheduled patient invite", "scheduled guest invite", "first invite reminder", "second invite reminder", "first guest invite reminder", "second guest invite reminder", "notification for offline action text", and probably more.
    • replace variable like %(branding)s by {{1}} - see documentation
    • replace variable link by button - see documentation
  • Once create, have a button to send for approval, this will create the template over API and send for validation. Save the ID into MongoDB.
  • Pull every two minutes the status of pending approval template.
  • When approved, the template ID can be used.

For doctor interface:

  • Make Whatsapp unavailable for the language selected until the templates are approved.

Documentations:

Actions #1

Updated by Olivier Bitsch 2 months ago

  • Estimated time changed from 32:00 h to 48:00 h
Actions #2

Updated by Olivier Bitsch 2 months ago

  • Priority changed from Normal to Urgent
Actions #3

Updated by Olivier Bitsch 2 months ago

Use this config and don't do admin yet:

{
 "fr": {
    "scheduled patient invite": {
      "twilio_template_id": "ABC123",
      "params": ["${inviteTime}", "${branding}"]
    },
    "patient invite": {
      "twilio_template_id": "ABC123",
      "params": ["${inviteTime}", "${branding}"]
    }
  }
}
~~
Actions #4

Updated by Olivier Bitsch 2 months ago

  • Status changed from In Study to Done
Actions

Also available in: Atom PDF