Testdriving the year-end release of the Approvals Kit

Talking about christmas coming early again! This time it was the announcement of the Approval Kit from Power CAT released as a public preview feature with their year-end release of the kit. There is certainly a demand for this kind of template which can be used and enhanced, and which already packed with features as it is!

Last year I have been designing and implementing quite complex approval process for a customer, and when we started the project, the customer was really curious that isn’t there really any out of the box solutions which would fit their use cases. And while the Approvals Kit does use the Approval actions, those actions itself is definitely something which i consider an out of the box solution, and would always require further enhancements, automations and customizations to fulfill even slightly more complex scenarios.

This last year project really gave me more enthusiasm to testdrive the Approvals Kit as soon as I found some spare time for it.

In this article i’m not aiming for any complex scenario implementation, but rather to testdrive the features and examine the potential of the kit.

Setup begins

Everythings starts with setup and/or installation, and this kit makes no exception.

As documentation suggests, we will start by installing the Power Automate Approvals -feature via Dynamics 365 Apps -section.

This will install two solutions which can be seen below

Next step is to install the Creator Kit! Remember to enable PCF for Canvas Apps in your environment(s) if you have not yet done so, as it is disabled by default.

NOTE: If you install Creator Kit through AppSource, the installation wizard will handle this configuration change, so there is no need to do it manually in that case!

I’m choosing AppSource’s Installation wizard for the install, as I like to keep things as simple as possible, whenever possible.

After Creator Kit installation, that last but not least is the installation of Business Approvals Kit which can be downloaded from Power CAT’s Business Approval Kit release site in Github. Official guide says to install the managed solution, but as a side note, the release site also offers unmanaged solution as an download option. But as to follow the guide, I will for now go with the managed solution

While you are waiting for the import to finish, use this moment to create the app registration for the custom connector. Now let’s just wait for the import to finish and OH…

A notification popped up after the import, but this is most likely due to the prerequisite steps that we still need to do, before we can activate those cloud flows. Let’s ignore this for now, and continue with the setup.

Browse the Business Approval Kit solution to find the Approvals Kit custom connector, and click on it to open it for editing.

After being redirected to the Custom Connector, click on the Edit button to open the connector for editing.

In editing mode, click on the Security tab, and then Edit -button on the Authentication type section. It was already on the correct authentication type OAuth 2.0, so it was only required to input the app registration details

The details you need to enter at minimum are Client ID, Client secret and Resource URL. Enter the Client ID and Client Secret of your app registration, and Resource URL should be your Power Platform environment URL where you have installed the Business Approval Kit solution earlier (e.g. “Approvals Kit” -environment in my example)

After entering the information, click on the Update connector -button, and wait a moment for the connector to be updated with the security details which were just provided.

After the update, copy the freshly generated Redirect URL, and go to Azure portal and open the App Registration you created. Go to Authentication section, and click “Add a platform” -button, and select “Web” as the platform.

and paste Redirect URL from the Custom Connector into the “Redirect URIs” -field.

Now we can finally do a test operation on the custom connector with “GetPublishedWorkflows” -action. It is suggested to use this action for the connection test operation, because it does not require any parameters and can be run as it is. For other operations it is necessary to provide parameters and you might get errors if you fail to test it correctly. Anyway, successful test operation will give you Status 200 (= OK as a HTTP Response status code), which equals a successful test.

After you have successfully tested the connection for the custom connector, it’s time to turn on the core cloud flows! In my environment, most of the cloud flows were already on, I only had to turn on Evaluate Rule, Start Node and Start Stage -flows. Setup completed!

Configure the approvals

After the setup is completed, it is time to configure the approvals. Browse back to the Maker portal, and click Apps, then play the Business Approval Management -app. And here is is, the Approvals Portal!

Configuring the approvals begins with defining the processes. I want to use these approvals in relation to the D365 Sales, so in this case example i’m going with the traditional “giving too much discount” -approval request, to simulate the situation when the eager salesperson was in a tough situation with a sales case. and had to give a discount% which exceeds the company policy.

Process designer

Let’s start building the first stage for approvals, and it would be self-approval for sales cases where you don’t exceed your authorities. As i’m experimenting on trial environments, I’m using the demo users that came with the environments. In this case, “Spencer Low” will be the salesperson and “Alicia Thomber” will be the manager of Spencer.

In the process designer, add a stage, and then add a node inside that stage where you set the approval type and approver.

Next we will configure a new stage which should escalate the approval to the manager of the salesperson, in a case the Discount % exceeds specific value, which in this example was 20%. For this configuration, we need to create new variable for the Request Data. In the Process Designer screen, start by clicking the “Variables” -button.

Here you can set all the variables which you want to use for passing data to Approvals Kit. I have added Discount Percent there, as that is the value we want to pass from the Opportunity Product to the approval process.

Now we can create the stage. Note how I am now able to set the Discount percent -variable as the Request Data.

We also need the node inside the stage, which will define the approver, and as this is just a simple example, it looks pretty much the same as the self approval node.

Whole process design now looks like this. Lets start creating the Cloud Flow to see this in action!

Triggering the approval process

For initiating the approval process, I created simple Cloud Flow which should trigger when an Opportunity Product is created with Discount % bigger than 0, or when Discount % is modified (and is bigger than 0 after the update). For configuring the Approval Kit action, you can see the “Discount percent” now as an input field in the configuration. This is due to creating the variable in the Process Designer earlier on.

Running tests with two scenarios: Discount % as 10%, and Discount % as 20%.

For the self approval, the approval was created successfully.

Also the manager approval was successfully created.

Out of Office -scenarios and delegation

One of the cool things about the approval kit is the support of out of the office -scenarios. Ever stumbled upon a situation where you need approval for something major or even a minor thing, and the approver is currently spending his/her holiday skiing in the Alps? It will happen, probably most often when you are in a really hectic situation 🙂

Let’s say that Alicia Thomber is currently in vacation, and her colleague William Contoso will handle the approvals while she is away. Biggest problem with these setups are the fact that the person needs to remember to set the out of office -mode, and also remembers to check that the correct person is set as the delegate. Note that this is an universal problem, not just for the Approvals Kit 🙂

Let’s begin by modifying the process design to support delegates! This is done by editing the nodes that you want to enable the delegation to happen.

I think it’s actually really good to also include the time-out option to the rule, in case there is sudden absence (for example sick leave), so that the approval is not left hanging in the air for unknown period of time.

After the changes, remember to save and publish your process!

Final step is setting up the delegate for Alicia, and enabling Out of Office -mode. Login and browse into the Business Approval Management -app, and find the “Configure basic settings” -button.

Clicking the button will open the settings for the logged in user. Let’s select William Contoso as the Approval Delegate, and click Out of Office -checkbox to enable it. Then we save the settings.

One more test with a big Discount %, and it looks like the delegate is working as expected. As the Approvals Kit -solution uses Datasverse as the backend for all the records, we could also examine the Approval Instances straight from the Business Approval Management -app. Below you can see the Approval Instance -record where it can be seen that delegation was successful, and in the Additional Information -column you can also see that this was delegated due to the Out of Office -mode of the original approver.

Initial thoughts and conclusion

This was just a simple scenario to showcase the potential of the Approvals Kit. Initial feeling is that this toolkit definitely fills in a gap in the current out of the box offering of approval related functions.

There is definitely a learning curve with the Approvals Kit, but it is mostly related to the setup, and especially the parts involving the custom connector and getting the authentication working as expected. Also what i’ve read, it is also in the roadmap to smoothen the setup process, which i’m hoping that it will result in easier and faster adoption of this great new toolkit.

For the features itself, process designer was really easy to use, and with the combination of request data, and conditions, you could potentially build quite complex approval processes with this toolkit. I really liked the possibility to provide data to the process through the Approvals Kit action in Cloud Flow.

Since Dataverse is the backend of the toolkit, all the records can be browsed through the Business Approval Management -app, allowing really good monitoring options for the approval progress, and history. Also all the things you configure with process designer, like stages and nodes, actually save as records into Dataverse. You can really dig deep into the data, which I consider to be a really positive thing, for let’s say even debugging purposes if something isn’t working right.

And did I already mention it’s free? 😉 Thanks to the MIT license! I certainly hope that it will stay this way, but perhaps 1-2 years from now, there will be a monetized version of this toolkit…but time will tell.

I do recommend this toolkit for anyone interested modeling approval processes into D365 / Power Platform. This toolkit makes life so much easier, and it also shows as a faster implementation time for the customers.

Find more great blogs here.

About the Author:

My name is Tuomas Anto, and I currently work at Fellowmind Finland as Competence Lead & D365 Solution Architect.

I could describe my competences as being multitalented and solution oriented tech expert with a passion for Microsoft technologies. I’m the one who usually gets the call after the easy jobs has been done 😉

In the past I have also worked in various leader and manager roles, such as Development Manager, IT Manager, Team Lead and Unit Lead, in which I have also demonstrated leadership skills along with wide-scale technology knowledge.

When i’m not busy creating business value with kick-ass solutions, I like to spend time with my kids (3 boys and 2 girls), or doing the WoD at my favourite Crossfit gym!

Visit my LinkedIn profile below for more details about my skills, competences and certifications! And feel free to drop me a message, it’s always nice to connect and network with new people.

Reference:

Anto, T (2024). Testdriving the year-end release of the Approvals Kit. Available at: https://tuomasanto.com/2024/01/03/testdriving-the-year-end-release-of-the-approvals-kit/ [Accessed: 3rd September 2024].

Share this on...

Rate this Post:

Share:

Topics:

approvals app

Tags: