This is the second post of two in a series focused on how to embed real-time decisioning with SAS. My earlier post on Embedding real-time decisioning through APIs is available here.
Last year, SAS announced a strategic partnership with Microsoft. As a result of this partnership, SAS and Microsoft are rolling out stronger product integrations. These integrations create powerful automated processes throughout the analytical lifecycle. This post focuses on the integration between SAS Intelligent Decisioning on SAS Viya and the Microsoft Power Platform for embedding real-time decisions into web apps.
The Microsoft Power Platform consists of numerous tools and applications that can be connected together to create end-to-end solutions. The three pieces of the Microsoft Power Platform we will utilize today are the SAS Decisioning Connector, Power Apps, and Power Automate. Just like in my pervious post, our goal is to create a seamless, efficient, and enjoyable loan approval or pre-approval process.
Embedding Real-time decisions: solution overview
Before we get started, let's look at the flow of data through this solution. First, our applicant completes their application using a web app developed on Power Apps. Next, Power Automate compiles the applicant's data. Power Automate passes the data to a decision flow on SAS Viya using the SAS Decisioning Connector. SAS Viya will run the applicant's data through the standardized decisioning process and determine applicant pre-approval. The SAS Decisioning Connector passes the information back to the Power Platform to be surfaced to the user through the web app, all within a few moments!
First, we will use the SAS Decisioning Connector to build out a connection to SAS Intelligent Decisioning. This connection allows us to call decision flows built on SAS Viya from Power Automate. To use the SAS Decisioning Connector, you must:
- Configure SAS Viya to allow calls from the IP addresses described in the Azure IP Ranges.
- Register your client applications.
- Obtain an access token from your SAS Viya environment.
- Connect to your SAS Viya environment.
Additional information and specific instruction can be found on the SAS Decisioning Connector page.
Microsoft Power Platform: Power Automate
Power Automate is a workflow engine that creates automated flows across applications and services. It consists of a series of steps that follow a trigger. Since we want our workflow to plug into the application built on Power Apps, Power Apps will have to be our flow's trigger. Next, we initialize and collect the applicant's data from the web app. Then, we use the SAS Decisioning Connector to pass the data into our decision flow. The final response step processes the outputs from SAS Intelligent Decisioning so we can surface it back to the applicant!
Microsoft Power Platform: Power Apps
Powers Apps is a low-code interface for developing custom applications. Through Power Apps, developers can drag and drop inputs, controls, images, and more onto a canvas to design their application. They can pull in data from a variety of sources and utilize Excel-like functions for processing.
For our example, I started by dragging various text inputs, drop downs, and labels for each our decision flow's inputs. I suggest giving each input a memorable name.
At the bottom of the application, I added a button labeled Submit. Buttons in Power Apps have an On-Select property, which developers can use to specify which actions to perform when the button is clicked. When our applicant clicks the Submit button, the following takes place:
- User input is collected and saved.
- User input is passed to the Power Automate flow.
- The Power Automate flow runs and returns the response from SAS Intelligent Decisioning, which is also collected and saved.
- The outputs of SAS Intelligent Decisioning are used to decide what to display to the user.
When the decision flow determines that an individual has been pre-approved for a loan, Power Apps displays the following screen, pulling information saved from their inputs:
When the decision flow determines that an individual has been denied, Power Apps displays the following screen, pulling information saved from the decision flow outputs:
Developers can use the integrations between SAS Viya and Microsoft to easily build a low-code application on top of SAS analytics and decisioning! It's even easier for consumers to receive the real-time self-service answers they expect.
Check out these resources if you want to learn more:
- What is Power Apps?
- Collect, Clear, and Clear Collect functions in Power Apps
- Start a flow in a canvas app
- If and Switch functions in Power Apps
- Get started with Power Automate
- Store and manage values in variables
- SAS Decisioning Connector
A special thanks to Anthony Kan for his help in getting started with the Microsoft tools mentioned in this blog!