Genesys Cloud - Main

 View Only
Discussion Thread View
  • 1.  Create Closed message audio sequence based on schedule

    Posted 10-12-2021 06:31

    Hi,

    I am looking at creating an audio sequence based on what the schedule is set to. Our hours of operation change from time to time and we have to update the "Closed message" each time

    The idea is to have an audio sequence that does this -

    1) PROMPT - Plays audio file 1 - "Welcome to Sales, we are currently closed, our hours of operation are "
    2) EXPRESSION - Then checks the schedule and lets say they are open 9am-5pm, pulls the time from the schedule and plays what is in the schedule "9am to 5pm"
    3) PROMPT - Plays audio file 2 - " If you would like to leave a voicemail, press 1... etc "

    So rather than updating the prompt every time, we just update the schedule and it would modify the audio provided to the customer on that basis

    I can't see anything on the Expressions that seems to match

    Thanks in advance


    #Ask Me Anything (AMA)
    #ArchitectureandDesign
    #ConnectwithaCustomer(NEW)
    #DigitalChannels
    #Implementation
    #Integrations
    #Omni-ChannelDesktop/UserInterface
    #Outbound
    #PlatformAdministration
    #QualityManagement
    #RemoteWorkEnablement
    #Reporting/Analytics
    #Roadmap/NewFeatures
    #Routing(ACD/IVR)
    #Security
    #SIP/VolP
    #SystemAdministration
    #Telephony
    #Unsure/Other
    #GenesysCloudCXQAEpisode

    ------------------------------
    Alastair Pitt
    Docusign
    ------------------------------


  • 2.  RE: Create Closed message audio sequence based on schedule

    GENESYS
    Posted 10-12-2021 13:41
    You need to write a data action to fetch your schedule.  Make the start & end fields outputs from the action.  After you execute the action in your flow, use an update data action to turn those string values into datetimes.  Use the datetime values in your play audio action like so.  Play around with the different formats (i.e. Time(12 hour clock)) until you find one you like.


    https://help.mypurecloud.com/articles/about-genesys-cloud-data-actions-integration/

    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 3.  RE: Create Closed message audio sequence based on schedule

    Posted 10-13-2021 06:50

    Thank you @Melissa Bailey.  I am new to Genesys Cloud CX so please excuse my questions. The above makes senses. So from what I understand, you setup a data action and you use a task to ​pull that data?

    My question would be how to I determine what the details of that data are. For example I have a "Schedule" called "English Open Hours" and it is set to open at 9am to 6pm. How to I determine the exact request to pull that data? I did check the API explorer but I can't seem to find anything that refers to schedules.

    Thanks  



    ------------------------------
    Alastair Pitt
    Docusign
    ------------------------------



  • 4.  RE: Create Closed message audio sequence based on schedule

    GENESYS
    Posted 10-14-2021 10:40
    Alastair,

    Instead of using a Data Action to call an external system to get those hours you could keep them in a Data Table (https://help.mypurecloud.com/articles/work-with-data-tables/).  You're data tables could have a key column, open hour, closed hour, and any additional calls.  Then you can use the Data Table blocks in Architect to query for the data by they key and use that data within the flow.

    ------------------------------
    Jim Crespino
    Senior Director, Developer Evangelism
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 5.  RE: Create Closed message audio sequence based on schedule

    GENESYS
    Posted 10-14-2021 10:47
      |   view attached
    It's the /api/v2/architect/schedules/{scheduleId} endpoint.  Attaching a sample data action.

    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------

    Attachment(s)

    zip
    action.zip   538 B 1 version


  • 6.  RE: Create Closed message audio sequence based on schedule

    Posted 10-15-2021 07:05

    Firstly, thank you @Jim Crespino I think that is a good idea and would work. I did think of that initially but the only issue is that when the support team modify their hours ( as they do from time to time ) , I need to modify the data table right?

    @Melissa Bailey  Thanks for your response. A played around and using the API was able to get the output of the schedule which gave me the following two strings

    Start           2021-06-28T08:00:00.000
    End            ​2021-06-28T17:00:00.000

    ​So I am getting there, but what is the next step to manipulate that data so that I can use it in the script? The idea  is to take the start time 08 and end time 17 and make routing decisions based. So whatever the start time, it would play the audio that corresponds with that.

    I was able to publish the action and in the script the I can see the successful outputs and assigned "Start" and "End" to Variables, but should I manipulate the data in the script or before it hits there or do beforehand 

    Again, sorry, very new to this so I am sure its simple enough



    ------------------------------
    Alastair Pitt
    Docusign
    ------------------------------



  • 7.  RE: Create Closed message audio sequence based on schedule

    GENESYS
    Posted 10-15-2021 10:23
    Use the ToDateTime expression to turn the string values into datetime values.  If you want to make a decision based on the hour values, use the Hour function to pull just that part off each datetime value.

    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 8.  RE: Create Closed message audio sequence based on schedule

    Posted 10-19-2021 05:17

    Thanks @Melissa Bailey that works perfectly.

    I will explain what I did in case anyone else finds it useful

    I had recorded some prompts called EN_1, EN_2... to EN_12 as well as EN_30 Each had a number in them "One", "Two".... to "Twelve" and "Thirty"

    I also had the start and end of the closed message as well as "AM" and "PM" and "TO" 

    To play this in the "Play Audio" section, I added multiple prompts and expressions

    1 - Prompt - Played the Start of the Closed message
    2 - Expression - FindUserPrompt("EN_"+ToString(Hour(ToDateTime(Task.OpenTime))))  - This would play 9 for example for 9am
    3 - Expression - FindUserPrompt("EN_"+ToString(Minute(ToDateTime(Task.OpenTime)))) - This would plan 30 if the start time was a 9:30
    4 - Prompt - Played "AM"
    5 - Prompt - Played "TO"
    6 - Expression - FindUserPrompt("EN_"+ToString(Hour(ToDateTime(Task.ClosedTime))-12)) - This would play 6 for 6pm
    7 - Expression - FindUserPrompt("EN_"+ToString(Minute(ToDateTime(Task.OpenTime)))) - This would plan 30 if the closed time was a 6:30
    8 - Prompt - Played "PM"
    9 - Prompt - Played the end of the Closed message

    So in the end you get "Welcome to Company Blah, we are currently closed, our hours of operation are 9 AM TO 5 PM Monday to Friday... blah..."



    ------------------------------
    Alastair Pitt
    Docusign
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources