cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Walkthrough Wednesdays
323
Views
10
Helpful
5
Replies
Highlighted
Beginner

UCCX Costumer Call Priority

We are using UCCX v 12.5 , And we have VIP costumers we want to set priority to these costumers in the application script to be the first in the queue , They are calling us using thier mobile phones , we need to set thier numbers to highest priority.

Can any one helps here?

Attached the script we are using .

Regards,

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted

There are several ways to solve this, and here is just one way:

Variables Needed

Type Name Default Value
String vip_list "+16125551212,+16125551313,"
String calling_number ""

 

Script Steps

 

Start
Accept (--Triggering Contact--)
calling_number = Get Call Contact Info (--Triggering Contact--, Calling Number)
If (calling_number.length() >= 10 && vip_list.indexOf(calling_number + ",") >= 0) Then
  True
    Set Priority (--Triggering Contact--, 10)
  False
Select Resource (--Triggering Contact-- from CSQ)
  Connected
    End
  Queued
    queueLoop:
    Play Prompt (--Triggering Contact--, Loop)
    Goto queueLoop
End

 

This works by checking to see if the string of digits inside of the calling_number variable exist anywhere inside of the longer string of comma separated VIP numbers held by vip_list.

A couple of points which may not seem too obvious at first:

  1. I used +E164 formatting of the VIP numbers because this should be the maximal way a calling number could be expressed to you from the PSTN.  If you're doing something different with your calling numbers, i.e., prefixing a PSTN access digit, then do that instead.
  2. The .indexOf() method is searching for a contains match, and as such, if the number you received is less than the full digits, e.g., 6125551212 VS 16125551212, it will still match correctly.
  3. The appending of the comma "," inside the .indexOf() method is to right justify the phone numbers, removing the need for prefix and length checks, but it does mean your last VIP number must end with a comma.
  4. This prevents shorter numbers from matching incorrectly, if say a caller calls you with a calling number of 9525551212 but it's only presented to your system as 7-digits, e.g., 5551212, then we would not mistakenly apply VIP treatment to a non-VIP, because it would match the right most digits of: +16125551212.  This is accomplished by only allowing VIP consideration for phone numbers of length 10 or more.

View solution in original post

Highlighted

Yes, that is possible to achieve.  If you have the UCCX Premium license level, then you can do either a direct database connection and use the database steps in the script, or you can access data from a web request.  If you have Enhanced or Standard then you're limited to web requests.

View solution in original post

5 REPLIES 5
Highlighted

There are several ways to solve this, and here is just one way:

Variables Needed

Type Name Default Value
String vip_list "+16125551212,+16125551313,"
String calling_number ""

 

Script Steps

 

Start
Accept (--Triggering Contact--)
calling_number = Get Call Contact Info (--Triggering Contact--, Calling Number)
If (calling_number.length() >= 10 && vip_list.indexOf(calling_number + ",") >= 0) Then
  True
    Set Priority (--Triggering Contact--, 10)
  False
Select Resource (--Triggering Contact-- from CSQ)
  Connected
    End
  Queued
    queueLoop:
    Play Prompt (--Triggering Contact--, Loop)
    Goto queueLoop
End

 

This works by checking to see if the string of digits inside of the calling_number variable exist anywhere inside of the longer string of comma separated VIP numbers held by vip_list.

A couple of points which may not seem too obvious at first:

  1. I used +E164 formatting of the VIP numbers because this should be the maximal way a calling number could be expressed to you from the PSTN.  If you're doing something different with your calling numbers, i.e., prefixing a PSTN access digit, then do that instead.
  2. The .indexOf() method is searching for a contains match, and as such, if the number you received is less than the full digits, e.g., 6125551212 VS 16125551212, it will still match correctly.
  3. The appending of the comma "," inside the .indexOf() method is to right justify the phone numbers, removing the need for prefix and length checks, but it does mean your last VIP number must end with a comma.
  4. This prevents shorter numbers from matching incorrectly, if say a caller calls you with a calling number of 9525551212 but it's only presented to your system as 7-digits, e.g., 5551212, then we would not mistakenly apply VIP treatment to a non-VIP, because it would match the right most digits of: +16125551212.  This is accomplished by only allowing VIP consideration for phone numbers of length 10 or more.

View solution in original post

Highlighted

Dear Anthony,

All (VIP & Non- VIP) incoming calls coming with 11 digits like 07708501997 . 

Should i change this  ---> If (calling_number.length() >= 11 && <---- instead of 10 ? 

Regards,

Highlighted

Technically, it would still work, since we check for 10 or more digits, so it's optional to increase it to 11; which would work as well. 

Highlighted

Dear Anthony,

One more question can i link these numbers with a database because its a lot of numbers like 1200 . and can be more and less , You know when i want to add more new numbers i should open the script,edit and reapload it to the application, So the database will be easy and more flexible.

looking forward to hear from you.

Kind Regards,

Highlighted

Yes, that is possible to achieve.  If you have the UCCX Premium license level, then you can do either a direct database connection and use the database steps in the script, or you can access data from a web request.  If you have Enhanced or Standard then you're limited to web requests.

View solution in original post

Content for Community-Ad