Working with UiPath Data Service Entities | Persistence Data storage | Preview in UiPath 20.08

In this Blog Post, We have covered every details about Newly Introduced Data Services component of UiPath RPA tool. Topics Included are as below- 

  1. Introduction to Data Service and How to Enable it
  2. Some Common Use Cases of Data Service
  3. Managing Entity, Creating Relation Ship
  4. Working Example with Data Service and Entity 
  5. Details around the Data Service Studio Activities
  6. Challenges and Issues if any

Let’s get started.

UiPath Data Service Entities | Step by Step Guide | 20.08 (Preview) 1

Pre-Requisite-

  1. UiPath Studio v2020.8 +
  2. Data Service Enabled Orchestrator Instance (You can request for Enterprise Free Trail)
  3. UiPath Robot Connected to Modern folder

Introduction –

This Blog is meant to show step by step guide to Use newly introduced Data Service from UiPath.

To experience the full features Data Service and follow along the demos in this course, you need an Enterprise account in UiPath Automation Cloud.

If you don’t have such a plan, you can start an Enterprise Trial now and use it after Enabling the Data Service for your Tenants.

In 20.10 LTS, Data Service will become available both on-premises and through the Automation Cloud for community.

Table of Contents

If you wish to follow the code example shown in this blog post, You can download that from the GitHub URL.

Following along with the code is the best thing to do when you are trying your hands on a new concept in UiPath.

 

UiPath Data Services Example

Using Entities in Projects with UiPath Studio

Setup and Configuration

To start using the Data Service you need an Automation Cloud account, and You need to enable Data Service for the tenant you wish to use.

You can Enable the Data Service using below steps –

  • Login in Cloud Portal –https://cloud.uipath.com/ 
  • Navigate to Admin Section; Then Tenants (Its Tenant level service so must be activated in the tenant you want to use.)
  • Click on sub menu and Navigate to Edit Service for enabling the Data Service
  • Select the Data Service
(Shown in the steps below)
Enabling the UiPath Data Service
Enabling the Data Service

Once you select the Data Service, you need to Update License so that Data Service Gets reflected at Admin Dashboard.

It might take few minutes, before it gets refreshed and once this is done you will be able to see screen like below.

Creating an UiPath Entity

So far so good, Now you should be able to create your New Entity on Data Service.

We will look at How to create an entity, manage the relationship and other stuff in the next section when we work on Example of Suppliers and Products Entity. 

But this is pretty simple steps all you need to do is define the Fields and their Datatype.

Please Note – All the Action on Data Service are based on user authorization and it will inherit Your permissions based on their configured roles/groups.

You can read more about roles and grants on Data Service UiPath Documentation – How to Configure required access setup for Data Service.

Let’s talk about, where we can use Data Services in a real-life example. I have listed a few sample use cases but it can be extended to many scenarios where storage and persistence data is required.

Common Use Cases of Data Service

Data Service provide you additional storage capability for your intelligent automation projects so that you can integrate your business data with UiPath Different components on the fly.

You must be thinking, why we need additional storage capability for Storing RPA projects data while you can connect/dump/export data to Relational databases, No SQL Databases, file or even on cloud storage.

Why do we need additional layer of Data Services for Consuming the data in RPA projects?

Below is some common use case where we can fit in Data Services –

  1. Most of the process we design follow simple workflow which takes data from queue, work on queue item in linear way to complete the task either through completion or success. However, there could be more completed scenarios like Multi step process, where automation need to be worked in Different chunks or handholding is required between Human in Loop and Robot.

For Example: #Bot1 perform some task in CRM to create entry, Waits for Human to complete the next steps and then #Bot2 resume the task based on status. In this case, we can create two related Entity to track the status of Work done by #Bot1 and perform tasks accordingly.

  1. Think about an Ecommerce-operator where he is selling the product on different platform and requests are received throughout the day from omnichannel which contains multiple Structured and unstructured data set such as Invoice, Purchase return, Customer Complain, Sales Order and many other items.

Through the use of multiple related entity all different kind of request can be processed effectively and within SLA adherence without putting much data (Master Tables) exposed to RPA.

  1. Think about Parent/Child Relationships work items where individual Work Queue items must be linked to a single request for better processing.

For example, Customer Account Closure example, where customer various steeps need to be followed in Different application, In all such cases we can create parent child relationship entity to perform sub-tasks and then update status in parent to get task completed.

Managing Entities, Relationship and Using Activities Example

For this part of Blog, We have taken the example of Products and suppliers where we will go through the following steps.

  • Create Two Entities (Products/Suppliers)
  • Establish Relationship among the entities using the Common Field SuppliersID 
  • Enable Data Services activities in UiPath Studio.
  • Work with Create Entity Record activity and Query Related Records

Let’s work on the first Dataservice Working Example.

Table "Products"
Table "Suppliers"

How to Create Entities 

The benefit of using entities created in the Data Service is that you can manage and manipulate data aggregated in a single object.

  1. For Creating Entities, You can click on Create New Entity (+) Menu item at the top right corner of the screen and provide Display Name, Name and Description of entity you wish to create. These fields are self-explanatory. 
  2. Once you create the entity, 5 System Generated Columns are automatically added to support the audit and changes required of the entities. 
  3. You can create your field by clicking on “Create New Field” button.

[See Example below, where  5 Fields are system built-in type and rest others are created as per need.]

Creating an Entity
Creating Relationships

Creating Relationships

  • System Generated ID field by default would be Unique and will uniquely represent the records in the entity. 
  • For creating a Relationship In the Entities list, first, select the entity for which you want to add a relationship. then click Create New Field.
  • Select Relationship from the Type drop-down list.
  • Now, Select the entity to which you want to create a relationship from the Related Entity drop-down list.

[In the Below, Example SupplierID is the Display name which creates a relationship with Suppliers entity]

Customizing an Entity

How to Use Entities In UiPath Studio

So far we have created, Two entities which are shown below, for Using them inside the studio you need to perform the following steps.

  1. You need to add UiPath.DataServices.Activities to Perform required Operations
  2. You need to import Entities so that processes that collect, update, and pass data to other processes can be managed inside the studio.
  3. Imported entities will become visible in the Project panel, its namespace is imported as well and you can find it in the Imported Namespaces list, and it is available in the Referenced assemblies list:
Creating an Entity

Enable Data Services Activities

Navigate to all Packages, Search UiPath.DataServices.Activities, Click Install and Save.

Enable Data Service Activities Pack

You will be able to search Data Services Activities now.

Data Service Activities

Importing Entities

Entities are available for import in Studio v2020.8 +; If you are not able to see the option on ribbon button you might need to update your studio.

  1. Click the Manage Entities ribbon button; Pop Window will appear like below.
  2. At first, you will not see any entities listed here; You need to click refresh [Icon just Below Close] to get all your entities. 
  3. Once you see the list, You can tick them and save so that you can collect, update, and pass data to data services.
  4. Make sure, that if you make any changes to the entity at the level of the tenant, use the Refresh button inside the Manage Entities window before actually importing it. (So that changes gets reflected.)

 

Importing Entities

The imported entities can now be used locally in your project as objects. After importing entities in your workflow, its namespace is imported as well and you can find it in the Imported Namespaces list shown below.

Namespaces for Entities

Explanation of Working Example

Create Data Records

When you run the workflow and check data tab on Cloud portal, You should be able to see the created entities records.

Create Records with Structured Data

The Query Entity Records activity can be used to pull up a list of records from the Data Service. 

  1. You need to select Entity Type.
  2. Query, You can use query builder screen to make more complex search query.
  3. OutPut Records, This will be the list of records.

Data services can potentially store a large number of records. To query only a certain number of records, use the Pagination properties from the Query Entities Records activity. 

Query Related Records

Issues faced 

  1. You will not be able to import entities when using a classic folder, make sure you are using a modern folder in your tentent.

Conclusion – 

Scroll to Top