Scenario: Developing and using templates in an automation

Use this scenario to understand how to create a template for automations, and how to use these templates to simplify the process of creating automations.

About this scenario

This scenario details the actions and workflow of the following users:

Marcus is a Professional Developer who works in the Acme healthcare company. He works in the Human Resources department and is responsible for designing, developing, and implementing automations to improve process efficiency and has created many such automations to automate business processes in his organization.

In this scenario, Marcus creates a template to automate the performance metric process. Performance metrics workflow consists of a series of repetitive steps that is widely used across multiple departments. Creating a template for this workflow will benefit all departments by saving the time and effort for each department to build its own automation from the start. Instead, they can use the template Marcus creates and customize it based on their specific requirements. After he creates the template, Marcus checks in his template to the public repository and makes it available for other users in different departments.

Sue is a Citizen Developer who works in the same organization as Marcus but in the Finance department. She is responsible for calculating annual employee appraisals and decides to automate this process. While working on the automation workflow, Sue uses the template created by Marcus for performance metrics to help save time.

The following workflow illustrates how Marcus (Professional Developer) develops a template for performance metrics, and then how Sue (Citizen Developer) uses that template in the appraisal calculation automation.

Developing and using a template in an automation

Marcus creates a template

The following procedure summarizes how Marcus creates a template for the performance metric process and checks in the template to the public repository.

Procedure

  1. Marcus log in to the Control Room as a Bot Creator.
  2. He navigates to the Automation tab, and creates an automation.
  3. After entering the required details for the automation, he opens the automation on the Bot editor to build the performance metric automation.
  4. He uses the Workday > Get report action to get the performance metrics report and save the outcome to a list variable.
  5. He uses Loop > For each item in the list to read and iterate each item in the list.
  6. He uses Database > Insert/Update/Delete to update the performance metrics component for each employee in the database.
  7. He saves this automation as a template.
  8. On the Automation page, he selects the Performance metrics template and check in the template to the public workspace from his private workspace to make it available for all users.

Sue builds automation using the template

Sue uses Marcus's template and creates an annual appraisal automation.

Procedure

  1. Sue log in to the Control Room as a Citizen Developer.
  2. She navigates to the Automation page and selects the Create new > Task Bot from Template option to create an automation using a template.
  3. In the template picker window, Sue sees all the template available in the public repository.
  4. She searches for Marcus's template and opens the template in preview mode to review if that one suits her requirements.
  5. After ensuring it does, she selects the template to start creating an automation.
  6. She enters the required details and navigates to the Bot editor.
    The structure from the template is added to the Bot editor.
  7. She modifies the existing code flow and adds the following new actions to build the Annual appraisal automation:
    1. Database > Run stored procedure action to retrieve the employees' salary details.
    2. Number > Assign action to apply the formula and calculate the appraisal amount.
    3. Database > Insert/Update/Delete action to insert the data and update the database.
    4. Send email action to send emails to employees and managers.
  8. She then saves and runs the automation.
Appraisal details are retrieved and shared with managers through email.

Summary and benefits

Using templates benefited Sue and Marcus to achieve their automation goals in specific ways.

Reuse icon Marcus creates templates for use cases that are common across different departments.
Clock icon Using a predefined template enables Sue to quickly build automation without recreating the same automation, thus saving time.
productivity icon Overall benefits include cost reduction, enhancement in productivity, and accelerated automation development.