cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6305
Views
15
Helpful
52
Replies

JSON in UCCX Script

Hi Team,

 

Can you guide me how to create a JSON in UCCX script.

 

Regards,

 

Jijesh

3 Accepted Solutions

Accepted Solutions

I took you result from the REST call and created this simple script to get the value that you have asked about.

Snag_278167.png

There are a few things with your result from the REST call that makes it not work with what I suggested.

  1. Your result is in-between angle brackets and that makes it an array in JSON
  2. Your vip value is formatted as a string as it is in-between double quotes

In my script that tried to attach, but I just get "Sorry, unable to complete the action you requested." I added two set steps that does this.

  1. First one removes the angle brackets from the result string
  2. Second one sets the boVIP boolean variable based on the strVIP string variable

There are for sure cleaner ways to do this, but I’m not that great with the expression language and I’m for sure not a Java programmer. So I did it the simplest way.



Response Signature


View solution in original post

@Roger Kallberg

Thanks for helping to finish this steps. I done the voting

Call flow not completed.  I will give you the update once I started the new steps.

 

Jijesh

View solution in original post

Crate string variable INC with string “INC”. Then when you get the digits do a set variable INC = INC+DigitsVar.

david

View solution in original post

52 Replies 52

Can you please be a little more specific about what you'd want to accomplish?



Response Signature


We need to build a call flow.

Step1. user will enter the employee ID then we need to validate the Employee ID , Incident number and Task  . So we received the service now Api for Employee ID validation and tickets. validation.

I created the MAKE REST CALL and tested the employee ID's are fectching . It is working fine.

 

Next I need to create JSON  so need a advice or help .

 

Regards,

 

Jijesh

 

 

You’re still not very specific. Create JSON from what or with what?



Response Signature


I will explain the call flow.

When customer calling the queue number  first it will ask the employee ID to enter once they enter the number,  need to validate employee number, then it will go another prompt press 1 for incident 2 task. Once the ticket number validation completed. - Call should sent to Agents directly with service now ticket page popup.

We have a received the api details to validate the employee number 

 

Attaching the Script screen shot which I created  for your reference.

 

 

 

 

What should you send to ServiceNow  (Values and syntax))

What is your expected response?

Have you tested it in Postman?

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Thomas G. J.

Expected Behaviour is once user enter the employee ID it needs to be validated once it verified we should ask to enter the incident number or task again we need to validate the number though service now via api.

This is what we did for ServiceNow when we used CCX.

Snag_1041e83.png

It's slightly different then you're requirement, but it should give you an idea on how it could be done.



Response Signature


@Roger Kallberg 

I am attaching the REST Call properties as well as successful calls once I entered the digit.

 

What is the variable need to be create for JSON document.