I have this odd problem where I dip into salesforce to lookup products offered to this number to dynamically build a phone tree (user prompt). I am making great progress due to a lot of help on here. I have a proof of concept almost working but I found this issue.
Lets say my data retrieve pulls back these values
Prod1 - 3
Prod2 - 2
Prod3 - 1
In my IVR flow I check the items in this order
If Prod1 is not not_set, then in a string collection (products) addItemAt "Prod1", toInt(taskProd1) -1
Since "products" collection set doesn't have any other values, "Prod1" gets put at place 0
next
If Prod2 is not not_set, then in a string collection (products) addItemAt "Prod2", toInt(taskProd2) -1
Now products is [Prod1, Prod2] because Prod 2 got put at slot 1
I am thinking a way around this is to just add all items to a collection like [3Prod1, 2Prod2, 1Prod3] then sort it but not sure if I can do that, I don't see how to sort a collection.
Can anyone think of a workaround?
#Routing(ACD/IVR)------------------------------
Jeremy
------------------------------