Marketo Data Enrichment with Number Lookup

This post will help you improve your audience segmentation, form conversions, and sales prioritization by using the Telnyx number lookup API through webhooks for Marketo data enrichment.

If you want to learn how to set up webhooks in Marketo, see different use cases, and how to troubleshoot issues then check out the Marketo Webhook Guide with Examples.

Also if you are looking to enrich your database even further then check out the Clearbit Marketo Integration post to see how to get demographic and firmographic information from Clearbit into Marketo.

Marketo Data Enrichment Walkthrough Video

Introduction to Telnyx

Telnyx is a next-generation telecommunications provider that makes it very easy for developers to programmatically embed voice, SMS, and wireless solutions into their products. They are the up-and-coming superstar in the CPaas (communications platform as a service) space where Twilio is currently the dominant incumbent (think David versus Goliath).

Full disclosure I am the marketing operations lead at Telnyx so I may be just a smidge biased in my comparison 😛

Telnyx’s communication APIs open up a number of marketing possibilities when combined with the power of marketing automation platforms such as Marketo, Hubspot, and Active Campaign. All three of these platforms have webhook features, which allow you to make GET or POST requests to APIs (see Marketo API Quick-Start Guide for an introduction to APIs and requests).

This means we can use webhooks to unlock the power of Telnyx for sending SMS notifications or enriching your lead database using number lookup, which is what this post will focus on.

Number Lookup Benefits & Insights

Telnyx Number Lookup Tool
Telnyx Number Lookup Tool

Telnyx offers a number lookup API to allow you to get information on a phone number e.g.

  • Country Code
  • State
  • City
  • Number Type

In order to access this number lookup API you will need to create a free Telnyx portal account.

Hopefully, you can already see the useful information that a number lookup can provide for your Marketo data enrichment but to elaborate more here are some of the insights that can be used to improve your marketing or sales outreach.

Number Verification, Lead Scoring, & Sales Prioritization

The successful return of information about a number can act as a number verification process and can be used to deprioritize leads who enter fake numbers e.g. 123-456-7891.

Additionally, the type of number (mobile, fixed-line, VoIP) associated with a lead could allow the sales team to prioritize phoning leads with mobile numbers over leads with landline numbers because they might be more likely to get through calling a personal cell.

If this is the case, demographic scoring models can be updated to give more points to leads with verified mobile phone numbers.

Improved Segmentation

Having improved geographic information will allow you to better segment your database for marketing or sales outreach.

The information provided by the number lookup can be used to supplement any existing enrichment processes you have to populate these fields e.g. form fills, 3rd party enrichment tool, and manual sales entry.

You can create formula fields in Salesforce or Marketo that use logic to populate your fields with number lookup fields if the default fields are empty.

State = IF(ISBLANK(defaultState),lookupState,defaultState)

Alternatively, you can create Marketo smart campaigns to populate fields with lookup information when they are empty.

Marketo Change Data Value on Lookup City
Trigger the smart campaign when the Lookup City field changes
Marketo Change Data Value Flow to Update City to Lookup City
Only update the City field if it is empty

Reducing Form Fields & Increasing Conversion

Now that you know you can use a number lookup to gain geographic and other information this might allow you to reduce the number of fields in your forms and thereby increase conversion.

Marketo Data Enrichment using Webhooks

N.B. You can use the free Postman API testing tool to test out this number lookup API before bringing it into a Marketo webhook. If you want a walkthrough of how to get started making your first Postman GET and POST requests then check out the Testing the Marketo API using Postman section of the Marketo API Quick-Start Guide.

Marketo Data Enrichment Webhook

The YouTube video at the top of the page shows you how to do the following steps:

  • Name your webhook
  • Paste the API documentation link into the description field
  • Paste the URL from the API documentation into the URL field
https://api.telnyx.com/v2/number_lookup/+18665552368
  • Replace the phone number at the end of the URL with the lead token for the phone number field that you want to use in the request e.g. {{lead.Phone Number}}

N.B. If you are looking for a general introduction to Marketo tokens and how they can save you time when building your emails, webhooks, and smart campaigns then check out the Great Use Cases for Marketo Tokens post.

https://api.telnyx.com/v2/number_lookup/{{lead.Phone Number}}
  • Set the “Request Type” as a GET request
  • Set the “Response Type” as JSON

Setting up the webhook to call the Telnyx number lookup API also requires the authorization header for the request to be populated with your Telnyx API key.

To create an API key:

  1. Login to your Telnyx account
  2. Select “API Keys” from the left-hand navigation
  3. Select “Create API Key”
  4. Click “Create”
  5. Copy the “API Key”

If you already have an API key then you can simply copy the key from the “API Keys” section of the portal.

Marketo Data Enrichment Webhook Custom Header
Telnyx Number Lookup Webhook Custom Header

Next, follow these steps in Marketo to set up the Authorization header:

  1. Click on “Webhook Actions”
  2. Select “Set Custom Header”
  3. Click “Add”
  4. Put “Authorization” in the header column
  5. Put the word “Bearer” followed by a space in the “Value” column
  6. Paste your Telnyx API key in the “Value” column

Now all you have to do is map the response attributes to their corresponding Marketo fields as shown in the YouTube video at the top of this page.

Marketo Data Enrichment Webhook
Telnyx Number Lookup Webhook
Marketo Number Lookup Webhook Response Mapping in Action
Marketo Number Lookup Webhook Response Mapping in Action

Calling the Marketo Data Enrichment Webhook in a Smart Campaign

It is worth noting that webhooks can only be called in smart campaigns from trigger actions so if you want to backdate this lookup information on all the leads already existing in your database you will have to trigger something on all these leads.

For newly created leads, form fills, or changes in the phone number field you can use a smart campaign to call the number lookup webhook.

Marketo Number Lookup Campaign Smart List
Marketo Number Lookup Campaign Smart List
Marketo Number Lookup Campaign Flow
Marketo Number Lookup Campaign Flow

Data Normalization Requirements

Number Format

In order for the number lookup API to pull the correct information for your phone number it needs to be in E.164 format without any separators between the numbers i.e. +15743269203.

I STRONGLY recommend using a validation rule on your forms to ensure that the numbers entered match the format above. If your numbers are not entered in this format then you will need to use a tool like Flowboost or Zapier with Marketo webhooks to format your numbers like this when leads are created or phone numbers change. If you want to convert the numbers already in your database to this international format then you can export your database to a CSV and then use Google sheets or a programming script e.g. Python with the Pandas library, to do the tidy-up.

Mapping Country Codes to Countries

The output of the lookup country code is a 2-letter code so if you want to map this code to its corresponding country then you will have to use a tool like Flowboost or Zapier with Marketo webhooks.

Alternatively for backdating you can:

  1. Export your leads to a CSV containing at a minimum email address and country code
  2. Use a vlookup formula in Google sheets to map country codes to their names
    1. Here is a Google sheet mapping country codes to country names thanks to Sanford Whiteman
  3. Export a CSV of email addresses with correctly mapped country names
  4. Import this CSV into a list in Marketo
    1. Beware that this will overwrite the country field if it is already populated so make sure that the list you export in Step 1. only contains leads with empty country fields or you know for sure that you want to overwrite their country field

What’s Next with the Telnyx API?

Now that you have conquered Marketo data enrichment using the number lookup API you might be wondering what other ways Telnyx can serve you as a marketer.

Wonder no more! Explore how you can use the Telnyx SMS API in Marketo to send notifications e.g. webinar reminders, and how to handle response messages using Zapier to unsubscribe people or send follow-up SMS.

  1. Marketo SMS Marketing with Telnyx
  2. Marketo Text Messaging with the Telnyx SMS API
  3. Marketo 2 Way SMS using Telnyx and Zapier
  4. Marketo SMS Integration Example: Webinar Reminders

If you instead want to send SMS in bulk using numbers stored in a Google sheet then check out the Zapier Loop Through Array from Google Sheets post.

Leave a Reply

Your email address will not be published. Required fields are marked *