Having limited experience in bot flows I'm not certain if this will help, but if there isn't a dropdown list to store you array values. You may be able to execute a loop for each object of the array. Prompting the operator to reply Yes/No for each role of the source account to add to the new user. Here is an example...
- Sam.Smith@domain.com
- Roles:
- Communicate - User
- External Contacts - Read Only
- CRM - Access
- Call Center Agent
- Call Data Action - Query Existing User to Mirror
- Input:
- Output:
- [String]Task.Division (Contains division GUID)
- [String-Collection] Task.Roles (Contains array of four role names)
- Communicate - User
- External Contacts - Read Only
- CRM - Access
- Call Center Agent
- Update Data:
- Variable Name 1:
- Value To Assign 1:
- Count(Task.Roles) (Contains an integer of "4")
- Loop
- Current Index Data Name:
- Task.CurrentLoopInt (starts with 0)
- Maximum Loop Count
- Task.RoleCount (contains 4)
- Within the Loop
- Update Data
- Variable Name 1:
- Value to Assign 1:
- Task.Roles[ToInt(Task.CurrentLoopInt)] (On the initial loop what you'll have is Task.Roles[0] and the integer increases with each additional loop)
- Explanation: When the interaction initially enters the loop the Task.CurrentLoopInt contains '0'. To display or say a string within an array at a certain position or row you have to declare the position or row of the array. (i.e., if I want to say or display the first row of the Task.Roles array, I need to use square brackets with the position number: Task.Roles[0] Task.CurrentLoopInt will substitute the literal number since it will contain a default value of zero and increase by one integer every time it loops again.)
- Collect Input:
- Text Prompt:
- String 1: Would you like to add the ToString(Flow.RoleName) role, for this new user?
- String 2: Reply Yes, to add the role to the user. Reply No, to skip this role.
- Input: Task.DecisionInput
- Decision
- Expression: Upper(Task.DecisionInput) == "YES"
- True Path
- Update Data
- Variable Name 1:
- [Collection-String]Task.RolesToAdd
- Value to Assign 1
- [Expression]Task.Roles[ToInt(Flow.Task.CurrentLoopInt)]
- False Path
- Do nothing and execute next loop or exit.
The Task.RolesToAdd will have the array of roles the operator has chosen to add to the new agent.
As for divisions, you may need to figure out a way to display the division names using a list with the first characters being an integer to represent the row. This way the operator can simply reply with the integer for the row that contains the desired division.
- Division A
- Division B
- Division C
"Reply with the row number 1..3 (Flow.DivisionCount) that contains the division you want to assign the new user."
The challenge with roles is that you can have more than one role per a user. As for divisions, we typically see agents being associated with one division.
I hope this helps you Khurshid.
------------------------------
Carlos Albor
Senior Principal PS Consultant
------------------------------