Try ERPNext Buy Support Partners Foundation

SMS Notifications Custom App

Hello community

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.

The SMS Settings is the original Doctype from Frappe, We should first record the SMS gateway settings from here.

And then we can add a new SMS Notification.

The SMS RECIPIENTS is a child DocType linked with Contact Master.

And we should make sure we have in the Contact Doc a Contact Number with Is Primary Mobile checked to appear in the Mobile No field.

And the rest is as the original Erpnext Notification.

You can find the app on GitHub.

Greetings

13 Likes

Hello @youssef

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

Can you point me in the direction to go?

Regards

You can try this:

Thanks @youssef

Will this work on v12? I just tested it now and it seems not to work.

The send_sms API has been moved to Frappe Core.

Try the code below:

var message= ***[Add message here]***    

frappe.call({
            method: "frappe.core.doctype.sms_settings.sms_settings.send_sms",
             args: {
               receiver_list: ***[add numbers here]***,
               msg: message,
             },
             callback: function(r) {
               if(r.exc) {msgprint(r.exc); return;
               console.log(message)}
             }
           });

Thanks @Tanuj

Could you explain what the [add numbers here} and message codes are for ?

I want the script to be able to pick the numbers from the contact list of the customer on the sales order automatically

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.

Thanks @Tanuj

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

Check this, please

To get Dynamic Recipients

You can use this option " Dynamic Recipients"

You should definitely consider preparing the contact as follows:

Note: This is a test branch and it will be merged after successfully testing it.

Really Cool

Just want is needed

Any hope of same for the Telegram Notifications too?

Yes, it has been updated with the same feature as well.

any possibility to support WeChat also?

@szufisher Please check this App:

Hi @Mohammed_Redha

Can you confirm if you have used this app and what it really does?

For now there no plans to support WeChat

Now SMS notification support Dynamic Recipients

in Extra Notifications:

  1. Go to → SMS Settings and set it up as here.

  2. Go to → SMS Notification → New

    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.

  3. Press Save.