I was working on adding more functionality to Erpnext Telegram Integration app, And one of my friends asked me about the possibility of adding support for sending SMS notifications, and I liked the idea, and here we are.
So I have added SMS notifications to the app, You can find it in the Extra Notifications section under SMS Notifications.
I checked the SMS notifcation and it works. Good job
But I need to be able to send a “thank you” sms to customers once a sales invoice is submitted. This is possible in email, but I cannot seem to be able to figure this out in SMS
Its where you add your custom message and/or phone number. The receiver list takes an array, so even if its just one number make sure to wrap it in brackets.
Like I said I do not expect to hardcode the telephone numbers. I will be sending many sales orders to many customers, i expect the system to pick the phone numbers automatically based on the customer chosen
You can configure various notifications in your system to remind you of important activities. As the original Erpnext Notification.
Here chose the “Recipients” want to send to them the notification or use the checkbox “Dynamic Recipients” to get the recipient from the DocType dynamically if it has a Link Field like “Customer”, “Supplier”, “Student” or “Employee”, for this it needs to set up a Contact for the customer, supplier…, and make sure the contact is related to the customer or supplier… and has Primary Mobile number as default.
I also have interest in a WeChat integration into project management so that our sourcing team can integrate their WeChat conversations with suppliers into the Project Management doc_type which will allow us to aggregate all communication.
Have you or others tried to adapt the API for this purpose? I am willing to commit some budget to developers who can build and contribute to the core. @szufisher@srdgame
@youssef I followed the setup instructions and if I define recipient the sms is sent but if I select dynamic recipients I get the error below:
Traceback (most recent call last):
File “/home/ubuntu/frappe-bench/apps/erpnext_telegram_integration/erpnext_telegram_integration/erpnext_telegram_integration/doctype/sms_notification/sms_notification.py”, line 309, in evaluate_alert
alert.send(doc)
File “/home/ubuntu/frappe-bench/apps/erpnext_telegram_integration/erpnext_telegram_integration/erpnext_telegram_integration/doctype/sms_notification/sms_notification.py”, line 126, in send
self.send_sms_msg(doc, context)
File “/home/ubuntu/frappe-bench/apps/erpnext_telegram_integration/erpnext_telegram_integration/erpnext_telegram_integration/doctype/sms_notification/sms_notification.py”, line 146, in send_sms_msg
send_sms(
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/sms_settings/sms_settings.py”, line 56, in send_sms
receiver_list = validate_receiver_nos(receiver_list)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/sms_settings/sms_settings.py”, line 31, in validate_receiver_nos
throw(_(“Please enter valid mobile nos”))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 411, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 390, in msgprint
_raise_exception()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 344, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Please enter valid mobile nos