Workflow configuration

Workflow configuration

UPDATED 12-6-2022



How to check API Names for the user module:




1. Create a new workflow
2. Instant action should be a new function ->  WRITE YOUR OWN
3. Argument mapping should be as follows



4. The function should be as below:

Lead = zoho.crm.getRecordById("Leads",LeadID);
if(Lead.get("id") != null)
{
	LeadOwner = Lead.get("Owner");
	FirstName = ifnull(Lead.get("First_Name"),"");

	Owner = zoho.crm.getRecordById("users", LeadOwner.get("id"));
	
	AccountId = "";
	if (Owner.get("users") != null){
		AccountId = Owner.get("users").get(0).get("RC_Account_ID");
	}

	ExtensionId = ""; // Extension ID if needed (optional)
	FromNumber = ""; // If different from account phone number (optional)
	ToNumber = Lead.get("Mobile");
	MsgText = "Hi there " + FirstName + " testing it"; // TODO: Customize the message text

//Important - if you received the extension from the Zoho Marketplace the below line changes to mpmultiuserringcentralsmsmessaging.sendRcSms(AccountId,ExtensionId,FromNumber,ToNumber,MsgText);
resp = multiuserringcentralmessagingextension.sendRcSms(AccountId,ExtensionId,FromNumber,ToNumber,MsgText); info resp; }
5. Each user has to have their account ID in the user profile here:




7. You can find each users ACCOUNT ID in the RC Account Manager module, bottom of page:

 
IMPORTANT: In order for it to work, the super admin has to be added to each users RingCentral profile in the RC Account Manager module.