Workflow Automation Set up for RingCentral Messaging - Zoho CRM, Ring Central SMS, Texting Extension

Workflow Automation Set up for RingCentral Messaging - Zoho CRM, Ring Central SMS, Texting Extension

The following is a simple code to add as a custom function for a workflow to trigger an SMS messaging using the RingCentral SMS Extension for Zoho CRM:
(the below script is hard coding the phone and email for the sender you can also tweak the code to always use record owner phone and email - remember they need to be authorized to use the extension also and phone number/email combo must match the RingCentral)

If your extension is Version 25 and above please use this code:

Multi-user workflow

This script uses the email of the owner of the record and looks for the phone number in their profile under the phone field to authenticate and send text from that number. The number must match the RingCentral number.  Replace CONNECTIONNAME with your connection set up for CRM USERS ALL.
1.      This is for the leads module.  

Click EDIT ARGUMENTS - select clientid = lead id

Function Code: 

if(input.clientid != null)

{

lead = zoho.crm.getRecordById("Leads",clientid);

leadowner = lead.get("Owner").get("name");

ownerid = lead.get("Owner").get("id");

owneremail = lead.get("Owner").get("email");

num = ifnull(lead.get("Mobile"),"");

fname = ifnull(lead.get("First_Name"),"");

user_email = owneremail;

response = invokeurl

[

url :"https://crm.zoho.com/crm/v2/users/" + ownerid

type :GET

connection:"CONNECTIONNAME"

];

uservalue = response.get("users").toList();

for each  rec in uservalue

{

phone = ifnull(rec.get("phone"),"");

}

sender = phone;

text = "Hi " + fname + ". This is " + leadowner + " welcome to our company";

//replace with text message

resp = ringcentralmessaging.message({"to":num,"from":sender,"text":text,"user":user_email});

info resp;

}


Remember user email and phone must match the RC authorized login.
In your workflow filter be sure to use IF MOBILE IS NOT EMPTY so you don't fire a text to a lead without a phone number.
Make sure your API names are Mobile for the mobile phone field.  
To check your API Names follow these instructions: https://www.zoho.com/crm/help/api-names.html

How to set up the connection: 



How to set up a workflow:



How to authorize users:


    • Related Articles

    • Install documentations of our RingCentral Messaging - Ring Central SMS, Text with Zoho CRM

      Important: If you used our older RingCentral SMS extension before, the workflow functions and custom modules for text messages do not transfer.  Workflow functions need to be recreated.  Old text messages need to be exported and re-imported into the ...
    • How to Use RingCentral SMS - Zoho CRM Extension

      1. Navigate over to LEADS or the CONTACTS module.   2. In the LIST view you can select a LEAD/CONTACT and see a button top labeled RIngCentral SMS - press it 3. See a WIDGET window open up and display the conversation window.  In the number dropdown, ...
    • Trouble shooting and known issues in RingCentral SMS - Zoho CRM

      Zoho CRM Enterprise or Zoho ONE License required. The phone number must be owned by the user and must have SMS enabled.  Toll-free numbers and fax numbers do not qualify. Line breaks are not possible in the text message body.  (Working on a fix in ...
    • How to add texting button to a custom module

      1.  Go to SETTINGS and WIDGETS in Zoho CRM 2. Press the button to the right: CREATE NEW WIDGET 3. Add a name you would like, I used RC SMS Widget RC SMS Widget Widget Type: Button Hosting: External Base ...
    • How to clean phone numbers with schedules

      Watch this video: ​ The below script was used in the video: loops = {1,2,3,4,5,6,7,8,9,10,11,12}; // create a custom view with criteria Phone contains ( OR Phone contains - // copy the custom view ID from the URL CUSTOM_VIEW_ID = IDGOESHERE; for ...