Details
-
Type: Sub-task
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.0
-
Fix Version/s: 4.2.0
-
Component/s: None
-
Labels:None
Description
There can be two action added : 1) "Send SMS for Contacts" 2) "Schedule / Send a Mass SMS" to be performed on selected contacts from contact search screen.
This issue relates to the first one .
Applying the task takes to another page where inputs are taken for :
Provider (any default provider would be selected by default)
Name The SMS text field (used as subject for activity during its creation)
Send At (time to send the message)
Invalid After
SMS text
Re-use existing 'Send a mass mail' UI form elements for text inputs / saving template etc.
Hooks should allow injecting more form elements here.
All the params entered on this screen should be sent all the way to $provider->send() method which would be responsible for calling the provider api.
Other stats would be useful to show like:
A count of number of contacts selected
Number of valid contacts with having a phone number (to which sms would be sent)
Invalid contacts (like already marked as do_not_sms)
Clicking 'Send SMS' button and after confirmation:
- activities are created for each contact with subject as 'SMS Sent'.
- immediate calls are made to the api via $provider->send(). No cron is required in this case.
Make sure that we re-use mailing schema structure and helper functions.
Action code should be written in a way that allows various providers inject / modify input options. And similarly handle post-process.