Skip to Content
Technical Articles

Understanding dataflow(Input/Output) between API Triggers and Notifiers in Intelligent RPA

Introduction

One of the most asked functionality in a RPA based solution is to run bots from a third party tools. SAP Intelligent RPA provides a flexible integration with external systems allowing customizable input and output parameters.

The idea of this blog post is to provide an understanding of dataflow between triggers and notifiers. An API Trigger is the entry point for external systems to trigger an RPA bot and requires a REST based invocation. Similarly, Notifiers can be customized to send out REST based notifications containing the output of bot execution.

Following diagram gives high-level overview of data handover between Triggers and Notifiers:

API Trigger allows two types of objects in Payload:

  1. Input – This variable is used during the bot execution. Data required for bot execution should be passed in this object. It allows nested structure.
  2. Invocation Context – Business or Transactional data which is not required for the bot execution should be set in this object.

Example Business Use-Case

Scenario

A Bank wants to process loan application for a customer. Loan application requires numerous processing steps which includes Credit Score check and other cumbersome activities. To save time and avoid human errors, the Bank creates a bot(Credit Check Bot) to minimize the human effort.

Now bank wants to integrate Credit Check Bot with the Bank’s workflow system. This bot will be triggered by Bank’s workflow system by providing Customer Data as input and Customer ID as correlation identifier. After the bot execution, Bank workflow expects Credit Score as output along with the supplied Customer ID.

Customer ID will serve as a correlation between input and output. So, it will be sent as Invocation Context since it is independent of the bot execution.

Steps

Configuration in Desktop Studio

First step would be to configure Desktop Scenario to receive Customer Data as input and Credit Score as output.

  1. Create Context Variable IO with two nested variables for input and output as shown below:

    In this example, Customer variable corresponds to Input and CreditValidation variable corresponds to Output.
  2.  Set Input, Output and Input Data Manager in Properties tab of Scenario as shown below:
  3. Configure source data for each input field for Scenario using Set activity as shown below:
  4. For Output, use Get activity to save the output as shown below:

Once scenario setup is completed, export project using Desktop Studio.

Configuration in Cloud Studio

  1. Import Scenario using Import Desktop Package option in Project window and expose the scenario as skill as shown below:
  2. Once the scenario is imported, DataTypes for the Input and Output variables are created automatically as shown below: 

  3. Generate Package and create deployment in Cloud Studio.
  4. Create API Trigger on the deployed package by selecting the required Scenario
  5. Once you click on create, a dialog box will appear containing example payload. This payload allows two types of variables namely invocationContext and input. In this example the invocation context is a string but it could also be an object.
  6. Create API Success Notifier and create payload using output from Bot execution as shown in the image. Output variables defined in the scenario can be used while defining the payload. Customer ID can be retrieved from Invocation Context set during the execution. Pressing “Ctrl + Space” would suggest available variables.

    Execution

    API Trigger can be executed using any REST clients using following details. Here you can see an example of how to use the invocation context and input: 

    1. Trigger URL
    2. Headers:
      1. irpa-trigger-token
      2. Authorization Token
    3. Payload:
      { 
      	"invocationContext": {
                 "custID": "dcba98765"
             }, 
      	"input": {
              "Customer": {
                  "HouseNumber": "00",
                  "LastName": "Meyer",
                  "FirstName": "Sarah",
                  "StreetName": "AnyStreet",
                  "City": "AnyCity",
                  "ZipCode": "97792",
                  "Country": "Germany",
                  "Email": "felix.meyer@sample.com",
                  "MobileNumber": "+4900000000",
                  "DateOfBirth": "13/July/1985",
                  "JobSituation": "Salaried",
                  "MaritalStatus": "None",
                  "CountryOfResidence": "Germany",
                  "Nationality": "German",
                  "PassportNumber": "C01XXXXX",
                  "PassportNumberMasked": "C*****X",
                  "CertificateOfResidence": "https://localcert"
                         }
      	}
      }

Conclusion

I hope this business use-case could clarify the difference between Input, Output and Invocation context and give you an overview of the dataflow concept in SAP Intelligent RPA. 

Feel free to leave a comment with questions or feedback 🙂 

2 Comments
You must be Logged on to comment or reply to a post.