Monday, May 5, 2014

Connect Zoho CRM Data with AdWords Using Scripts

For anyone working in B2B Pay Per Click, one of the biggest headaches is trying to report on the entire sales flow within a single report. The biggest issue is that marketing PPC data lives in AdWords (clicks, impressions, MQLs) and the sales data lives in your CRM (Leads, Contacts, Opportunities, Etc.). So I started looking at ways to connect the two sources of data. I don't use a CRM, so I signed up for a free trial of Zoho CRM and started fiddling with their API. It turns out, they have a REST(ish) API that returns JSON objects, which is perfect for AdWords scripts.

I built the Class below to pull data out of Zoho. It has the ability to pull Leads, Contacts, Potentials and just about any other Zoho object you can think of directly from your CRM. I stopped at just being able to get data out since updating or deleting records seemed less useful for AdWords scripts.

Here is a quick reference guide to the Class. Define a new object with var zoho = new ZohoApi(YOUR_API_TOKEN); If you need help setting up your account for API access or generating a token, check out the Zoho Developer Docs. I generated some simple getters for each Zoho object. ZohoApi.get[Objects]() will pull in all of the particular object. So you can say zoho.getLeads() or zoho.getPotentials(). You can also get only those objects belonging to you with zoho.getMyLeads().

If you have any additional url parameters you want to send over with the request, you can add them as a parameter to the function. For example, if you wanted to return the first 100 records (instead of the default 20), you would say zoho.getLeads({fromIndex:1,toIndex:100});

You can also search for records using zoho.search[Objects](). So to search for Potentials that have been won, you would say zoho.searchPotentials({'searchCondition':'(Stage|=|Closed Won)'}); You can read more about Zoho's searchCondition syntax in their API Docs. As part of that, you can put the columns you want to see or if you don't put anything in there, I pull the full set of columns to display for you using the get[Objects]Fields() method.

As for the response from the class, you will get an array of objects. Each key in the object has been lowercased with spaces replaced by underscores. For example, retVal[0].first_name or retVal[0].annual_revenue.

So give it a shot and let me know what you think in the comments. I put together a simple example script at the very bottom of this post to store Impressions, Clicks, Conversions, and Closed Won Potentials in a Google Doc on a daily basis to give you an idea of what you can do. Let me know what you would like to see next.

Thanks,
Russ



And here is a really simple example of how you could combine conversion data from multiple sources into a single Google Spreadsheet report.

19 comments:

  1. If you are looking for a place where you can buy an essay, you should visit this https://justbuyessay.com/blog/buy-essays-online-safe site!

    ReplyDelete
  2. Cartier has recommended many classic and successful watch collections, such as fake cartier watches, Cartier Santos and Cartier Ronde and so on. Every Cartier watch has its special charm, and Cartier watches are many people's dreams. Our replica santos dumont watchesshop provides different Cartier replica watches at very low prices. Just enjoy shopping here.

    ReplyDelete
  3. The AAA Cartier Replica watches sale at are fake watchesbest quality cheap fake watch from China,The high end Cartier replica watches include Ballon Bleu De Cartier, replica cartier watchesCalibre De Cartier,Cartier La Dona,Cartier Love Watch,Cartier Pasha,Cartier Roadster,Cartier Santos,Cartier Tank replica watches,We can shipp to Uk,USA,canada,australia,and almost all country worldwide

    ReplyDelete
  4. Such A nice post... thanks For Sharing !! Now you can Study MBBS Admission in Abroad

    ReplyDelete
  5. Airi is a new Free WordPress themes that features a beautiful, spacious design with plenty of white space and clean typography that makes it easy for readers to focus on the content. ... Airi comes with full Elementor integration which means you can easily use this theme for any type of websit

    ReplyDelete

  6. just read out the whole post. The post is wonderful and inspire to the reader.. Thank you
    Do my homework quickly

    ReplyDelete
  7. If you are looking for how to write a response paper. You can use the services of writers who are ready to fulfill what your order is. Save your time. I always do so buy an essay ..

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. You will feel good connecting with most of our tutors. 24 * 7 service and support is provided to all our users. We help with projects requiring All Assignment Help work. Do My Phd Dissertation

    ReplyDelete
  10. I love your creativity. Are you also searching for nursing writing services? we are the best solution for you. We are best known for delivering nursing writing services to students without having to break the bank.

    ReplyDelete
  11. I love your creativity. Are you also searching for academic nursing admission essay? we are the best solution for you. We are best known for delivering quality essay writing services to students without having to break the bank

    ReplyDelete
  12. Du skal være så ærlig, objektiv og konkret som muligt med hensyn til urets tilstand, da det, når der er tale om et brugt luksusur, er af afgørende betydning at nævne enhver form for visuel skade, som uret kan have, f.eks.wysokiej jakości tani Louboutin buler, ridser eller andre skader, der påvirker uret som helhed. På vores websted har vi vores egen skala for tilstand, som du kan se her. Replica HublotOpladningsbevægelse. Et grundlæggende aspekt, da vi kan finde dem kvarts,rolex montre pas cher manuelt eller automatisk. Det er ikke altid en afgørende faktor, selv om kvarts næsten altid vil have mindre værdi end de to andre, når det gælder maskiner. Generelt vil de mest værdsatte altid være de automatiske.Materialer og overflader. Dette aspekt er sammen med de to foregående de vigtigste, når det gælder prisfastsættelsen af dit ur.repliche rolex day-date orologi Materialerne spiller en vigtig rolle ud over cnbrands deres finish, da en guldfinish ikke vil have samme værdi som en stålfinish, eller hvis den f.eks. indeholder diamanter.

    ReplyDelete
  13. happy eid wishes for family to all my family and friends. On the occasion of Eid ul Fitr, I wish Allah forgives all your sins and is always there to bless you towards a better, happier and more peaceful life. Eid Mubarak to you. May this Eid be very Mubarak for all of us.

    ReplyDelete
  14. Your blogs are authentic. I love them .Are you also searching for essay help? we are the best solution for you. We are best known for delivering quality essay help.

    ReplyDelete