Goal: How to configure DbBasedRounting for using Content of external DB for Call Routing.
Complexity: Medium
Preconditions: External DB Admin Rights, Creation of new DB table, LUCS Configuration

Related Chapters: DB Based Routing, Database creation, Defining Workflows, Set Task Priority

It migt be useful to use the content of an external DB for Routing purposes. One example could be that the phone number of a customer should be used to allocate the language for the service. An other example could be that some customers should be routed with higher priority.

The following example is about getting the VIP status of a user based on the stored phone number. If the request is succsesful, means that LUCS will get a value back that is stored in one of the 'CategoryMapping' (see below) of the Workflow Element 'DB Based Routing', the corrospondent exit will be taken.

Prepare external DB

#WHEREUSER ACTIONRESULTS / SYSTEM REACTION
1SQL-ServerOpen 'SQL Server Management Studio' on external SQL Server.

2SQL-Server

Add a new DB

Step 1:

Step 2:


Possible Result:

3SQL Server

Add Security Settings for new DB

Step 1:

Step 2:

Configure

  • User type
  • User name
  • Login name
  • Default Schema

Step 3:

Configure

  • Membership → check db_owner


Remark:

If an other than SQL server is used for the new DB than the SQL server that is used for the LUCS DB, additional Security Settings has to be configured:


4SQL Server

Adding new Table

Step 1:

Step 2:

Example Script 1 (for VIP customer):

CREATE TABLE dbo.VipKunden (
VipKundenId INT,
TelNumber varchar(50),
KundenStatus text,
);

Example Script 2 (for Language):

CREATE TABLE dbo.VipKunden (
VipKundenId INT,
TelNumber varchar(50),
CustomerLanguage text,
);

Possible Result:


5SQL Server

Fill Table with data.

For this example 'Script 1':

  • TelNumber = Phone Number of the customer
  • KundenStatus = VIP

For this example 'Script 2':

  • TelNumber = Phone Number of the customer
  • CustomerLanguage = 'DE' or 'FR' or 'IT' or 'EN'

Configure LUCS

#WHEREUSER ACTIONRESULTS / SYSTEM REACTION
1LUCS Configurartor

Add External Data Source / DB:

Connection String:
Data Source=SERVER\INSTACE;Initial Catalog=DB-NAME;Integrated Security=SSPI;MultipleActiveResultSets=True

Example:
Data Source=lvse0149.ps.ch.luwa.re\sql2016shared1;Initial Catalog=Test-DB for DbBased Routing;Integrated Security=SSPI;MultipleActiveResultSets=True


2LUCS Configurartor

Add Workflow Elements 'Db Based Routing' and 'Set Task Priorty' to the Workflow Structure:




Possible Result:

3LUCS Configurartor

Configure new Workflow Element "DB-Based Routing" to get request external DB and get requested Information:

Fields to configure (for this example):

  • CategoryMapping 1: VIP (Value that is stored in the new DB table in column 'VipStatus' for VIP customer)
  • Command (Select-Command):
    SELECT KundenStatus FROM dbo.VipKunden
    WHERE TelNumber = '%CallerTelNumber%'  (KundenStatus & TelNumber are columns from new DB table; see above No. 4 [Example Script 1])
  • External DB Ressource: Test-DB for DbBasedRouting (see Step 1)
  • Parameter: CallerTelNumber
  • Regex: Full


4LUCS Configurartor

Configure new Workflow Element 'Set Task Priorty' to allocate a higher queue priorty for the customer.

Fields to configure: 'Priority'

(info) The choosen priority should be higher than the priority configured within the LUCS service (standard value: Normal).
     






UCIDUC  LUCS Application 035