Empowering Your Salesforce Experience: Exploring the Features of airSlate’s DocGen for Salesforce

Empowering Your Salesforce Experience: Exploring the Features of airSlate’s DocGen for Salesforce

Last Updated on June 19, 2023 by Rakesh Gupta

Gone are the days when document creation, generation, and management were a product of tedious manual processes. Today, DocGen can be easily streamlined using airSlate’s native integration with Salesforce.

Simply put, DocGen is a way to create documents with dynamic content. It allows for adding conditional logic and inserting data snippets of variable size to generate a document. You simply write syntax using airSlate’s built-in tag builder and don’t have any issues with formatting or creating templates for other cases later.

For example, the Sales team doesn’t know which specific product a customer will buy, so they can add several conditions in their Order form that will show depending on the product. This allows for creating an Order form once, thus reducing the amount of manual processing.

Generating documents with dynamic content pre-filled from Salesforce

Imagine you can generate a report that includes data about Opportunities that are not closed, or only those created after a specific date, or any other criteria of your choice by a single click of the button. Later, you can attach these reports to Salesforce records, upload them to external storage, or email them to clients if needed.

To do so, you’ll need to create tables with a dynamic number of rows by adding Table tags to the DOCX template.

  1. To start, select the Flow you’re currently working on in airSlate or create a new Flow if you don’t have one yet. Choose Document generation from the Document block. Create or upload the DOCX document of your choice.
  2. Then create or insert a simple table with the following tag syntax or simply copy and paste the table below:

    Name Quantity
    {{OpportunityName}} {{OpportunityAmount}}
  3. Take note: {{table(Products)}} {{endtable}} are the rows between the opening element row.
  4. When finished, click Complete.

How DocGen works in airSlate for Salesforce – Adding Documents and Forms

  1. Proceed to the Bots tab and click Add Bot.
  2. Choose the Pre-fill from Salesforce Record from the Salesforce category.This airSlate Bot automatically pre-fills a document with data taken from a Salesforce record, child objects, and PNG and JPEG files.
  3. Click Install Bot to add it to your workflow, after that the Bot settings window will open.
  4. Connect your Salesforce account and choose the Salesforce base object that contains the record you need (for example, Account). Select Opportunity as a related object.
    1. Select Table for the data type you’d like to map
    2. Map Salesforce object fields to document fields
    3. Next, adjust search conditions for the starting record
  5. The starting record is a record in Salesforce that we use to pull data from. If you run the Flow from Salesforce, via a custom button, use that record where the custom button was clicked, as the starting record. If the Flow is not run from Salesforce, just add some search criteria to find the record containing the data that you need.
  6. Select the starting Salesforce record for pre-filling document fields. Select a Salesforce object field and map it to a field in the document (e.g., Account id). When a recipient adds data, the Bot will find and insert other data for this record into the fields you’ve mapped.
  7. Set conditions if you want to adjust how and when the Bot will act. Conditions are optional and can be based on a document, recipient, date, Flow, or contract stage, number of filled fields in. You can add more than one condition as well as specify any number of conditions to trigger the Bot.
  8. If needed, you can customize the Advanced setup, setting when the Bot will act and adding custom tags.
  9. After that, click Apply setup to enable the Bot.

How DocGen works in airSlate for Salesforce – Adding Salesforce Bot

DocGen in airSlate for Salesforce works seamlessly with the addition of the Salesforce Bot. This powerful integration streamlines the document generation process within the Salesforce ecosystem. By leveraging the Salesforce Bot, users can easily automate the creation and distribution of documents, saving valuable time and increasing productivity. With just a few clicks, the bot pulls relevant data from Salesforce records and merges it with customizable templates, generating polished, error-free documents.

Adding conditional Logic to Your DOCX Templates

Adding conditional tags to your DOCX templates allows you to show blocks of text depending on certain conditions.

The basic syntax of conditional tags appears as follows:

  • {{if(ConditionFieldName=‘Value1’)}}
    • Output 1
  • {{else((ConditionFieldName=‘Value2’)}}
    • Output 2
  • {{endif}}

Let’s look at each piece separately

  • {{if(ConditionFieldName}} success action, if condition 1 is true
  • {{else((ConditionFieldName}} success action, if condition 2 is true
  • {{endif}} condition is any expression, variable, or value from a function, calculation, or a data source.

Using conditions, you can show or hide paragraphs of text. To create a condition, you can use a Field or Variable (for more complex cases) with operators such as =, !=, >, <.

For condition values, you can use set values, field values, or variables.

Let’s go through a case where, depending on the recipient, the account manager leaves a note to either approve or review the monthly report.

Below you will find a step-by-step guide on how to add conditional tags to your DOCX templates:

  1. Upload the document you need and click Edit next to it
  2. Add the conditional tag of your choice to your DOCX template. For instance, we’ll insert the tag with conditions based on the Opportunity Stage.{{if(AccountSite=‘Legal’)}} Congratulations on closing the deals!
  3. {{else(AccountSite=‘Sales’)}} Please check the amounts.
  4. {{endif}}
  5. After this, click Complete.

How DocGen Works in airSlate for Salesforce – Setting up Conditional Logic (Part 1)

  1. Move to the Bots tab, click Add Bot, find and install the Pre-fill from Salesforce Record from the Salesforce category.
  2. Once the Bot settings window opens, configure the Connection settings.
  3. Next, select objects and map fields. Choose the Salesforce base object that contains the record you need (for example, Account).
  4. The data type you are going to map is set to Single by default.
  5. Map Salesforce object fields to document fields: Account Name and Account Site in our case.
  6. Then, select the starting Salesforce record for pre-filling document fields and decide when the Bot will act.
  7. If necessary, move to the Advanced setup to set how often the Bot will act, what to do to a Revision in case the Bot fails, and add tags for searching Flows.
  8. Click Apply setup to enable the Bot.

How DocGen Works in airSlate for Salesforce – Setting up Conditional Logic (Part 2)

With DocGen, you can automate the generation of documents based on specific conditions, streamlining your workflow and eliminating manual errors. By configuring conditional logic, you can dynamically control the content, formatting, and distribution of your documents, ensuring personalized. Discover how airSlate’s DocGen revolutionizes document generation, making your Salesforce experience even more efficient and effective.

Once you’ve finished the Bot setup, you can trigger your workflow using the custom button.

How DocGen Works in airSlate for Salesforce – Custom Button

To see if the Flow was run, return to your airSlate account and proceed to all Flows by clicking Close at the top of the page.

Next to the Flow, click Revise. Choose the Step to revise the Flow and click Revise once more.

Once the Flow is run, the document will be automatically pre-filled with values from Salesforce records and then parts of the text will be rendered conditionally based on these values.

How DocGen Works in airSlate for Salesforce – Workflow Revision

With DocGen, you can effortlessly revise your workflows, enhancing collaboration and productivity. This powerful tool allows you to make real-time changes to your documents, track revisions, and gather feedback from stakeholders, ensuring seamless document management. Say goodbye to time-consuming manual revisions and embrace the efficiency of airSlate’s DocGen for Salesforce, transforming your workflow into a streamlined and error-free process.

The Bottom Line

In this blog post, we have explored the process of generating documents with dynamic content pre-filled from Salesforce and incorporating conditional logic into your DOCX templates. However, we believe that we have only touched upon the limitless possibilities that airSlate for Salesforce offers. If you are intrigued by the capabilities of airSlate, we highly recommend requesting a demo to witness its full potential in action.

Formative Assessment:

I want to hear from you!

What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? Feel free to share in the comments below.

Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.