Marketo is a marketing automation tool that allows you to score your leads based on certain criteria and determine the more important prospects. This helps you plan your sales and marketing activities to these leads accordingly. In order to plan your sales activities accordingly, you will need a tightly knit integration between your CRM and Marketo accounts. The Marketo extension for Zoho CRM does this and more. This extension not only helps you to synchronize the leads from Marketo to Zoho CRM but also provides Single Sign-on which means you will be able to sign in to your marketo account using Zoho CRM credentials. Hence, no more multiple passwords. This extension has a daily scheduler to synchronize leads on a day-to-day basis and a connected app to facilitate the single sign on.
You can either go to the Zoho Marketplace and install the Marketo Extension or log in to your Zoho CRM account and install.
Note:
To obtain the Marketo Client ID and Client Secret:You will have to configure the Service Provider and Identity Provider settings for single sign-on using Zoho CRM. Here Zoho CRM acts as the Identity Provider, which means you will be able to sign in to your Marketo account using Zoho CRM credentials. For the Single Sign On to work effectively, all the users who are a part of your Zoho CRM system should also be added as users in your Marketo account. Otherwise, only the users who are part of both the accounts will be able to perform the SSO.
This configuration involves 2 steps:
To configure the SP details in Zoho CRM
To configure the IdP details in Marketo
Once you install and authorize the Marketo Extension, the custom schedule associated with the extension will be triggered automatically and will run everyday at the scheduled time as per your timezone. This scheduler will sync all the leads that were created the previous the day will be added to you CRM account.
This daily scheduler syncs data created only 24 hours prior to the current time of execution. However, you might want all your older data right from the time of creating your Marketo account to the current data to be added to your CRM account. This can be achieved with the help of the following custom script. You can write a custom function with this script and trigger it once to fetch all the existing data from Marketo.
In this functions, the line currentDate=(zoho.currentdate.subDay(1)).toString("yyyy-MM-dd"); is used to fetch all data created one day prior to the date of execution. You can modify this time limit according to your requirements. For example, if your Marketo account has data from up to 6 months prior, then set this value as 180 and execute the custom function once.
IdentityPoint = zoho.crm.getOrgVariable("marketoextension.IdentityURLPoint");
ClientID = zoho.crm.getOrgVariable("marketoextension.ClientID");
ClientSecret = zoho.crm.getOrgVariable("marketoextension.ClientSecret");
oauthUrl = "https://" + IdentityPoint + ".mktorest.com/identity/oauth/token?grant_type=client_credentials&client_id=" + ClientID + "&client_secret=" + ClientSecret;
tokenResponse = getUrl(oauthUrl);
tokenStr = tokenResponse.toString();
tokenMap = tokenStr.toMap();
info "AccessTokenMap=" + tokenMap;
if (tokenMap.size() != 0)
{
access_token = tokenMap.get("access_token");
currentDate = (zoho.currentdate.subDay(1)).toString("yyyy-MM-dd");
currentTime = zoho.currenttime.toString("HH:mm:ss");
requiredFormat = currentDate + "T" + currentTime + "-04:30";
leadUrl = "https://" + IdentityPoint + ".mktorest.com/rest/v1/activities/pagingtoken.json?sinceDatetime=" + requiredFormat;
headerMap = map();
headerMap.put("Authorization", "Bearer " + access_token);
tokenResponse = getUrl(leadUrl, headerMap);
tokenStr = tokenResponse.toString();
tokenMap = tokenStr.toMap();
// info "nextPageTokenMap" + tokenMap;
if (tokenMap.size() > 0)
{
nextPageToken = tokenMap.get("nextPageToken");
leadUrl = "https://" + IdentityPoint + ".mktorest.com/rest/v1/activities.json?nextPageToken=" + nextPageToken + "&activityTypeIds=12";
leadMap = getUrl(leadUrl, headerMap);
// info "leadMap==" + leadMap;
reqLeadMap = (leadMap.toString()).toMap();
resp = reqLeadMap.get("result").toJSONList();
for each element in resp
{
leadRecordMap = element.toMap();
lastName = leadRecordMap.get("primaryAttributeValue");
criteriafield = "(Last Name|=|" + lastName + ")";
criteriaMap = zoho.crm.searchRecords("Leads", criteriafield);
if (criteriaMap.size() == 0)
{
createdMap = zoho.crm.create("Leads", { "Last Name" : lastName });
info createdMap;
}
}
}
}
Once you are done with the Single Sign on configuration as mentioned here , follow these steps to perform the single sign on
You can uninstall the Marketo Extension extension whenever you wish to. Remember that deleting this extension will delete all its associated data.
To uninstall Marketo Extension