Power Platform connector
With the Power Platform connector, you can use Power Automate,
Power Apps or Azure Logic Apps to automate actions in Alvao or to integrate Alvao with other applications.
Installation
- In Alvao, create an application account representing Power Platform and grant needed permissions to it.
- In Administration - Users, use the New user command. Fill in the following fields:
- Name and Surname, e.g., Power Platform
- User name, e.g., Power Platform
- Check the Application account - Other applications option.
- Select the created user in the table and use the ... - Change password command to set the user password.
- Assign service permissions to the account with the Edit - Permissions command. Use the Reader or Manager role to grant read or update permission respectively.
- To install the connector in Power Automate, use the following procedure. For Power Apps
and Azure Logic Apps, the procedure is similar.
- Download and unzip the archive
ALVAO.PowerPlatform.CustomConnector.zip.
- Log in to your Power Automate.
- Use the Data - Custom connectors - New Custom Connector - Import an OpenAPI file command.
- Set the Custom connector title, e.g. ALVAO.
- Select the ALVAO.PowerPlatform.CustomConnector.swagger.yaml file from the downloaded archive and click Continue.
- On the General tab:
- Upload ALVAO.PowerPlatform.CustomConnector.icon.png as the icon.
- Set the Icon background color to #FFFFFF.
- Set the Host and Base URL to your ALVAO REST API url.
Note:
If you don't have your
REST API exposed to the internet,
you need to connect via an on-premises data gateway.
For setting up the gateway, see
Install an on-premises data gateway.
- Click on the Create connector button. For more information, see Create a custom connector from an OpenAPI definition.
- On the Test page:
- Select New connection:
- Enter the username and password of the Power Platform application account in Alvao.
- Use basic authentication.
- Click on the Create connection button.
- As an operation select GetRequest.
- Enter the request ID of an existing request.
- Click on the Test operation button.
- Status code 200 should be returned.
- Now, when adding an operation to your flow, you can see the ALVAO connector on the Custom tab in the designer.
Actions
Action title |
Description |
Create request |
Creates a new request. |
Get request |
Returns fields of a request. |
Update request |
Updates fields of a request. |
Create record in request log |
Creates a new record in a request log. |
Assign request to solver or solver team |
Assigns a request to a solver or a solver team. |
Change request state |
Transits a request in a request status. |
Move request to another service |
Moves a request to a service. |
For more details, see the interface specification.
Custom fields
The connector also supports reading and writing values from/to request custom fields.
Custom fields can't be described in the general connector definition, so you need to use the following techniques for processing them.
To read a value of a request custom field, use expressions in the Get request action. E.g., to read the value of the TicketCategory field, use the expression:
outputs('Get_request')?['body/customItems/TicketCategory/value']
To write a value in a request custom field, use the Update request action with a custom JSON specification. E.g., to write the "monitor failure" value in the TicketCategory field, use this specification in the Custom Items field:
{
"TicketCategory": {
"@@odata.type": "#Alvao.Rest.Api.Models.SD.CustomItem",
"name": "TicketCategory",
"value": "monitor failure"
}
}
Note:
The character
"@" is doubled because of escaping.
Triggers
With the ALVAO Service Desk Custom Apps module,
you can trigger a Power Automate flow directly from the code of any Alvao application.
Example
To set up the example:
- Log in to your Power Automate and import the package
ALVAO.PowerPlatform.FlowTempate.zip, which is part of the connector package.
- In Alvao - Administration - Applications, use the Import command to import the ALVAO.Application.RunFlowOnTicketStateChange.xml file.
- In Administration - Custom fields create a new custom field of the request status entity:
Name |
Type |
Length |
Table |
Column |
Run flow (URL) |
nvarchar |
2048 |
TicketStateCust |
RunFlowUrl |
- In Power Automate, copy the HTTP POST URL from the "When an HTTP request is received" trigger of the flow.
- In Alvao - Administration - Processes, select the process for which requests you want to be triggering the flow. Use the Edit - Solving process command, select the particular status, click the Modify status icon, and in the Other section, paste the trigger URL to the field Run flow (URL).
- In Administration - Applications, enable the sample application.
The application triggers the flow whenever a request transits to a request status with the trigger URL in the Run flow (URL) field.
The flow does nothing but it answers with the code 200 and the body with the request number.
After that, the application logs a record "Flow was triggered" in the detailed log of the request.
Did not find what you were looking for? Ask our technical support team.