Approval process using Power Platform tools
Commercial organizations are established for profit. Regardless of the specificity of the activity, each company is forced to function in the conditions of market competition. One of the key factors influencing the overall condition of the company is the quality of decisions made. The result are satisfactory financial effects.
The decision-making processes developed by organizations and the tools supporting these processes should be treated as one of the areas around which an advantage over the competition can be built. A well-structured decision-making process – characterized by transparency for all its participants, combined with properly selected IT tools, are the foundations of an efficient flow of information within the organization and communication outside.
First the process, then the app
Many companies assume that applications will improve processes that are lame in the company. This is of course a correct assumption. However, I would like to point out that no application will fix the problem if we do not know where exactly it occurs. Each organization develops its own mechanisms for dealing with the need to accept certain stages of business processes. By mechanisms, I understand the accepted and generally known assessment criteria and the matrix that determines the acceptance path. The acceptance path can take many different forms. Within one level, one or more persons responsible for approval may be designated. Approval can be required by any one person in the decision group, by all members of that group, or by a certain number of them. The process may also differ in the acceptance path depending on certain parameters selected at the beginning of the process. (e.g. type of leave request, type of offer sent to the customer or value of the order). In addition, multiple levels can be used to create the approval process. For example, after approval by 1 decision-making group on the 1st level, the application is subject to one more review (2nd level) by the board.
The internally agreed decision-making method is also important. Many companies use traditional forms of recording the approval process, using Excel, Outlook or a piece of paper. However, these are not scalable solutions. As the company grows, traditional methods may turn out to be ineffective and lead to too much asymmetry of information and significantly prolong the decision-making process. A scalable solution, which is a standard for global organizations, are IT programs, today most often operating in the cloud.
How to use applications in the approval process?
One of the proposals that may prove particularly attractive to organizations using Orfice 365 programs or the cloud version of Microsoft 365 will be the Power Automate and Power Apps tools. It is very possible that companies using Microsoft cloud services already have these programs under purchased licenses. They offer a wide range of process automation and increase the efficiency of performed tasks many times over. An example of a tool supporting the approval process in a company can be a solution consisting in building an application embedded in Power Apps and the Power Automate workflow integrated with it.
Power Apps is a low code platform that allows you to create simple business applications without specialist knowledge of the programming language. Low-Code solutions are gaining great popularity thanks to the possibility of creating and implementing applications without the involvement of developers.
This solution is characterized by low development costs, quick implementation in production conditions and the ability to introduce corrections and new functions in a dynamic way. Such a tool supporting the approval process in a selected business process can use a database in the form of SP program lists, a native database for Power Platform – Dataverse or any other On-Premise data warehouse (coal) or in the cloud (not local).
The mechanism of operation of each of the components will be presented on the example of a very common process, which is an indispensable element of the reality of every company – the process of approving leave requests. Such a tool was implemented in our organization in less than 2 weeks. The team responsible for the application consisted of 1 PM and 1 developer. It is worth noting that the management of employee leave requests is only one of the possible applications of the described technologies. The collection of low-code tools belonging to the Power Platform ecosystem is widely used not only in approval processes. It also creates opportunities to implement other applications, automation, AI, chatbots and much more in the organization. The foundation for each application is data and the choice of how it will be stored. Due to licensing restrictions, the choice fell on the lists of the SP (SharePoint) program. For more complex processes that require strict data control, Dataverse is recommended. The central element of the solution is the Power Apps application, which acts as a link between data and users. It is a graphical representation of data and business logic. Due to the full freedom in customizing the user interface, an application of the Canvas type was chosen. This is a type of application whose creation consists in applying objects (graphic elements of the application) to an empty template (Canvas) using the so-called. “Drag&Drop experience”.
Thanks to this, it was possible, among other things, to build the calendar component visible in the attached screenshot.
An alternative in this or similar processes is a Model-Driven application (an application generated on the basis of a data model), but it should be remembered that in this case the only possible data store is the Dataverse. In Canvas-type applications, we are not limited in the choice of data source. The application has been divided into 4 views, between which you can navigate using the top menu bar.
Thanks to the full integration of Canvas-type applications with the AAD portal (Azure Active Directory contains a list of all users of the organization) and other Microsoft services, user authorization is the same as logging in to a Microsoft account or Outlook e-mail. Built-in functions of the Power Fx language (expression syntax similar to Excel, dedicated to Power Platform solutions) allow you to write simple formulas that, for example, return the data of a logged-in user. You can see this ap screen’s upper right corner, where the logged-in user’s name plication in the upper right corner of the screen, where th is displayed in the upper right corner of the screen, where the logged-in user’s name e name of the logged in user is displayed. The entire application also works dynamically in the context of the logged in user.
On other screens of the application, the following were created: a list of leave requests of the logged-in user, a summary list of all leave requests of application users and components responsible for setting user rights.
The list of leave requests is presented in the form of a gallery control. One entry contains basic holiday data. Creating a new application is done using the form.
The “Patch” function is responsible for adding new entries to the list of leave requests and the auxiliary list, which is the history of changes. When a new entry is created in this support list, an email is sent to the applicant’s supervisor. The Power Automate workflow is used for this. Power Automoate has built-in connectors for various services both in the Microsoft environment and outside it. Connectors are connections to selected services (SharePoint, Microsoft Teams, Outlook, Excel Online, Azure, Twitter… and many others) that can be used to perform operations on data from these services.
Each Power Automate cloud flow can be divided into 2 sections:
- Trigger – a single tile specifying criteria, circumstances under which subsequent flow actions should be run.
- Actions – in this section, the flow creator specifies what tasks and actions are to be performed.
The trigger in the leave request management application flow is the SP lists connector: “When a new entry is created in the SP list.” The flow checks the type of action performed by the user (accept and reject buttons, described at a later stage, also add an entry with a description of the action performed to the auxiliary list – change history):
- Adding a new application
- Approval of the application
- Rejection of the application
In Power Automate, you can customize the order in which actions are performed, but you can also run multiple actions simultaneously – independently. This example uses 3 conditional blocks that are triggered simultaneously. After the condition is met, the remaining actions in the given path will be triggered.
Then an e-mail is sent (Outlook connector) containing a link to the application (each Canvas-type application has its own unique url) and basic data regarding the leave request to the supervisor (in the case of creating a new request) or to the person applying for the leave (when accepting or rejecting application). The link contained in the messages also contains parameters in the URL, which are received by the application at the time of its launch using the “Param” function. Depending on the value of the parameter, the user is redirected to the appropriate screen, the second parameter, which stores the unique identifier of the application, allows to transfer the context of the application to the application.
The user using the link from the e-mail message is redirected to the appropriate screen with the details of the selected request. The supervisor makes a decision inside the application on a dedicated screen used to view the list of applications awaiting approval.
The “Reject” and “Approve” buttons hide lines of code responsible for updating the selected leave application and for adding a new entry to the change history list. The “Action” column will contain the decision selected by the supervisor. Power Automate flow will restart. This time, however, a different flow path will be performed, responsible for sending an e-mail to the person applying for leave, along with feedback from the supervisor, basic application data and a link to the application. The proper message is sent for an approved request.
After entering the “Link to the application“, the person whose application has been approved is redirected to the screen confirming the completion of the approval process.
At this point, it is worth adding that the connectors used in Power Automate are also available from the Power Apps, which means that by using the available predefined functions of selected connectors, we can interact with various services and sites. In this sample application, a connection to Microsoft Teams and Outlook has been created. Thanks to this, at the end of the process, the user can, with one click, set his automatic replies, “Out of Office” status, as well as an event in the private and group calendar for the duration of his absence. Additionally, a Teams channel post is created. The decision to perform these operations from the app instead of using the Power Automate flow is due to the different accounts connecting in the app and the flow. In the application, any operation using connectors will be performed from the account of the logged-in user. The flow, on the other hand, was created from the technical account and e-mails informing the participants of the process about the decision taken / change of the application status are sent from the outbox of the “Microsft Team Leave” account. The operation of adding an event to the user’s private calendar had to be programmed in such a way that the connection to the connector was personalized. The described selected tools of the Power Platform service, i.e. Power Apps and Power Automate, are perfect for implementing any business process in the organization. The presented solution presents only a small part of the possibilities of these tools. It is worth getting acquainted with this technology, because it allows you to quickly create tools tailored to the individual needs of the organization, without the necessary knowledge of the field of programming.