Skip to main content Skip to complementary content

Caller Lookup with CDP design pattern

This article provides an overview of how the Caller Lookup use case (on incoming phone calls) can be implemented in Qlik Application Automation for OEM using the Qlik Application Automation for OEM CDP. The CDP is used as a shadow copy to perform fast lookups.

Note that other patterns for Caller Lookup are also possible, e.g. without using the CDP or by using a Contact Sync from CRM's directly to the phone book/directory of the Phone System. Click here for an overview of all Cloud Telephony patterns.

How to build Integration Templates for caller lookup

A set of templates will be created, one for each CRM. Each template is a bundle of two or more automations. One automation will sync contacts from the CRM source to the CDP. The second automation will perform a lookup on incoming calls. This second automation is identical in each bundle.

Examples:

Salesforce contact sync (bundle 1) automation 1: Sync Salesforce contacts to CDP automation 2: caller_lookup (triggered blend, called by Phone System on incoming call)

Hubspot contact sync (bundle 2) automation 1: Sync Hubspot contacts to CDP automation 2: caller_lookup (same as in bundle 1)

SugarCRM contact sync (bundle 3) automation 1: Sync SugarCRM contacts to CDP automation 2: caller_lookup (same as in bundle 1)

Sync contacts from a CRM to the CDP

See CDP Patterns for general information on how to use the CDP.

You will use the block Upsert contact to add contacts to the CDP. A contact has a phone number and mobile number property. On top of that, you can store a list of phone numbers:

Storing phone numbers.

Fields for phone numbers, mobile numbers, and a comma-separated list of numbers.

Note that Phone & Mobile will automatically be added to the Phones list.

The CDP will automatically normalize the phone numbers, in order to facilitate efficient lookups by phone number. This will only occur of a phone number has a country code, or if a country is set for the contact.

Each phone number will be stored in 4 formats:

  • Original: same as input
  • Stripped: special characters such as + are removed (only numbers are kept)
  • National: normalized without country code
  • E164: normalized with country code

Example:

{
  "original": "+918553168800",
  "stripped": "918553168800",
  "national": "085531 68800",
  "E164": "+918553168800"
}

These fields will be used by the CDP block Search Contacts By Phone Number for efficient lookups, see below.

Do caller lookup in CDP

The automation caller_lookup will search for a contact based on phone number, in the CDP. The CDP is isolated per customer account. The CDP can optionally use a Scope. If customers are allowed to activate more than one contact sync, the Scope is not used.

The automation caller_lookup will do a lookup using the CDP block Search Contacts By Phone Number:

Performing a lookup.

an automation consisting of a Start block and a Search Contacts By Phone Number block. The Search Contacts By Phone Number block is selected. Phone is set to Start > Phonenumber.

The CDP block Search Contacts By Phone Number can search using 3 modes:

  • Exact: exact match on E164 or stripped number
  • Fuzzy: search for matches, ignore country code
  • Exact and fallback to Fuzzy: try Exact, if no results fallback to Fuzzy

The Phone System will call the caller_lookup automation on an incoming call. The SaaS API endpoint call automation in customer account is used, with the account external id (= account id from Phone System) and the automation name (not guid) in the URL. Example:

https://api.blendr.io/v1/accounts/account_externalid/blends/blend_name/run

Below is an example for Account id 105 = ACME. Note that this id coming from the Phone System's internal DB and passed to Qlik Application Automation for OEM in the above SSO flow, this is not a Qlik Application Automation for OEM id:

https://api.blendr.io/v1/accounts/105/blends/caller_lookup/run?phonenumber=+155555555

Example CDP content for customer ACME (thanks to the contact sync Blend):

Contact A: John doe
Phone: +1 5555 55 55
Source: SugarCRM
Detail URL: https://sugar.com/contacts/12345

Contact B: John doe
Phone: +1 5555 55 55
Source: Hubspot
Detail URL: https://hubspot.com/abcd123

The caller_lookup automation will have one required input: phone number. This phone number is passed from the Phone System to the automation on an incoming call.

The caller_lookup automation response will be a JSON with one or more contacts found in the CDP.

Example response of the automation (output block) in case multiple results are desired:

[
  {
     "name ":"john doe",
     "phone": "+1 5555 55 55",
     "url": "https://sugar.com/contacts/12345"
   },
   {
     "name ":"john doe",
     "phone": "+1 5555 55 55",
     "url": "https://hubspot.com/abcd123"
   }
]

Example response of the automation (output block) in case only one phone number is desired:

{
    "name ":"john doe",
    "phone": "+1 5555 55 55",
    "url": "https://sugar.com/contacts/12345"
}

The Phone System receives this response (typically in less than 500-1000 msec by using a real-time Blend) and uses the data to show the caller name on a phone.

Embedding in the Phone Provider UI

In order to make the above created templates available to end-customers, these templates can be published in the Hub, and this Hub can be embedded in the UI of the Phone Provider.

Click here for an overview of embedding and SSO.

Embedding means that the Qlik Application Automation for OEM Hub is opened in an iframe with an SSO URL such as:

https://xxxx.admin.blendr.io/sso?accountid=105&accountname=ACME&hash=...

When this URL is loaded, Qlik Application Automation for OEM will automatically create a new customer account ACME with external id=105 in the Qlik Application Automation for OEM database.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!