Execution-based ROI for API automation
Télécharger au format PDF
- Dernière mise à jour2024/10/31
Execution-based ROI for API automation
In this example, you will build an API automation for an opportunity and use the Pipeline Accelerator package and actions to calculate the duration and the successful execution counts of the automation.
Procédure
-
Create and configure the opportunity in CoE Manager.
- Create an opportunity, see Créer et gérer des opportunités.
-
Follow one of the below options to configure the opportunity to measure
the number of times the automation has run.
- In the opportunity intake form, select # of times performed for How is the process measured question.
- In the Opportunity > Details > Forecasted Savings tab, select # of times performed in How is Process Measured option.
- Specify the number of times per month the automation is expected to execute and time (in hours) required by a person to perform the task.
-
Create an API automation in the Control Room to open a web
page.
-
On the left panel, click Automation.
A list of available bots and forms are displayed.
- Click Create > Tâche API.
- In Name field, enter Calculate execution ROI.
-
Click Create & edit.
The API automation is now created. Note down the unique automation ID of the automation. In this example, it is 1234.
-
On the left panel, click Automation.
-
Create the following user-defined variables using the Create
variable (+) icon at the top of the
Variables menu.
Variable name Variable type StartTime Datetime EndTime Datetime SampleString Text DurationInSeconds Number -
Create a session to enable connection and interaction with Shibumi.
- From the Actions panel, double-click or drag the Pipeline Accelerator > Start Pipeline Accelerator Session action.
- In the Session name field, provide a name, enter executionROI.
-
In the Shibumi base URL field, enter the base
URL as per your region.
In this example, base URL used is https://app.shibumi.com.
-
In the Shibumi enterprise ID field, enter the
enterprise ID.
In CoE Manager, navigate to Admin Advanced > Additional Settings.
-
In the Shibumi program id field, enter the
program ID.
Click the menu (three vertical dots) on the right and select Info > ID. Example, 1.
-
Enter the Client ID and Client
secret.
Raise a service request to receive the client ID and secret through email.
-
Enter the API username and
password.
The username and password of your CoE Manager instance tied to the client ID and client secret.
-
For execution ROI, note down the start date and time.
-
From the Actions panel, double-click or drag the Datetime > To string action.
- From the Select the source date and time
variable field, choose the
Variable option and enter the
$System:Date$.Remarque : You can use the System:Date variable to get the current date.
- Select the date format from the Select date time
format dropdown.
In this example, the System:Date value is considered as ISO_INSTANT(‘2011-12-03T10:15:30Z’).
- In Assign the output to a variable field, select SampleString variable.
- From the Select the source date and time
variable field, choose the
Variable option and enter the
$System:Date$.
-
From the Actions panel, double-click or drag the Datetime > Assign action.
- In the Select the source datetime variable/ value > Enter the date time field, choose the Variable option and select the SampleString variable.
- For the Select date time format field, choose the ISO_INSTANT(‘2011-12-03T10:15:30Z’) prebuilt format.
- In the Select the destination datetime variable field, select StartTime variable from the dropdown.
-
From the Actions panel, double-click or drag the REST Web Services > Get method action.
- In the URI field, enter the URI of the web page you want to
open.
Example, https://www.salesforce.com/in/.
- In the Proxy configuration field, select System.
- In the Authentication Mode dropdown, select No Authentication.
- In the Wait for action to complete (in milliseconds) field, enter 60000.
- Assign the output to a variable field, choose the Dictionary option and select ResponseDictionary variable from the dropdown.
- In the URI field, enter the URI of the web page you want to
open.
-
From the Actions panel, double-click or drag the Datetime > To string action.
-
For execution ROI, note down the end date and time.
- Perform steps to .
-
From the Actions panel, double-click or drag the Datetime > Difference between dates action to calculate the difference between start and end
date and time.
- In the Source Date and time Variable field, select Variable option and choose the StartTime variable.
- In the Date and time variable to be compared field, select Variable option and choose the StartTime variable.
- In the Time unit field, select seconds.
- In the Assign the output to a variable field, select the variable DurationInSeconds.
-
Send execution ROI details including duration.
-
From the Actions panel, double-click or drag the If > If action to configure the conditional statement.
- In the Condition drop-down list, select Dictionary.
- From the Dictionary variable drop-down
list, select the variable
ResponseDictionary.
The Key field is automatically updated to the value Response.
- From the Dictionary type drop-down list, select String.
- In the Operator drop-down list, select Equals to(=).
- In the Target Value field, type HTTP/200 OK.
-
From the Actions panel, double-click or drag the Pipeline Accelerator > Update process metrics action into the If
container.
- In the Session name field, enter executionROI.
- In the Automation ID field, enter 1234.
- In the Process name field, enter Calculate execution ROI.
- In the Date field, choose Variable option and enter the $System:Date$.
- In the Mode field drop-down, select Add.
- In the Process metrics field, select Dictionary option.
- Click Add
and in the Entry field provide the
following details to update the automation duration in CoE Manager.
Field Value Type Number Key Actual_Automation_Duration_Time_per_Day__m Value $DurationInSeconds$ - Click Add to update the successful
automation execution count in CoE Manager.
Field Value Type Number Key Actual_Successful_Executions_per_Day__m Value 1 - Click Add to update the failed automation
execution count in CoE Manager.
Field Value Type Number Key Actual_Failed_Executions_per_Day__m Value 0 - In the Status field drop-down, select the variable SampleString.
- From the Actions panel, double-click or drag the If > Else action to configure the alternative sequence of action.
-
From the Actions panel, double-click or drag the Pipeline Accelerator > Update process metrics action into the Else
container.
- Perform steps to .
- Click Add to update the successful
automation execution count in CoE Manager.
Field Value Type Number Key Actual_Successful_Executions_per_Day__m Value 0 - Click Add to update the failed automation
execution count in CoE Manager.
Field Value Type Number Key Actual_Failed_Executions_per_Day__m Value 1 - In the Status field drop-down, select the variable SampleString.
You can see the updated metrics in CoE Manager (Opportunity > Transaction Tracking > Transaction Metrics) .
You can see the ROI information in the CoE Manager opportunity dashboard.
-
From the Actions panel, double-click or drag the If > If action to configure the conditional statement.