FAQ
How can we help?
Full Site Search

Creating a custom automatic e-mail notification

Below is a sample that would send out an e-mail notification when a sales order entry is created by a customer. Notice that the parameters refer to the Field IDs, which can be looked up both in the design mode of your forms, and in the global javascript workflow.

var name=param.getNewValue(1001426);
var email=param.getNewValue(1001428);
var title=param.getNewValue(1001386);
mailer.sendMail(email,'Your Sales Order'+
                title,
                'Hi '+name+',<br><br>we have received your sales order '+
                'and will be processing your order very soon.<br><br>'+
                'You can see your order details at https://www.ragic.com/example/1<br><br>'+
                'Thanks.<br><br><br>Best Regards,<br><br>Sophia, Sales Manager<br><br>www.ragic.com');

If you're sending e-mail to multiple recipients, just separate each e-mail addresses with commas.

You can add this script to the form's "post-workflow" from the Javascript Workflow module.

As you can see in the e-mail example above, you can use HTML tags to format your e-mail. The e-mail being sent is in HTML format, so basically all HTML tags would work. You can also add your form entries as an attachment within the e-mail by appending the URL of the record as an extra parameter.

You can follow this format:

mailer.sendMail(email,subject,content,attachmentURL)

The last number in the URL is the record id of an entry, you can find the record id of a record by calling param.getNewNodeId to the key field. The key field field id can be found when you open the Javascript workflow editor.

Top of Page

    Start Ragic for free

    Sign up with Google