Precisely + Salesforce integration

Learn more about using Precisely’s contract automation and contract management functionalities from within your Salesforce environment

By connecting Precisely to your Salesforce environment, you’re able to automatically generate contracts and manage deals faster.

Integrating Precisely with your CRM lets you use Precisely features - such as generating automated contracts and sending them for e-signing - based on the given information in Salesforce. All of this from within Salesforce.

Let sales teams focus on sales, and legal to focus on legal.

How does it work?

Salesforce and Precisely use Message Bus to communicate. Both platforms can publish events in the Message bus, and both platforms can read events from the Message bus.

In Salesforce

In Salesforce, you use Flows to define what events you would like to publish to the Message bus. By providing specific data in the payload of the event, you instruct Precisely on how to read and use the data that has been published. In Salesforce, you can define complex workflows that determine what actions should trigger the publishing of your events and what data should be included when doing so.

You can also use the same process in reverse: using Flows to read events from the message bus and defining what Salesforce should do with this information. Once Precisely publishes events back to the Message bus after a contract has been created, you can use this data in Salesforce. 

Example: updating an Opportunity to display the status of the contract or a link to the contract inside Precisely.

In Precisely

The integration on Precisely’s side is more automated. If a contract is created from Salesforce using the integration, Precisely will send all relevant information regarding that contract to the Message bus. Some examples of information published back to the message bus after a contract has been created are:

  • General information regarding the created contract (id, URL, etc.)
  • Metadata regarding the created contract
  • Status changes relating to approvals (approval started, completed, etc.)
  • Information regarding signing status
  • Once signed, information regarding the signed contract


How to set it up?

To be able to use the integration, you need to have access to both Salesforce and Precisely. As a first step, you’ll need to connect the two platforms according to the instruction given by the Precisely Team (see how to contact us).

A) Send data to Precisely

To create a contract based on a specific event or trigger, you need to send data to Precisely. This is done by setting up a process using Salesforce Flows.

1. Flows

To enable sending data to Precisely from Salesforce, you need to configure the integration using the Salesforce built-in Flows. By using Flows, you can set up your conditions to trigger contract drafting at the correct time in your pipeline.

Example: Triggering the automated contract drafting once an opportunity reaches the Offer stage in your sales pipeline in Salesforce.

2. Triggers

When configuring a new flow, simply select, for example, Opportunity as the trigger. Then, select if you would only like to generate a new contract each time a new record is created, updated, created or updated, or deleted. This can, of course, be any object in Salesforce - standard or a custom one.

3. Criteria

The next step is to set up any criteria that should be considered. This could be elements such as opportunity stage, custom fields, or buttons. These can be used to determine whether a contract should be generated. If you want to trigger contract creation in the Offer stage of the sales process, simply set one of your criteria to check if the opportunity stage is “Offer”. If so, continue creating the contract.

4. Actions/Events

The type of platform event determines which action should be performed in Precisely.

Example: to create a new project (= a contract based on a template) a PreciselyProjectEvent is sent.


The below specification is based on the example above using the Opportunity object in Salesforce. If another object is used to fetch information, the relevant fields should be configured to match that.

Create project

Field values

  • ObjectId refers to which Object the Project should be associated with and where we should fetch information. If we follow the above example of Opportunities, this value should be set to type Field reference and value [Opportunity].id
  • ObjectName field should be set to type String and value Opportunity to reflect the object we are fetching data from.
  • Record type field is a subtype to the object that might be relevant.
  • PreciselyProjectDraft is a setting you add to tell Precisely that the goal is to create a draft of a project, so if not all references in your template are filled out, a partially drafted project will still be created that can later be completed. This should be set to type Boolean and value True
  • PreciselyProjectTitle refers to the title of the project in Precisely. This will be visible in the Draft & Sign list inside the Precisely platform. You can set this to any type and any value of your choosing, but the best practice is to relate it to the object in some way, so if connected to an Opportunity it might be the name of the Opportunity.
  • PreciselyTemplateId refers to the template you would like to use in Precisely. This information can be found either by getting it from our API or from inside our application in the template’s URL (e.g. In this case, the type of this field should be String and the value should be the template ID fetched from the template you would like to use in Precisely (e.g. template 11111)
  • PreciselyUserEmail is the email address that will be used to identify which user has performed an action in Precisely. This is typically set to the user in Salesforce who performed the action. For an Opportunity it would be the type Field reference and the value would be set to [Opportunity].Owner.Email

    Please note that a user with a corresponding email address needs to be an active user in your Precisely organization and have access to the template. This is to ensure that the audit trail stays intact and all template automation, such as approval rules, works as expected. It also serves as a safeguard where you can limit access to templates in Precisely. These limitations will also be present in Salesforce.

Data mapping

Once the basic setup above is established, we need to map our Salesforce data points into Precisely references. This is also done using field values. It is highly recommended that you finalize your template setup in Precisely before you map your data, to avoid double work.

The mapping from Salesforce data points to Precisely references is done using a specific naming convention to allow the Precisely integration to know what to do with the field values sent. This is done by adding a new field value and using the naming convention Reference_[reference_name]

  • Reference, is a static part that lets Precisely know that this field should be mapped towards a reference (question) in the template mapped in step 5.
  • [reference_name] should be replaced with the actual name of the reference that has already been set up in the template in Precisely.

Example: If you have a question in your template with the reference name counterparty_name, the full name of this field should be Reference_counterparty_name.

Using this naming convention, you can map a near-infinite number of references in Precisely to data points across any number of objects in Salesforce.

Canceling a created contract project

You can also cancel an already created project. For example, if the Opportunity in the example above is marked as Lost or removed in Salesforce, you might want to clean up a bit and remove any contract created in Precisely relating to the Opportunity. To do this, create a new action based on Criteria. In this case, the criteria might be that the Opportunity was marked as Lost.

Field values

  • ObjectId refers to which Object the Project should be associated with and where we should fetch information. If we follow the above example of Opportunities, this value should be set to type Field reference and value [Opportunity].id. This identifies which project or projects should be canceled based on the object id.
  • ObjectCanceled this tells Precisely that the object (Opportunity in this case) has been canceled and objects in Precisely should be canceled as well. This should be set to type Boolean and the value should be True.
  • PreciselyUserEmail is similar to the above.  It needs to be in the field values to identify which user is performing this action. This is typically set to the user in Salesforce who performed the action. For an Opportunity, it would be the type Field reference and the value would be set to [Opportunity].Owner.Email.

Last steps and testing

Once everything is set up and all data is mapped, your integration will be live and ready to use. You can easily test it by performing the defined trigger event and checking in Precisely that a project has been generated.


B) Sending data back to Salesforce

You can take a similar approach as when you send data to Precisely to fetch data back into Salesforce from the Message bus. As mentioned previously, Precisely will send back any data relating to the created project and contract to Salesforce, such as status changes and contract data. You similarly use the platform Event-Triggered Flows to fetch data and update your Salesforce objects based on what was sent back from Precisely.


This event is for sending information back to Salesforce. If configured, it will trigger every time something in the mapped information has changed.

Field values

  1. ObjectId refers to which Object the Project is associated with and where we should fetch information.
  2. ObjectName field should be set to type String and value Opportunity to reflect the object we are fetching data from.
  3. PreciselyProjectId field contains the Precisely project id.
  4. PreciselySigningStatus field contains the signing status. (unsigned/signed)
  5. PreciselyApprovalStatus field contains the approval status in Precisely (initially requested, initial partial, initial complete, final pending, final requested, final partial, final complete). NOTE: If no approval is configured on the project the status will be final complete from the beginning.
  6. PreciselyProjectDraft field represents if the Precisely project is incomplete.
  7. PreciselyProjectStatus this field represents the overall contractual status using values such as draft, review, signing and signed,

Data mapping

To notify Salesforce when answers are modified in Precisely (e.g. when a project is redrafted) the same kind of mapping with Reference_[reference_name] can be added to the event and if the reference value can be found in the projects answers it will be added to the event.


Any questions remaining? Get in touch!