From Bright Pattern Documentation
Jump to: navigation, search
• 5.19

Searching for a Contact by Phone

Bright Pattern scenario blocks can search through a ServiceNow table for a contact record. This is useful when identifying a user and determining related IT services. To search for a contact, do the following:

  • Format the phone number into the ServiceNow format.
  • Use a ServiceNow Search scenario block to find a matching record.
  • If more than one record is retrieved:
    • Prompt the user for secondary input
    • Repeat the search
  • If no records are found:
    • Prompt the user to provide their phone number on file
    • Convert the entered number to the ServiceNow format
    • Repeat the search

Procedure

1. Format the phone number into the ServiceNow format

Use a Set Variable block to store the phone number after using the following regex expression to convert into a US based phone format. This will convert a phone number in Bright Pattern Contact Center (BPCC) software from 1XXXYYYZZZZ to (XXX)YYY-ZZZZ:

PhoneNumber =replace("$(item.from)","^(1)([0-9]{3})([0-9]{3})([0-9]{4})$","(\\2) \\3-\\4","")


Format the phone number


2. Search for a Matching Record

Use a ServiceNow Search scenario block to find a matching record.

Use a search query where the ServiceNow phone number matches the PhonbeNumber variable set in step 1.


Search for a match


3. If No Records Match

If no records are found:

  • Prompt user to enter a phone number
  • Convert the entered phone number to the ServiceNow format
  • Repeat the search


A Play-Listen scenario block is used in the No Data conditional exit of the previous ServiceNow Search block, which will record the phone number specified by the user. This number gets converted to the ServiceNow format, and then the search is repeated. If no record is found, the scenario exits.


No matches


4. If Multiple Records Match

If more than one record is retrieved:

  • Prompt user for secondary input (e.g., name, employee number, DOB, etc.)
  • Repeat the search


The If block checks if the recordset count (i.e., Contact.__count__) is greater than 1. If so, it prompts the user to enter their employee ID. The search is repeated to match a record by both phone number and employee ID.


Multiple matches
< Previous | Next >