Run a DocGen Package using Agentforce
You can now use Salesforce Agentforce to run a DocGen Package from a Salesforce record. This allows you to chat with an AI assistant (an Agentforce “Agent”) that helps you quickly generate a document and attach the document back to any Salesforce record. This uses the same DocGen Packages you have set up previously, that you can run from buttons using the DocGen lightning component.
In order to use this feature, additional set up is required by a Salesforce admin.
Note: In order to use the Agentforce Connector with the newest update you need to be on Nintex DocGen package version 20.14 or higher.
In this topic you will be guided on creating a new agent from within Salesforce and how to use that agent to run a DocGen Package directly from a Salesforce record.
Agentforce requirements for use with Nintex DocGen
In order to get started with using Agentforce you will need to have the following:
-
Agentforce set up and enabled for your Salesforce environment
-
Nintex DocGen for Salesforce installed
-
Nintex DocGen Agentforce extension
-
This is a free extension that can be downloaded directly from the Salesforce AppExchange
-
-
A DocGen Package already created for the record you are trying to run the package from (e.g. Opportunity)
-
Requires the use of Nintex DocGen's automation feature to be enabled. Check with your Account Manager to see if you are licensed to use automation.
Adding DocGen capabilities to your Agent
Once you have the above installed/ configured, you will need to add Nintex DocGen topics to an Agentforce Agent. Out-of-the-box Salesforce provides an Agent called “Agentforce”, and so typically you will link Nintex DocGen’s capabilities to this, but you can create your own Agent from scratch too. To find your existing Agent(s), you will need to go into Setup in your Salesforce Org, then Einstein->Einstein Generative Ai->Agent Studio->Agents or simply search for “Agents” in the Setup navigation search.
Once you’ve found the “Agentforce” Agent (or an Agent of your choice), you will need to configure the following items:
-
Link the DocGen Actions into the Topic
Link Nintex DocGen actions to topics for use with Agentforce
After Agentforce has been enabled, and the Nintex DocGen Agentforce extension is installed, we can now go and link the Nintex DocGen actions to the agent topics that your users will then be able to use from the Salesforce Agent chat interface to run a Document Package to generate documents.
-
In Salesforce Setup, locate the Agent Studio option.
-
Expand Agent Studio and select Agents.
-
On the Agents screen, select the Agentforce agent.
-
Once the agent details screen loads, click Open in Builder.
-
In Topic Details, click the Nintex DocGen topic..
- Select This Topic's Actions option.
- In This Topic's Actions, click New and then select Add from Asset Library from the drop-down menu.
- This displays a list of all available actions. By default there are three Nintex DocGen agent actions you can add to your topic(s) from the Asset Library. These are:
- Find Document Package
- Find Delivery Option
- Run Document Package
- Select all three actions and click Finish.
- Click Activate to complete the build.
Note: You can use the Conversation Preview window to preview the chatbot and ensure that the AI assistant is working as intended. However, note that in order forrom this preview to work you will need to have Salesforce records that already have existing Document Packages set up for use with that record. For example, if you wanted to test the chatbot to run a Document Package for a Salesforce Opportunity, you will need to have already created a Document Package related to the Opportunity in Salesforce.
What can users ask the Agent to do?
After setting up the DocGen actions and creating the topics, it is oissand actions you’ve configured from within the Agent Builder. If you choose to do this, use the types of questions/ requests covered in the “Run a Document Package from a Salesforce record using Agentforce” below to test.
A couple of tips:
-
Use the Eye icon at the top of the Conversation preview pane, to target the conversation as if it has been started from a record page; you can choose a specific Salesforce record for it to use.
-
When repeatedly testing the same request, in many circumstances you can just type “again” into the conversation for it to repeat the previous operation.
Run a Document Package from a Salesforce record using Agentforce
Now that a new actions have been added, and new topics have been created from the Einstein Copilot, you can use the Agentforce AI assistant to run a Document Package directly from a Salesforce record. In this section we will go over an example of how to use Agentforce to run a Document Package.
-
In Salesforce, open a record that has a Document Package created that is using the Attach delivery option. In this example, we are going to use an Opportunity.
-
From the record, click the Agentforce icon to display the Agentforce agent.
-
Begin chatting with the chatbot.
Trying typing "Generate me a document for this opportunity".
-
The agent will then attempt to locate a Document Package related to the current Opportunity you have opened. If it succeeds it will ask for confirmation to proceed with the document generation. If you have more than one type of document that can be generated from the record you have opened it may ask which with document you want to use.
-
Once you confirm, the document generation process will continue and the document will be attached to the record. Refresh the "notes and attachments" on the Opportunity until you see the generated document.
Try out different prompts!
Remember that the Nintex DocGen capabilities we’ve added to the Agentforce agent can be used in conjunction with the other capabilities the agent has out of the box, like finding records and updating records.
For example, lets say you were looking to generate a document for an opportunity in Salesforce, but before generating the document you wanted to make a quick change to the Opportunity record first. By using Agentforce, you can combine both requests at the same time.
Example prompts:
Example 1: “Create a proposal for this” – from an opportunity record page, you could ask the Agent this, and it will know what you mean by “this”, and will find any DocGen Packages targeting the Opportunity object, with “Proposal” in the name of the package.
Example 2: “What are my top opportunities right now?” – from the home tab of Salesforce (i.e. not a record page), then once it replies with a short list you could say “I’d like to create a proposal for the second one”, at which point the Agent will route the request for Nintex DocGento generate a document for that record.