Skip to content

[TICKET] - booking via sms #57

@cootook

Description

@cootook

Using Twilio to send and receive SMS messages.

Disable registration form, it is no longer available for clients. Only staff will be able to register via link that provided by admin.
On the main page with calendar when click on available slot a pop-up with form appears.
Form:

  • pick service
  • add message
  • enter phone number
  • enter name
  • reCaptcha
  • terms and conditions about SMS
  • buttons 'cancel' and 'book'

phone input:
https://www.twilio.com/en-us/blog/international-phone-number-input-html-javascript
https://github.com/jackocnr/intl-tel-input

https://app2.simpletexting.com/web-forms/terms/654d65258f51cb55a9016540?_gl=1*tn22zb*_gcl_au*NjI5NDkwMjUzLjE3MzI4Mzk3NjA.*_ga*MzkyMzgwNjI1LjE3MzI4Mzk3NjA.*_ga_29BK081ZTH*MTczMzM2ODAxMi4zLjAuMTczMzM2ODAxMi42MC4wLjE5OTMwMjEzNzg.
https://www.usehatchapp.com/blog/terms-and-conditions-examples

logic :

  • client clicks send form to book appointment
  • get the form, validate inputs
  • using 'From' phone number find or create a 'User' in database
  • create an 'Appointment'
  • login the client
  • create confirmation code, put it in database (add to 'Appointment' model new fields: 'confirmation_code', 'phone_confirmed')
  • send the code as SMS to the client. Include welcome message and how to opt-out.
  • render template with confirmation code input and hidden inputs with appointment info
  • client enters the code from SMS
  • rendere template "appointment request was sent. We process your booking as soon as possible."
  • send SMS to the client that appointment was requested

route that receives inbound SMS should seek for keywords:

  • STOP
  • START
  • HELP
  • YES
  • NO

create database table (model) to store Consents

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions