cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1490
Views
10
Helpful
5
Replies

How can i use Get call Contact info with IF in UCCX?

rjunaid.sh
Level 1
Level 1

Hey, am trying to create script for two extension and want to treat both in different manner, like one person 1 called in our CCX, and he's paid user so i want special prompt and special agent for him and the other user call in he will be welcome with simple prompt and simple CSQ. How can i make my script so he can check extension and besed on that extension my script will resoonse.

I try to to use Get call Conact info and set to store extension in my variable but am failed to figure out how i will use that variable in my IF .

1 Accepted Solution

Accepted Solutions

Kita
Level 1
Level 1

See my attachment.  In my version it is based on the called number, simply change to calling for what you are trying to accomplishccx-sample.png

View solution in original post

5 Replies 5

Chris Deren
Hall of Fame
Hall of Fame

After you get the ANI stored as variable (defined as integer) then you simply do:

 

IF variable == "XXXX"

    do somthing

 

where XXXX is the pre-defined expected value of the caller you wish to treat differently.

Slight correction: the variable is of type String, and not integer.

Also, it's good programming practice to do "1000".equals(calling_number) VS. calling_number == "1000", since Java can be pretty strict about comparing nulls and Strings, should there ever be a problem with pulling the calling number from the Get Call Contact Info step.

Sometimes you'll see me doing this too:

calling_number != null && calling_number.trim() == "1000"

Which is similar to the above suggestion I gave, with the benefit of also trimming any white space which may occur in the string. Maybe not possible for calling numbers, but is certainly possible for API returns or reading documents from the repo, so it's just a good habit to do all the time.

Kita
Level 1
Level 1

See my attachment.  In my version it is based on the called number, simply change to calling for what you are trying to accomplishccx-sample.png

Thanks Kita  :)

KY_
Level 4
Level 4

I need to catch original calling number for call forward in to the uccx using with get call contact info how can we do that ?