Tray.io Setup Guide

By the Tray.io Team

Overview

With Tray.io anyone can integrate, automate, and innovate. Empower your citizen automators to grow your company faster. No dev resources required.

Clearbit develops business intelligence to help companies find more information on customers in order to increase sales and reduce fraud.

Authentication

When using the Clearbit connector, the first thing you will have to do is click on 'New Authentication' in the step editor:

add-auth

You will then need to add your Clearbit API key, obtained from the Clearbit Admin UI:

clearbit-add-auth

Basic Operations List

Operations available in this connector:

  • Enrichment: person & company by email (Get details about a person and their company, based on their email address)
  • Enrichment: person by email (Get details about a person, based on their email address)
  • Enrichment: company by domain (Get details about a company, based on a website domain)
  • Discovery API (Find companies who meet specific criteria)
  • Prospector API (Find prospects for a given website domain)
  • Reveal API (Find information about a company from its IP Address)

Note on Operations Usage

Basic use of the Clearbit Operations is generally quite self-explanatory.

However the queries entered for the Discovery API should be used in accordance with the Clearbit Discovery API Documentation. So for example you might enter the following as a query:

clearbit-discovery-api-query

Examples

Note that the below examples demonstrate how to use some Clearbit Operations and the data they return. They use a single lead / email address to demonstrate this. In a production environment you would likely be working with lists of emails etc. pulled from other services, and would be using our tools such as the List Helper, Loop Connector an the methods explained in our section on Pagination

Example 1 - obtaining data for lead scoring

You can use Clearbit to find out key lead scoring information on an individual and their company - using metrics such as executive position, social following and annual company revenue.

A way to do this would be to use the Enrichment - person & company by email operation, whereby all you need to do is enter a company email address.

To try this, create a new workflow with a manual trigger and a Clearbit connector:

workflow-manual-clearbit

Authenticate your Clearbit connector as above and use the Enrichment - person & company by email operation, entering the email address in question:clearbit-enrich-combined-operation

After clicking 'Run Workflow' you can use the 'Debug' tab to inspect the results.

From the 'employment' section you can see that he is the CEO:clearbit-debug-employment

And from the Twitter section you can see how many followers he has:clearbit-debug-twitter

We can then look at the company details and get some data on revenue and number of employees:

clearbit-debug-company

And also on geographical location:

clearbit-debug-geo

Creating the Lead in Salesforce

You can then add a Salesforce step to your workflow (please see our Salesforce documentation for instructions on authenticating with Salesforce):

clearbit-add-salesforce-step

Then set it to create a new Lead:

clearbit-salesforce-create-lead-operation

After clicking 'Add Fields' it is then possible to grab any data from the Clearbit step using $.steps.clearbit-1.person. and $.steps.clearbit-1.company jsonpaths:

clearbit-salesforce-add-fields-jsonpaths

The jsonpaths for any piece of data can be automatically picked up by using the Tray 'Connector Snake':


Make sure you grab all the necessary pieces of data before running/enabling your workflow.

From here you could use several of the metrics to assign a 'cold/warm/hot' status to the lead in Salesforce.

Some of the Tray system connectors can help you here - as will be shown in the next example!

Example 2 - Update the Rating of a Lead based on follower count increase

This example shows how you can use Tray to make periodic checks to see if a Lead's Twitter following has increased significantly over a certain period of time - in which case you can update their Lead Rating in Salesforce.

The complete workflow looks like this:

clearbit-ex2-workflow-3

The following steps:

1. Create a workflow with a scheduled trigger to check perhaps every week or two weeks

2. Add the Find Lead in Salesforce connector to find the Lead by email. This is done by specifying that Lead ID and Followers are the fields returned:

clearbit-ex2-sf-find-record

and by using the 'Conditions' parameter to find by email:

clearbit-ex2-sf-findy-by-email

Note: This example manually inserts the email, but in a production environment you would be working with batches of leads - in which case you would list your Leads from Salesforce and work through them one-by-one. An explanation of how you can work with data in this way can be found in our section on Pagination.

3. Add the Clearbit Get new follower count connector:

clearbit-ex2-enrich-combined

4. Add the Get follower increase math helper and subtract the old follower count from the new follower count:

clearbit-ex2-math-helper

5. Add the More than 1000 new? boolean condition to check if the result from the math helper is over 1000:

clearbit-ex2-boolean

6. On the True branch add the Update Rating and Followers in Salesforce connector and grab the Lead Id as the record to update...:

clearbit-ex2-update-sf-record

...then update the Rating and Followers count:

clearbit-ex2-update-sf-record-rating-followers

7. On the False branch you can duplicate the True branch conector, but remove the update to the Rating, so that only Followers are updated for the next time the check is made.