Out of the box LiveTiles Directory supports simple 1 step approvals. For example it will send approvals for changes to "Job Title" to a configurable set of people for approval. Any one of those people can approve the update.
However, there are situations where you might require:
- Multi-stage approvals. e.g. once approved by person 1 send it for approval to person 2.
- Dynamic approvals. e.g. if person 1 is away on holiday send it to person 2
- Escalations. e.g. if person 1 hasn't actioned the approval within 2 days escalate it to person 2
- Groups of approvers. e.g. Anyone from Security group A should be able to approve it.
By leveraging Power Automate for the approval workflow you are now able to have complete flexibility of your approval process.
Setting up a Power Automate
1. Adding the connector to Power Automate
Select Data, then New custom connector then Import an OpenAPI from a URL
Give the connector a name such as "LiveTiles Directory"
Enter the API endpoint URL appropriate for the regional deployment of Directory that you use:
- USA - https://api.hyperfish.com/external-workflow/swagger.json
- AU - https://api.hyperfish.com.au/external-workflow/swagger.json
- UK - https://api.hyperfish.co.uk/external-workflow/swagger.json
Click Create Connector then 4. Test
Open a new browser window and navigate to your LiveTiles Directory administration pages:
Click Settings, then Embed
Click Add New Token
Give it a name and select External workflow, then Save
Click the name of the token you just created to copy it to your clipboard
Now go back to your Power Automate window.
Paste your authentication token into the API Key text box, and click Create Connection
Now you should see a new connection created like below:
Click ConnectionTest, and enter "Test operation" in the message text box, then click Test connection
If successful you will see "Test operation" in the results window
Now you can create your approval workflow
Creating an approval workflow
Click Create then Automated cloud flow
Give it a name e.g. "Directory Approval workflow" then click Skip
Click Custom and then select the connector you added previously. This will be used to trigger your workflow.
Select When a user creates a change request in LiveTiles Directory
You should now have a blank workflow canvas to start building your workflow.
Click New Step to add an approval step to your workflow
Search for "approval" and then click Start and wait for an approval
Complete the approval action as follows:
- choose Approve/Reject - First to respond
- choose someone to send the approval to
- add details to the body of the approval such as the profile_field that the update is for, the old_value and the new_value.
Click New Step
Click Condition to add a new conditional action to the workflow
Choose "Outcome", is equal to, and add "Approve" as follows
In the "If yes" section of the action
Click Add an action, then Click Custom, then the connector you created earlier.
Click Approve or reject a change request
In the change_id field pick the change_id attribute as below. In the new_status field pick approve.
Repeat the same steps in the If no section, but choose reject instead
Testing your approval workflow
You are now ready to test your workflow end to end.
In LiveTiles Directory settings go into Attributes then Approval settings and ensure you have an attribute with Auto Approve set to Off
Now go to your profile page and edit your profile e.g. your job title. Click Save
Now you should have a pending approval in the Approval screen
You should have have received an approval email from Power Automate
Click Approve and then Submit. Your workflow will now complete and approve the profile update.
In the LiveTiles Directory Event Log screen you will now see new entries for the update being approved by an external workflow
Approvals will now be processed via the new Power Automate workflow you created.
Turning off the default approval emails
Finally, you should turn off approval emails sent from LiveTiles Directory. This will prevent both Power Automate and Directory sending emails.
In the Settings -> Approval screen turn the Timing to Never