How I hacked some code to get insights into customer calls as a product manager

Part of good product management is to collaborate well with the sales team. Sales is often the first line of customer contact into the organization beyond a website or an app. Once the prospective customer has decided to engage further with your product, they will often start with someone in sales.

This interaction presents a unique opportunity for product managers to get early insights into the sales funnel. The lead will either result in progression up the funnel or will be disqualified upon interaction with sales. In either case, there are valuable insights to glean from the opportunity, because you as a product manager are interested and curious about questions like “if a customer thinks their pain can be solved by your product, what are the reasons behind that” or “if a customer is not a good fit, what is the fundamental mismatch”.

However, I had a problem. It was hard for me to keep on top of what sales calls were occuring and which ones I could be potentially interested to listen in on. A lot depended on the busy sales folk to ping us in the product department on relevant and interesting calls. I wanted this situation to change.

Given my programming roots, I naturally deferred to figuring a quick DIY mechanism to curate a “Customer Calls” calendar. Since all of my sales team calendars were shared with the rest of the team via Google Calendar, I decided to hack together a quick script.

Enter Google App Scripts

Google Apps Script is a scripting language based on JavaScript that lets you do new and cool things with Google Apps like Calendar, Docs, Sheets, and Forms. There’s nothing to install — there is a code editor right in your browser, and your scripts run on Google’s servers.

In other words, ripe for hacking to make your life easier.

I wanted to accomplish two things:

  1. keep an up to date call calendar based on the sales team’s calls.
  2. send me a weekly summary highlighting interesting calls that I might want to participate in.

To accomplish both the goals, I created a series of JavaScript functions that worked like a Bot that crawled the sales team’s calendars looking for matching keywords in the call meeting’s subject and body. If a keyword match was established, the calendar event would be added to the Shared Sales Call Calendar.

Also, as it happens often, these calls get moved or postponed, so the script would have to keep track of changed meeting schedules and move them around as appropritate.

I also happen to be a big fan of Campaign Monitor and their email design aesthetics, so I headed over there to grab a good responsive email template.

Turns out that Campaign Monitor provides a lot of stunning email templates that are free. Awesome! I picked a simple one out and extracted the HTML out of them for use in my script.

The Code

The basic structure of the code is simple. I have two dictionaries: one that contains all the individual accounts that I want to crawl the calendar for. The second dictionary contains the matching keywords that I want to watch out for.

Later, I added a third dictionary to eliminate some false positives and types of calls which were not of huge interest to me.

Using the Google App Scripts Calendar APIs, I just iterate through each account’s calls, and grab the Calendar Event Id (the unique id which prevents us from adding duplicate entries).

Any matching event then gets published to the shared calendar with all its details.

I also added a tweak to extract the guest’s email domain into a clickable link to their website to learn more.

I set the trigger in Google Scripts to run the job every hour to keep up with the moving schedule and the email job to run every Monday morning.

Sample weekly email alert to show what’s going on…

The Results

I started getting awesome summary emails telling me what was happening in the sales world, and also would get notified of all Sales Calls in advance. Jumping on to these calls gave me an enormous early point of contact with prospects and insights into their articulation of their pain statements.

I was able to channel these observations into the Product Roadmap and its future direction. Sales team started appreicating product team’s involvement early on and often counted on me when customers posed questions that they needed further product or technical clarification on.

So what’s the moral of the story…

With a little bit of persistence and hacking, you can quickly use some programming to hack your team culture and increase cross-team collaboration.

The entire project code is available at GitHub, if you want to see how I did it.

Show your support

Clapping shows how much you appreciated amit malhotra’s story.