Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Call Data Action not working properly for a Collection of Integers

    Posted 04-20-2022 11:51
    No replies, thread closed.
    I'm calling an API using an Action inside my integration, and whenever I test the action, all the outputs are received properly, including a Collection of credit card numbers (Integers). The problem occurs when I gather and try to access the Collection of Integers (Flow.cardNumbers) from within my bot flow using Call Data Action. After assigning a data field to the collection, when I try to access the Collection of Integers later on in my bot flow, whether reading it back out or using it to execute a function, the bot throws an error. I know the problem is not from the action or call data action block because it has worked in my other inbound call flow, but not in the bot flow. I also have another output from the same Call Data Action that is a collection of strings that works completely fine, but the collection of integers does not. Does anyone know what the problem might be?
    #ArchitectureandDesign
    #Integrations

    ------------------------------
    Azael Abraha
    Voxai Solutions Inc.
    ------------------------------


  • 2.  RE: Call Data Action not working properly for a Collection of Integers

    Posted 04-20-2022 20:15
    No replies, thread closed.
    Hi Azael,

    We use collections of integers, decimals, dates, currencies etc in bot flows without issue. 
    A statement like Flow.cardNumber[0] or GetAt(Flow.cardNumber, 0) in a communicate action will error out if the list is empty. 
    I suggest you put a check in for IsNotSetOrEmpty(Flow.CardNumbers) then set a flag or play a prompt - at least for testing to see if this is the case.
    Or you can try something like If(IsNotSetOrEmpty(Flow.CardNumbers),"No Cards on this account",ToString(GetAt(Flow.CardNumbers, 0)))

    At least as a starting point to confirm if the list is empty or not when processed by Architect, which does flatten the DataAction output, so also suggest when testing the DataAction you flatten the output, as this is what Architect will see.

    ------------------------------
    Anton Vroon
    ------------------------------



  • 3.  RE: Call Data Action not working properly for a Collection of Integers

    Posted 04-21-2022 10:23
    No replies, thread closed.
    Hi Anton, thanks for your response. 

    I tried your suggestion of checking the IsNotSetOrEmpty(Flow.cardNumber) expression with the decision block, but that also gives me the same response before even going the communicate blocks under it. I've previously done Count(Flow.cardNumber) too but same thing. My testing on the Action is also flattened and that comes out fine.

    I'm really not sure why it's not working because I do the exact same thing on another inbound call flow, which works. If you have any other suggestions, let me know.

    ------------------------------
    Azael Abraha
    Voxai Solutions Inc.
    ------------------------------



  • 4.  RE: Call Data Action not working properly for a Collection of Integers
    Best Answer

    Posted 04-21-2022 10:48
    No replies, thread closed.
    The value range for integers is -999999999999999 to +999999999999999, so the max is a 15 digit number.  Credit card numbers are 16 digits.  I think your flow.cardNumber should be a string array.  

    An integer is a whole number such as 987 or 5. Use integer values to represent complete objects and processes that cannot be subdivided, such as the number of calls waiting or the number of agents on duty. An integer is an eight-byte value, which means that it can hold positive or negative numbers of practically any size. Flow runtime supports values from -999999999999999 to +999999999999999 for an Architect integer value. An integer variable has an integer value at runtime, but an expression of 999999999999999 + 1 will cause an error because the result is >999999999999999.


    https://help.mypurecloud.com/articles/integer-variables/

    ------------------------------
    Jason Tripp
    Independent Health Association, Inc.
    ------------------------------



  • 5.  RE: Call Data Action not working properly for a Collection of Integers

    Posted 04-21-2022 11:02
    No replies, thread closed.
    Yeah that must be it, Thank you!

    ------------------------------
    Azael Abraha
    Voxai Solutions Inc.
    ------------------------------