Precisely + Salesforce integration

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

Connecting Precisely to your Salesforce environment allows you to automatically generate contracts and manage deals faster!

Integrate Precisely with Salesforce to use our features such as generating automated contracts and sending contracts for e-signing. All of this can be done from within the Salesforce platform. 

Let your sales team focus on sales, and your legal team 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 read events from the Message Bus.

In Salesforce

In Salesforce, Flows are used to define what events should be published to the Message Bus. When you provide specific data in the payload of the event, Precisely then knows how to read and use the data that has been published. In Salesforce you can define complex workflows that determine what actions should trigger your events to be published, and what data should be included when this occurs. 

The same process works in reverse: You can use flows to read events from the Message Bus and define what Salesforce should do with this information. After a contract is created, Precisely publishes the events back to the Message Bus and this data can be used in Salesforce.

Example: Updating an 'Opportunity' to display information such as the status of the contract or a link to the contract inside Precisely.

In Precisely

The integration on Precisely’s side is more automated. When a contract is created from Salesforce using the integration, Precisely will send all relevant information about the contract back to the Message Bus.

Some examples of information published back to the message bus after a contract has been created include:

  • General information about the created contract (ID, URL, etc.)
  • Metadata contained within the created contract
  • Status changes relating to approvals (awaiting approval, final approval completed, etc.)
  • Information on the signing status of the contract

How to set it up?

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 instructions given to you 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, select Opportunity as the trigger, for example. Next, select if you would like to generate a new contract each time a new record is created, updated, created or updated, or deleted. You can configure a flow like this with any object in Salesforce - standard or custom.

Screenshot 2024-06-17 at 14.30.07

3. Criteria

The next step is to set up any criteria that should be considered. These could be elements such as opportunity stage, custom fields, or buttons. This criteria is used to determine if 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” before a contract is generated.

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.

PreciselyProjectEvent

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. https://app.precisely.se/templates/11111). 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.

PreciselyStatusEvent

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!