Uspacy Knowledge Base
All materialsAutomationConditional actions

Retrieving and using entity data in Conditional Actions

Retrieving and using entity data in Conditional Actions

In this article, we’ll explain how to retrieve field values from a specific entity element and make them available as variables for setting up the next steps in your automation

The Retrieve action helps you extract data from any entity (specifically: Leads, Deals, Contacts, Companies, Tasks, and custom Smart Objects) and pass it into the following steps of a conditional action.

bc348b16-09ad-4366-8c27-1574df9fc254

Let’s look at a common but useful scenario where the Retrieve action is used alongside Create and Change fields actions. That is:

  1. First, a new entity element is created — in our case, a custom Smart Object called Project.
  2. Then, we "retrieve" its ID.
  3. After that, we use this ID to link the newly created Project to a Lead.
4e93dd28-309c-4972-a8d8-a768f8a40b1c

The step-by-step guide below ⬇️

Trigger and Conditions

For our conditional action “Linking the Smart Object to the Lead”, the trigger will be the stage change to “Order confirmation”.

468d0659-7f90-4945-913e-2572d5ad1785

Assigning the actions

There are three of them:

Create

When the lead reaches the selected stage, a new Smart Object (a Project) should be created.

0f990f0d-51a2-4f96-8ed1-423e944d10fc

We’ll configure its title. Of course, we can also use the conditional action to fill out other required fields right away.

61ab808d-4456-42a3-8f80-eb0a6625203a

💡 This is the first action in the automation and will receive the ID tag: id:1.

7c2ce3de-fb04-4562-9f58-aad05ca4c917

Retrieve

Next, we can retrieve data from the newly created Project. To do this, select Projects as the entity.

e4a6404e-3f35-48c5-aaa2-7c2a6259fe37

To make sure the conditional action pulls data from the project it created (like its ID), we specify this in the settings.

5c5d0176-7762-4dac-bca2-bb605bc41ded

💡 This is the second action and will receive the tag: id:2.

ff378027-412b-4160-af72-12114efa0ad3

Change fields

Now that we have the Project ID, we can link the Project created by the automation to the Lead. Set Lead as the entity where fields will be updated.

828e253b-5dfb-45d8-9e7d-74c4aac078b2

To ensure the system correctly identifies the source lead whose stage was changed (and which triggered the automation), we identify it by ID.

94e6c3ac-1a8c-402c-bc04-e91ae4a85b1b

Then, add a custom field to the lead of the type: Link to Smart Object → Projects.

296dd072-9477-4f75-aa30-9035616ef5d3

Here, we’ll specify that the conditional action should use the retrieved Project ID to auto-fill this field.

22957319-77f4-4081-af44-d4e8c90c3af8

💡 This third action will be tagged: id:3.

f2dc9654-4425-4430-b28c-d34b543f46a7

Why IDs and what do they mean? These ID tags (e.g., id:1, id:2) are internal step identifiers within the current conditional action. Every action block you add (Create, Retrieve, Change fields, etc.) is assigned an ID like id:N. This allows the system to clearly understand which step’s output to use when referencing variables.

Create (id:1) | projects → …

Retrieve (id:2) | projects → …

These indicate that the values are being pulled from the corresponding step (step 1 or step 2).

258d6ba4-af4c-4006-a9f3-858a1cf1a945

Example of reading step tags:

Action(id:1) | projects → ID {id} = the ID of the project created in step id:1.

Retrieve (id:2) | projects → Title {title} = the “Title” field from the element retrieved in step id:2.

Result

Once everything is configured, click Create to save the conditional action.

ffed9a2e-11a1-4e13-aa75-90e3cc8c1705

Then, go to the lead’s card and move it to the Order confirmation stage. Refresh the page and you’ll see a Project that was automatically created by the conditional action and successfully linked to the lead.

2d938225-6a51-4610-9de9-eca59603ef51

You can even open the project and check whether it was placed in the correct funnel and stage — according to your automation settings.

00b2b061-6c8e-44a1-9af8-0fac17d2aa82

Done!

The Retrieve action makes your automation scenarios more flexible. You can:

  • Access field data from any entity element via ID
  • Use those values precisely in the next steps
  • Simplify linking and referencing processes
  • Build reliable automation flows — without manual work

If you have additional questions or you need to contact the support, send a request to this email [email protected]

Created: September 25, 2025