Finding date difference using formula field

Obviously we can use Deluge script in custom function to calculate the age or difference between two date- But to trigger custom function we need to have ‘when event’. Instead of using workflow rules/custom function simply we can use formula field to show the calculated value all time. Lets see- how we can do this:

Consider a scenario where we want to know – how many days since the client(Patient) started treatment? Just use following formula for a formula field.

Datecomp(Now(),${Clients.Treatment Start Date})/60/24

And done!

 

 

Creating task using Custom function

Here’s sample code to create a task using Deluge script that can be used in Workflow automation rules of Zoho CRM.

crmResp = zoho.crm.getRecordById(“Contacts”,input.cid);

first=ifnull(crmResp.get(“First Name”),””);
last=ifnull(crmResp.get(“Last Name”),””);
name=first + ” ” + last;
mp=map();
mp.put(“SMOWNERID”,ifnull(crmResp.get(“SMOWNERID”),””));
mp.put(“Subject”,”Send Demand Letter”);
mp.put(“SEMODULE”,”CustomModule4″);
mp.put(“SEID”,input.dvid); //ID for SEMODULE
mp.put(“Status”,”Not Started”);
mp.put(“Due Date”,addDay(zoho.currentdate,25));
mp.put(“Priority”,”High”);
mp.put(“CONTACTID”,input.cid);
createres = zoho.crm.create(“Tasks”,mp);

Search Records in Custom Module of Zoho CRM

Don’t waste your time to write some Deluge script using zoho.crm.searchRecordsByPDC(<moduleName>,<criteriaColumnName>,<criteriaColumnValue>) function in Custom Module. Simply it won’t work as it only works with some predefined module and column. Same massage for the function  zoho.crm.getRelatedRecords(<ModuleName>,<PrentModuleName>,<RecordID>,fromIndex,toIndex).

Use this <variable>= zoho.crm.searchRecords(“<moduleName >”, “<criteria>”, fromIndex, toIndex) instead to get it done! Sample code is given below:-

contactIdStr=input.cid.toString();
vpatient = zoho.crm.searchRecords(“CustomModule4″,”(Patient|doesn’t contain|Null)”);
for each clientrec in vpatient
{

info clientrec;

}

 

How to pull others field data along with look up field in Zoho CRM

Consider 2 Custom module , one is Doctors and another one is Dr. Visits. In Dr.Visits module have a look up field for Doctors module. Sometimes it might be required to pull some others data from Doctor module to Dr.Visits module. In this case, a custom function can be used in workflow rules automation. Please find the below code as for example-

void Pullingdocdata (int did int dvid )

rec = zoho.crm.getRecordById(“CustomModule3″,input.did);
dsp=rec.get(“Specialty”);
phn=rec.get(“Phone”);
modality=rec.get(“Modality”);
crmRsp = zoho.crm.updateRecord(“CustomModule4″,input.dvid.toString(),{ “Doctor Specialty” : dsp, “Doctor Phone” : phn, “Modality” : modality });

Thanks!

 

Copying ‘Contacts’ field value to ‘Potentials’ using Custom function in Zoho CRM

Sometimes it may require to update Potential field value by the related ‘Contacts’ data. We can do it using Workflow automation with Custom function. You may know, Custom function only supported in Zoho Enterprise edition. Anyway, we can set the trigger on record create or edit action based on necessity. Following code snippet was for copying ‘Date of Birth’ and ‘SSN’ number from Contacts to potential when a record is created in Potentials module.

Set the argument first , here’s a sample. In this case, we had email in Potential, that we used to find out the related contact directly.

copyfieldvalue

 

After argument mapping, we need to retrieve the contact’s information that required to push in potentials. finally we need to update the potential. Here’s the sample code snippet-

 

Res=zoho.crm.searchRecordsByPDC("Contacts", "email", input.conemail).get(0);
dob=Res.get("Date of Birth");
ssn=Res.get("SSN4");
crmRsp = zoho.crm.updateRecord("Potentials",input.billid.toString(),{ "DOB" : dob, "SSN4" : ssn });

 

Hope, this would help someone to get an idea at least! Please feel free to ask any question if you have.

 

 

Zoho CRM custom function: Creating a potential for a contact

In Zoho CRM, we can create a potential upon lead conversion to Contact or Account. Sometimes it may require to create a potential after performing some sales activities on ‘Contacts’ as per business logic. Although we can create a potential for a existing contact using quick action link, we can automate this using workflow rule. To do this need to set a workflow rule for ‘Contacts’ module on field update or edit action. Use following custom functions to be attached to that workflow rule:

Custom function

Contact_id=input.ConID.toString();
rec = zoho.crm.getRecordById("Contacts",input.ConID);
potentialmap=map();
potentialmap.put("Potential Name",((((rec.get("First Name")) + " ") + rec.get("Last Name")) + " ") + rec.get("Provider"));
potentialmap.put("Closing Date",zoho.currentdate.addDay(30));
potentialmap.put("Stage","New");
potentialmap.put("Contact Name",((rec.get("First Name")) + " ") + rec.get("Last Name"));
ResCRM = zoho.crm.create("Potentials",potentialmap);

 

Hope, this would helps someone.

How to mass update (more than 100 records) in Zoho CRM

If you are familiar with Zoho CRM administration, you may noticed we can’t mass update more than 100 Leads/Contacts at a time as it allows only 100 records to be shown for a list view. If you need to perform mass update large amount of data with this ‘Mass update’ option , it will take large amount of time as well :( . Another drawback is, not possible to update multiple field values for selected 100 records. So if we want to get things done ,following trick can be very handy.

  • Creating report :   With desired criteria create a tabular report first so that it come up only with the records that need to be updated.  Don’t forget to include the fields that need to be updated as column, also include the mandatory fields of respective module.    Zoho Report
  • Exporting the Report:  Export the report in .xls or .csv format we just created earlier.
  • Update the Report :  Update the Excel file.
  • Importing back the updated file:  Now time to import the updated file in CRM. To get updated data in CRM,  it’s very important to choose overwrite option while importing data so that it can’t create new records and mapping RecordID properly along with other fields. Are you missing RecordID field to map with? Just un-check the following option on leads or contact layout page and start again from beginning , got it?duplicate and finish the importing. Now all records should be updated instead of adding new records, what does says import history?

Let me know if you have any questions.

Why Aweber Single Opt-in doesn’t work for Twitter Lead Generation Card

Couple of weeks ago I posted a blog that describes the way of integrating Twitter Lead Generation card with Aweber. It’s very common thing that you won’t want to confirm their subscription back again, as they already opted-in through clicking the ‘Call-to-Action’ button to get subscribed and there is a another strong reason to expecting turning off double opt-in process with Twitter Lead Generation card that is zero possibility of getting fake email id as it collects user’s original twitter handle. But, unfortunately Aweber don’t turn off sending confirmation email. If the Aweber don’t get adding URL information (Subscription Source) for where they signed up the confirmation message would be sent.

 Fig: Subscription source

Some of the more popular reasons for why the Adding URL would
not be sent to AWeber when a subscriber signs up include:
— A bookmark is selected.
— The URL is typed into the address bar.
— Some other program launches the URL other than the browser.
— If the user has the page set as their homepage.
— From some local file based link (viewing a disk based HTML file).
— From page links dragged to the address bar on browsers that support
it.

Some browsers won’t send an Adding URL when:
— There is an unsupported or optional feature. Many browsers have
options to turn off referral string generation as a security precaution
which would stop the URL from being sent to us.
— When “open this link in a new window” is selected in the browser.
— If security settings are high.
— If using a proxy server or other filtering agent.
— If it is a secure page. Some browsers won’t send an external referral
string as a security precaution

Hope it will helps someone.

 

Integrating Twitter Lead Generation Card with Aweber

Twitter ads is playing vital role to online marketer. In this post , we will see how we can integrate Twitter Lead generation Card with Aweber, so that the twitter user can turn into subscriber with single click ,no need to type name or email separately.  Lets quick jump to action.

  •  Login Twitter ads
  • Find the cards and create new one or edit existing one

 

  • Fill up the card contents with required description , images , call-to-action
  • Can be set up destination URL where user will be redirected once submitted the card.

Integration : Data settings (Optional)

 This is the area that will be used for integration of Aweber or any other email marketing tools or CRM. Need to create first a simple sign up form under Aweber list and select raw HTML for simplicity.  I have attached here 2 infographics that present field mapping to get things done. Color indicating the code/values that need to put in Twitter data setting fields.

 

 

Don’t forget to save the settings. Twitter will send the Twitter handle info of the account holder for testing purpose and check back the subscription process on Aweber. Got it?
Feel free to contact if needed.

N.B: Aweber Single Opt-in doesn’t work for Twitter- Click here for details.

Exporting Leads or Contacts who has no NOTE in Zoho CRM

As a part of sales process common and effective practice is adding note for particular lead or contact or account.

Normally we can create custom views with specifying criteria , but if we look at all available criteria option, we won’t find any that speaks abut ‘Note’.

So,It’s not possible to make segmented list for those who don’t have note inside the Leads, Contacts or others modules. For more clarification , Note is another module in Zoho CRM (Did you know that?) and currently Zoho doesn’t support relational custom view inside certain module.

In this situation what we have to do is creating report. Report allows us to select related module and can be specified criteria afterward.

And specify criteria as Note Content is Empty.
Now ready to export that report in Excel , CSV or PDF whatever you want.
Thank you!