Skip to main content

Pre-fill fields from Salesforce via SOQL bot

Y
Written by Yuliia Biletska
Updated over 2 months ago

This is a paid bot, and its usage will be counted toward your plan's credit limit. For more information about credit usage, refer to this article.

General

Automatically transfer data from Salesforce to your documents by using SOQL queries.

Use case: If you often fill out documents using Salesforce data, this bot helps automate that task—saving time and reducing errors.

How to set up

To add the bot:

1. In the step settings, select Add bot or click the plus icon after a specific action.

2. Choose Bot and search for the Pre-fill fields from Salesforce via SOQL bot.

3. Click on the bot to install it.

Trigger

A trigger is an event that causes the bot to start working. The moment of the bot's activation depends on its placement in the flow:

  • If the bot is added after a step or any other element, it will run once that element finishes its job.

  • If within the step, the bot will run based on the trigger you specify. Choose the trigger type most relevant to your case:

According to this, select the bot's trigger type that will be most relevant to your case:

Trigger type

Description

Step started

The bot activates when you start the workflow

Document opened

The bot activates when signers start filling out the documents or switch between them.

Field changed

Use for cases where a response or action is needed immediately after a user enters or updates information in the specific field. Select the document and the field that the bot should pay attention to complete the setup.

Document completed

The bot activates once the signer completes a document you specify in the trigger settings.

Connection settings

To connect the bot to your Salesforce account, click Connect in the Source section.

To add a new connection, choose a Salesforce instance (Production, Sandbox, or custom domain) and click Select.

Using the three dot connection menu, you can disconnect the current account or connect to different accounts anytime.

Lookup

In Find record, enter your SOQL query with the fields you want to take data from.

Use data variables to help the bot find the needed records.

The variables include:

  • Date and time - indicate a period of time

  • Document fields - select a field in your document

  • Input parameter - select the input parameter field

  • Package - package-related data

  • Signer details - signer’s name or email

  • Workflow - workflow name

After entering the query, click on the white background outside the box to activate it. Add as many queries as you need by clicking Add another SOQL query and click Continue to move to the next section.

Mapping

In Data mapping, click Map fields to link Salesforce fields with the corresponding fields in your document.

A pop-up window will appear. Drag and drop record fields onto the corresponding document fields.

Names of the mapped fields are written on the canvas so the users can understand where the data will go. Use the search bar to find the field you need quickly.

You can also map signer contact details, from the record to the document. Click Map signer and drag their phone or email onto the respective document fields.

Note: You can only map signer details if the bot is placed before that signer in the workflow diagram. That’s why in our example, we can map Signer 2 but not Signer 1.

Click Continue to move to the next section.

Testing

In the Test section, simulate the bot's performance by clicking Test.

To test, enter data that matches the search criteria specified in the Find record section. Enter it in the field as shown below. If configured correctly, you'll see a success message. If there are issues, an error message will appear instead.

Note: Once your workflow is published, the Test section is disabled, and the bot runs based on the conditions defined in the Find record section.

Conditions

Set conditions to control when the bot activates, tailoring it to your specific needs for more efficient automation. For detailed guidance, refer to this article.

Advanced settings

This section allows you to choose how the process proceeds in case the bot fails:

  • Select Proceed to allow the workflow to move to the next signer and automation if the bot isn't crucial.

  • Select Stop if the bot is critical; this prevents the next signer from receiving documents if data wasn't pre-filled from the source of your choice.

Did this answer your question?