[RPA007] Request to Smart Document Generation to Request’s comment

What is it?

This automation generates a document from a request and add it to the comment section of the same request.

The following diagram presents a high-level view of this standard configuration:

Workflow for RPA007


The information provided here is about standard RPA configuration. Custom RPA configurations offer more options and flexibility but induce extra costs. For instance, you need to use a custom configuration to save generated Document Generation Templates under document types of company documents. In this case, please contact your UKG sales representative.

For what purpose?

This automation is usually used to generate, preview and validate a document before sending it to signature (using another RPA automation).

Alternative approaches

You can also use:

  • Our API library to give you full autonomy but may require development resources on your side.

  • Manually generate the requested document and manually post it in the comments section.


In order to use this automation, you need:

  • People Assist Request Manager configured

  • Smart Document Generation configured

  • The Smart Document Generation template ID (e.g. Template-ID: employment_certificate)

  • A trigger rule or a macro to trigger the automation

Request form field IDs

To generate the document based on the request’s data and post it in the comments section, you need to include the following mandatory field ids in the form:

Request form field id

Field types available




Short text; Dropdown; Single answer (radios); Single answer (buttons)

Technical ID (code) of the document generation template that will be used to generate the document.



Dropdown; Single answer (radios); Single answer (buttons)

Allows to select if the comment with the generated document will be visible to the employee or not. Default value = true (will not be visible by the employee). If set to false, the employee will be able to read the comment and download the generated document.



Short text; Long text

Text that will be posted in the comments with the generated document.

Hello here is your certificate.


This automation can only generate 1 document per request.

Smart Document Generation form fields

To get the data from the request to the document template, the request form’s field IDs must be identical to the slugs in the Smart Document Generation template.

Best practices

  • Please note the case sensitivity of all fields and field values.

  • The field IDs from the request must be identical to the fields used in the Document Generation template.

  • The RPA will be executed even if not all fields of the Document Generation template are filled. There are no checks at this stage of the automation.

  • API permissions on form fields must always be:

    • Can complete this field


    • Must complete this field

Dataset syntax

To retrieve data set information from a request in a document generation template, you must comply with a specific syntax. That way in the generated document, you can get all values from each level of your dataset.

For example, you can have the following datasets:


Tags in the docx template

Request form slug


Levels: 2

with the “_1” and “_2” suffixes as it’s a 2-level dataset

The “2lvl” in the slug “dataset_2lvl_IAMADATASET” matches with the number of levels in the dataset

If you trigger the template, it can fetch values for the 2 levels of your dataset.

Levels: 3

with the “_1” and “_2” and “_3” suffixes as it’s a 3-level dataset

The “3lvl” in the slug “dataset_3lvl_IAMALSOADATASET” matches with the number of levels in the dataset

If you trigger the template, it can fetch values for the 3 levels of your dataset.

Options to be setup during the implementation phase by your UKG contact

CSV error report

A CSV error report is added to the RPA monitoring webpage when an issue is encountered by the automation.

Compatible trigger

The RPA can be triggered using a macro, an automation or a trigger rule, to be configured in People Assist.