Content under development
Commonly in when building Flows, you need to have more than one user decide the path the Flow should follow. This is common in a number of scenarios:
- Approvals: When a manager or team of people need to approve something before a Flow can progress.
- Co-navigation: When both a customer and employee need to jointly confirm acceptance before a Flow can continue.
- Polls: When a certain threshold of users want a particular action to be performed, the Flow continues.
- And the list goes on…
As with all Flows automated on the ManyWho platform, it’s common to need more than one person to get something completed.
Configuring your Flow
There’s nothing specific about a Flow that can have voting enabled. Voting can happen at any point, however, it is only supported in the following Elements:
- Step: Add voting to simple Steps in your flow.
- Page: Add voting to pages. When the first user clicks on an Outcome to progress the flow, this puts all users viewing the flow into a “read-only” mode until they place their votes. This is to ensure data integrity of what is being voted upon.
The voting functionality is based on the authorization context of the Map Element in your Flow. As a result, if the Map Element is running in a Swimlane Group Element, then the voting is based on the users who are able to successfully authenticate in that swimlane. If the Map Element is running as part of your Flow without a Swimlane, then the voting is based on the users who are able to successfully authenticate with the Flow. As a result, there are a few important considerations with voting:
- The voting must be configured in a Flow and/or Swimlane that requires user authentication.
- Voting will not work for public flows as all users identify as a single “public” user.
- The Service providing the identity/authentication for your Flow should ideally be the same Service providing the voting algorithm.
To add a voting to one of the above elements, you need to add the following JSON to the Map Element:
// Map Element definition
Where the properties are as follows:
|voteType||String||Though this is not limited in any way, the voting functionality is provided through the underlying Service. For Salesforce, the Service currently only supports “COUNT” and “PERCENT”. Developers can add additional voting types and algorithms using our Service SDK.|
|minimumCount||Integer||The minimum number of unique users that need to click on a particular outcome for the Flow to proceed to the next step.|
|minimumPercent||Integer||The percentage number of unique users that need to click on a particular outcome for the Flow to proceed to the next step (e.g. 75 would be 75%).|
|attributes||Key/Value pairs||Additional attributes that can help the Service make decisions about how best to execute the vote. This allows developers to extend our metadata as needed.|