Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Array/List in response

    Posted 06-05-2025 18:40

    gabbeh | 2017-11-22 15:14:06 UTC | #1

    Are there any plans to support array/list response from Bridge Server/Data Actions?

    For example: Outbound sales call. On script load, get all products we can sell to this customer based on some customerinfo. Get that from our own service, which would return a list of products. List those products in a drop-down in the script so the agent can choose which product to sell.

    Yes, I know we can flatten it, but returned list of products can be a lot, and we would need both productname (to display) and productID (to save to the contact so we know which product we sold). That's a significant number of custom variables to set up. And count of returned products could change, do we just have to set up productname1, productid1 all the way up to 50 just to be sure?

    This would also be nice to have in the script, not just as a dropdown. Let's say that you need to include which products/subscriptions a customer have. To be able to loop through all objects in the list and show those in the script and not show 9 of 10 lines as empty because the customer only have 1 subscription, not 10.

    dropdown: for object in list: add productname to display of dropdown add productcode to value of dropdown

    text in script: for text in list: show that text in script


    Jason_Mathison | 2017-11-27 16:24:59 UTC | #2

    Data Action service is capable of returning an array of objects (you can see this by unchecking the "flatten output" box in test mode). The limitation you are hitting is that Scripts can not accept arrays of data, so it requires the flattened version of the output. Adding support for arrays of data is something that the Scripts team would like to add, but there is no timeline on adding it.


    system | 2017-12-28 16:25:36 UTC | #3

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 2139