Genesys Cloud - Main

 View Only

Sign Up

  • 1.  Calculations in AI Guides

    Posted 22 hours ago

    We have a requirement to calculate the days difference between two dates. AI Guide has to collect a date from the customer and compare that against the date in the system to know the elapsed days. In AI Guide, we dont see any option right now to do this. please suggest any possible solutions that someone have already tried.


    #ConversationalAI(Bots,VirtualAgent,etc.)

    ------------------------------
    Rajesh Annamalai
    ------------------------------


  • 2.  RE: Calculations in AI Guides

    Posted 21 hours ago

    Hello Rajesh, 

    There are several approaches you can use to calculate the date difference in AI guide. 

    The first is using external functions. You can creating lambda functions or external web services that handle date calculations. Then call this function using the "Call Web Service" action in AI guide. The external function can perform complex date calculations and return the result. 

    The second is using expression language. AI guide supports expressions that can be used to store and manipulate data. You can create variables to store dates and use built in functions. An example expression would be ${DateTime.parse(userDate).getDaysBetween(systemDate)}. 

    The third would be using architect. Create an architect flow that handles the dates calculation. Using the "Call Bot Flow" action to integrate with architect. Using architect built in date manipulation functions. 

    The final approach I can recommend is using the data table approach. Create a data table with date-related calculations. Use lookups to determine the difference between dates. This is useful for simpler date-based decisions. 

    Hopefully one of these you can use and helps!

    Cheers, 



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------