- 07 Feb 2021
- 4 Minutes to read
Use BAM in Power Automate
- Updated on 07 Feb 2021
- 4 Minutes to read
In this walk through we will look at how we can use BAM with Power Automate. There are 4 steps to this walk through
- Setup the BAM connector
- Add your SL360 BAM key
- Use the connector in your Flow
- Test your Flow and see results in Serverless360 BAM
Setup the BAM connector
To start with we need to get the BAM connector. The below link in the documentation has the information about the connector and other options to connect to BAM. In this case we will be setting up a custom connector for your BAM instance.
Download the json for the connector from the below link:
Once I have downloaded the connector I next need to import it into Power Automate. In your Power Automate environment page go to the Data and then Custom Connectors menu as shown below.
Click the New Custom Connector Button and Import an Open API from File and then choose the file you downloaded
You will need to give the connector a name then click Continue.
Next you need to get the host for your BAM API which will support you using the SaaS or Private hosting version of Serverless360 BAM. To get this you will need to go to the Serverless360 settings section and then the Access Keys and BAM Connection info.
You need the Function App URL. Copy the url and go back to the connector.
Paste the url in the host name and paste it into the configuration screen for the connector.
Point to Note:
You need to make sure the https:// is removed when pasting the host name
Then click the Next button at the bottom and you will move to the Security screen.
On the security screen you can now click Next and keep the defaults.
On the definition screen you can click Create Connector at the top. You wont need to modify any information on this screen.
Power Automate will now take a few seconds while it sets up your connector. Once its complete you can click to close the connector.
You will see your BAM connector listed and be able to use it in your Flows.
Create a BAM Process
Next we need to create a BAM business process to use in Flow. The below short video will show you how to do this.
This was just a simple Business Process and transaction for this demo. In the real world your flow would represent your real business process.
Create a Flow and Add BAM Shapes
In Power Automate I have created a new Flow and am going to trigger it with the Flow Button trigger.
Next I will add the action for the SL360 connector. I will add an action and provide the name that I gave my BAM connector earlier.
I will then see the 3 Serverless360 BAM actions. I will in most cases use Start Transaction and then CheckPoint for subsequent milestones. I can use CheckPoint with Correlation for more advanced scenarios.
We will start by choosing Start Transaction.
When you choose the action, you will be asked to add some info for your connector as shown below.
First give the connector instance a name such as BAM.
Next you need the API key for your BAM instance. You can get this by going to the Serverless360 Portal and choosing the API key from the BAM section in the settings as shown below.
Next we need to supply the details for the Start Transaction action. The below picture shows them configured.
I need as a minimum:
- Business Process Name
- Transaction Name
- Stage Name
- Stage Status
The Business Process Name, Transaction Name and Stage Name will all match the values setup in your Business Process you created in BAM earlier and as shown below.
After the start transaction I have added a delay shape to simulate some work being done in the Flow. I will then add a Checkpoint action. In the Check Point I will set the transaction instance id to be the value returned from my Start Transaction shape so that the checkpoint knows which event it matches to. I will also supply the name of the 2nd milestone in the business process transaction (in my case called Flow Complete) and I will indicate the checkpoint is successful. I will also indicate that the Transaction is Complete. This is shown below.
That’s the configuration set, we can now try out our flow.
Testing the Flow with BAM
If I now run the flow with the Test Flow feature it will run and I will be able to see it has completed after the delay passes.
I now can go to Serverless360 and to the BAM area and the Tracking menu.
I can now search for my transactions and if I see below my transaction ran and the green indicator indicates that it has complete successfully.
I can click on it and open up its details and see how the transaction ran.
Congratulations, you now have Serverless360 BAM running with Power Automate.
Hopefully this walk through showed that it was simple to add BAM to Power Automate. You now have access to all of the same features that Logic App users are benefitting from with BAM. You do some of the following cool things:
- Enrich your tracking with custom properties that users can search on in BAM
- Create rich dashboards based on BAM metrics
- Add property promotion from headers or message bodies
Power Automate is a great tool for Citizen Development, Departmental solutions, Embedded Automation within departments or applications and for personal productivity. Power Automate still needs to be built by someone with a good deal of technical skills. By using BAM you can now let business users self service on a simplified view of your solution so they can track what’s happening and troubleshoot business issues and answer their own questions.
Business Self Service will help take your Power Automate solutions provide even more value to the business user.