Integrate service-oriented robots
OpenAPI integration
When integrating service-oriented robots using OpenAPI, you will primarily use API operations related to tasks and robots.
Tasks
The recommended integration approach is shown in the following sequence diagram. This approach reduces coupling and improves overall processing efficiency. For more information about task management for service-oriented robots, see Task Management.
Notes:
For Step 1, see the CreateTask API operation.
Step 5
When calling the
CreateTaskAPI, you can configure whether a task requires a callback. For more information, see CreateTask.Callback trigger: A callback is triggered when the task status changes. For status descriptions, see Task Statuses. For details about callback payloads for different statuses, see CreateTask.
Callback failure and retries
The RPA server's call to your endpoint times out after 5 seconds.
If the callback still fails after three retries, the RPA server will not send the callback message again.
You can poll the ListTasks API to proactively retrieve the task status and ensure eventual consistency.
Steps 6 and 7: You need to add corresponding steps or code to your automated process.
If timeliness is a critical requirement for your system, we recommend using the process shown in the preceding diagram.
If timeliness is not a critical requirement or you do not want to expose more APIs in your existing system, you can use the following simplified method:
Automated process
Save the results to
task_result. For more information, see task_result for code mode and Record process results for visual mode.WarningUsing
task_resulthas certain limitations. For more information, see task_result.If the result data exceeds the limit or has high security requirements (for more information, see Handle sensitive data), consider uploading the results to Alibaba Cloud OSS. For more information, see Upload.
Your system periodically polls for the task status and retrieves the
task_resultcontent. You can use the ListTasks and ListTaskDetails APIs together.
Robots
This primarily involves creating service-oriented robots in bulk. For more information, see the Bulk manage service-oriented robots section in this topic. For other integration details, see the relevant service-oriented robot APIs.
Permissions
There are two types of permissions:
Permission type | Description |
API calling permissions for service-oriented robots | To call service-oriented robot APIs (see API overview), the account must have the "Service-oriented Robot" menu permission. You can only use this account's AccessKey pair (AccessKey ID and AccessKey Secret) to make API calls. For information on how to configure permissions, see Console permissions and roles. |
Data permissions (for robots and RPA applications) | Unlike the RPA application calling permissions for an on-premises robot, service-oriented robots do not currently support data permissions. This means there are no restrictions on robots and RPA applications. Your higher-level system is responsible for controlling calling permissions. |
Bulk manage service-oriented robots
Bulk creation
Prepare an Elastic Desktop Service image. You can prepare a cloud desktop image in one of two ways:
Recommended: Contact our support team to have the latest cloud desktop image, which has the service-oriented robot client installed, shared with your account. After the image is shared, you can view it in the image center of Elastic Desktop Service (Enterprise Edition), as shown in the following figure. This image is based on Windows Server 2019 with additional adjustments.

Alternatively, you can prepare your own image, which you must then configure and adjust.
Method 1: Perform bulk operations in the console
When you create cloud desktops in the Elastic Desktop Service console, select the shared image on the Custom Purchase page, as shown in the following figure:

In the RPA console, go to the Service-oriented Robot > Robot List page to add the cloud desktops in bulk. You can select up to 50 cloud desktops to add at a time.
Method 2: Use OpenAPI to create and add robots in bulk. This requires calling APIs of Elastic Desktop Service and service-oriented robots. The sequence is shown in the following diagram:
Step 1: Call the CreateDesktops operation to create one or more cloud desktops. The following example shows how to create cloud desktops without using a desktop template. Take note of the following parameters:
RegionId: You must specify a region where Elastic Desktop Service supports service-oriented robots. For more information, see Select a robot type.DesktopAttachment.ImageId: The ID of the shared image.DesktopAttachment.SystemDiskSize: This must match the disk space required by your software.DesktopAttachment.DesktopTypeThe cloud desktop specification, which must match your business requirements.
If you use a joint specification for Elastic Desktop Service and RPA, enter the corresponding joint specification.
EndUserId: The user (convenience account) to add to the cloud desktop. If this parameter is specified, all cloud desktops created in this batch are associated with this convenience account, and this account must match the Windows user in Step 4. If this parameter is empty, you can set it in Step 2 and Step 3.WarningService-oriented robots do not support Windows multi-session. We recommend associating only one convenience account with each cloud desktop. If you associate multiple accounts, Windows session switching can cause errors during robot operation.
(Optional) Steps 2 and 3: Call the CreateUsers and ModifyUserEntitlement operations to create a convenience account and authorize the user to use the cloud desktops.
ImportantThis applies to scenarios where each cloud desktop must use a different account.
In Step 4, you must pass the account information for each cloud desktop.
Step 4: Call the AddRobots operation to add the robots in bulk. This API has a limit on the number of robots you can add in a single call. For more information, see the API description. If the number of robots to add exceeds the limit, your system must process the robots in batches.
Step 6: This add operation typically completes in under 1 minute. You can call the ListRobots operation to check the result.
Image creation
When you create robots in bulk, we recommend standardizing the robot's runtime environment using cloud desktop images. You can build a custom image based on the one we share with you and add any required software.
Base image details: The image is built on Windows Server 2019 and comes pre-installed with the service-oriented robot client and Google Chrome (with the RPA robot Chrome extension configured).
For the steps to create a cloud desktop image, see Create a custom image from a cloud desktop. After you install the required software and are ready to create a new custom image, note the following:
Handling of personal user data used by the software:
You need to verify which software configuration information to retain and which to remove. For example, software that requires an imported license may have restrictions when multiple clients use the same license.
When you create a cloud desktop image, the contents of the
C:\Usersfolder are automatically cleared. For more information, see Create a custom image from a cloud desktop. We do not recommend disabling this cleanup option during image creation, so you need to confirm its impact on your software.
Disable the automatic update feature of the software. The configuration for automatic updates varies by software. You need to find the relevant documentation.
Stable operation
Target applications have inherent limitations that can introduce instability, and these limitations are often a black box. To ensure stable operation, consider the following general recommendations.
Cloud desktop allocation
Many applications use environment fingerprint information for verification. For example, websites may collect information about the client's browser. Therefore, do not switch between different target application accounts on the same cloud desktop. Instead, use a one-desktop-per-account model.
Additionally, select a cloud desktop specification and configuration that meets your stability and cost requirements. Generally, a 2-core, 4 GB cloud desktop specification is sufficient for automating Chrome, while 4-core, 8 GB or 8-core, 16 GB specifications are suitable for client-based applications. The optimal choice depends on the resource consumption of your software and automated process. Base your decision on the results of your tests during the development phase.
Robot runtime standardization
Standardizing the runtime environment primarily involves:
Windows system settings, such as input methods, resolution, and DPI (desktop scaling)
The service-oriented robot client
Software environment: installation and configuration
Standardization is mainly achieved through cloud desktop images and policies:
Cloud desktop images: See the preceding sections.
Cloud desktop policies: Pay attention to the following settings:
Fixed resolution. If your automated process uses CV components or image-based operations, we recommend setting a fixed resolution for the cloud desktop, as shown in the following figure. For more information, see Experience-related rules.

Enable screen recording.
ImportantThe screen recording feature is critical for troubleshooting. We recommend enabling it.

The following table describes the recommended settings. For more information, see Audit-related rules.
Parameter
Description
Screen recording type
Select "Full-session Recording". This mode records the robot's entire operation.
Screen recording frame rate
The default setting is sufficient. This setting directly affects the size of the recording file.
Retention period
Specifies the retention period for screen recording files saved in Alibaba Cloud OSS. Configure this based on your requirements.
Disable clipboard.
ImportantWe recommend selecting "Disable Bidirectional Copy". This prevents the clipboard on your local machine from communicating with the cloud desktop's clipboard when you log on using the Elastic Desktop Service client, an interaction that can cause automated processes to fail.

Network
This refers to the network configuration of Elastic Desktop Service, which includes two parts:
Public bandwidth. By default, a new cloud desktop uses basic bandwidth. We recommend changing it to premium bandwidth. For more information, see Manage public bandwidth.
WarningRPA scenarios require premium bandwidth to ensure network stability.
Bandwidth assessment: We recommend using the pay-by-traffic billing method when your service first goes live. After an initial period, you can review your actual consumption and decide whether to switch to a different billing method to reduce costs.
Public egress IP. If the target application has specific requirements for the cloud desktop's public egress IP, you can use services like Cloud Enterprise Network or purchase external IPs to meet these requirements.
Ongoing maintenance
After a service-oriented robot is in production, ongoing maintenance typically involves the following:
Maintenance task | Recommendation |
Update of an automation target: A website operated through a browser | Modify the automated process (RPA application). After publishing the new version, the robot automatically pulls the latest version if you do not specify an RPA application version in the CreateTask call. You can also specify a version to run. |
Update of an automation target: A Windows client application requires an upgrade, for instance, to use a new feature. |
|
The service-oriented robot client needs to be upgraded. |
|
Operating system updates (such as critical security patches) |
|
Notes on changing a cloud desktop image:
Software environment after the change
WarningAfter you change the system image, the cloud desktop is effectively restored to a newly created state. Any software and personal data on the system disk or data disks are cleared. Therefore, back up any content you want to keep before changing the image.
In addition, changing the image affects client or web applications that save login states. After the image is changed, you must sign in to the target software or website again. Carefully evaluate the business impact of this action.
Service-oriented robot after the change
The ID of the service-oriented robot on the cloud desktop remains unchanged after the image change.
The service-oriented robot must be added again before it can be used. We recommend performing the image change during a maintenance window when no tasks are running.
ImportantFollow these steps in order:
Delete the RPA service-oriented robot whose image you want to replace.
You can perform this in bulk from the Service-oriented Robot page in the RPA console.
Alternatively, call the DeleteRobots API.
Change the cloud desktop image.
You can do this in the Elastic Desktop Service console. For more information, see Change the image of a cloud desktop or a shared cloud desktop.
Alternatively, call the RebuildDesktops API.
Add the corresponding cloud desktop as a service-oriented robot again.
You can perform this in bulk from the Service-oriented Robot page in the RPA console.
Alternatively, call the AddRobots API.
After the robot connects, it can receive tasks normally.

