cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
296
Views
0
Helpful
5
Replies

UCCX 12.5 set CCCalendar based on Calling_Numer.substring()

gadholwi1
Level 1
Level 1

Hi, when using CCCalendar variable it is always a parameter by default and is set an application level. Is it possible to set/choose the calendar dynamically based on a string from the script?

My idea: From the 'Get Call Contact Info' I will get the Calling_Number as String. After that I will set a Customer_Number = Calling_Number.substring(3,7). How to use the Customer_Numer string to get the corresponding CCCalendar which name is equal to Customer_Number?

1 Accepted Solution

Accepted Solutions

gadholwi1
Level 1
Level 1

The solution is to query the UCCX API endpoint `/adminapi/calendar?detail=brief` from the script and use the returned data to fetch teh calendar-id.

gadholwi1_0-1719574349453.png

 

View solution in original post

5 Replies 5

A parameter is nothing more than a variable made available in the application webUI. So it should be possible to define the value of the variable by script steps and then use the calendar call in the script to retrieve the content of the calendar data. This said I’ve actually never used the built in calendar in CCX as we use a 3:rd party system for our calendar management, but in theory this should work. Try it out and let us know if we’re missing something with this.



Response Signature


gadholwi1
Level 1
Level 1

From the documentation: Select a variable of type CCCalendar to configure a calendar. By default the variable is always a parameter and cannot be modified.

In conversation https://community.cisco.com/t5/contact-center/uccx-12-0-1-calendar-sample-script/td-p/4006128 a hack is described: Extract calendar-id from CCX admin URl and use new CCCalendar('calendar-id').

But I want to use the name of the calendar and an id that must be extracted from a URL.

The hack with the calendar-id is working, but im still looking for an opportunity with the calendar name

gadholwi1_0-1719561962084.png

 

gadholwi1
Level 1
Level 1
The idea is to query the UCCX API endpoint `/adminapi/calendar?detail=brief` which returns:

```
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<calendars>
    <calendar>
        <calId>2</calId>
        <name>0140_Calendar</name>
        <timeZone>Europe/Berlin</timeZone>
        <calendarType>FULLTIME</calendarType>
        <holidaysConfigured>false</holidaysConfigured>
        <customBusinessDaysConfigured>false</customBusinessDaysConfigured>
    </calendar>
    <calendar>
        <calId>1</calId>
        <name>3505_Calendar</name>
        <timeZone>Europe/Berlin</timeZone>
        <calendarType>FIXEDHOURS</calendarType>
        <holidaysConfigured>true</holidaysConfigured>
        <customBusinessDaysConfigured>false</customBusinessDaysConfigured>
    </calendar>
</calendars>
```

After creating a XML document from the response, I want to get `calID` by `name`. How does the XPATH for `Get XML Document Data` look like?

gadholwi1
Level 1
Level 1

The solution is to query the UCCX API endpoint `/adminapi/calendar?detail=brief` from the script and use the returned data to fetch teh calendar-id.

gadholwi1_0-1719574349453.png