Tip of the day

Support tickets can be submitted directly from application

Apps and databases connector

Salesforce

Estimated reading: 13 minutes 317 views

Cellosign integration with your Salesforce instance provides two-way communication channel where Cellosign can perform Create, Read, Update and Delete operations on your Salesforce objects. In addition with Cellosign app for Salesforce installed on your instance, you will also be able to customize Salesforce Webflows to initiate business process in Cellosign.

Resilience

We understand that the typical organization has more than one data source to interact with in a business process, for example business process can be initiated from Salesforce, additional data should be fetched from another source by API and so on. Having said that, our approach to application connector is to grant you with the possibility to integrate with any number of data sources and APIs.

Before we start

Salesforce integration is part of Cellosign PRO bundle and requires activation. Please contact your CS contact for activation.

In the activation process, you will be receiving in mail a unique URL to install Cellosign application for Salesforce.

About this guide

Salesforce and Cellosign requires two configurations:

  1. Configure your Salesforce instance in Cellosign. This is a mandatory step
  2. Install and configure Cellosign Salesforce package in your Salesforce instance. This is an optional step

Configure your Salesforce instance in Cellosign

At the end of this configuration you will be able to create templates in Cellosign that are connected with your Salesforce instance to Get data from objects, update Salesforce objects and upload files to Content version.

To do that we need to create Connected app and then couple it on Cellosign application

STEP 1: Create a Auth2 connected app

  1. Login to your Salesforce instance
  2. Click setup on at the top right corner drop down and search for “App manager”
  3. Click on “New connected app”
  4. Insert name, and email
  5. Check Enable OAuth settings
  6. Insert Callback url. In case integration is made on Cellosign production enter “https://app.cellosign.com/callback/salesforce-callback”, else if it’s integrated with pre-production insert “https://preprod.cellosign.com/callback/salesforce-callback”
  7. aelect Selected OAuth Scopes: Manage user data via APIs (api), Manage user data via Web browsers (web), Full access (full), Perform requests at any time (refresh_token, offline_access), Access unique user identifiers (openid)
  8. Check “Require Secret for Web Server Flow” and “Require Secret for Refresh Token Flow
  9. Click Save
  10. Generate “Initial Access Token
  11. Click on “Manage consumer details”, Verify your account and keep “Consumer Key” and “Consumer Secret”

STEP 2: Couple Connected app with Cellosign

In Cellosign application dashboard, click Integrations on the left toolbar, click “Add” on Salesforce pane and next to start the process

Alias and address

Enter an application alias. This alias will be used for implementing business processes, if there’s more than one integration give that meaningful name to avoid confusion.

Enter your Salesforce address

Consumer key and secret

Copy your Consumer key and secret from your connected app and insert on the following pane

Verify callback and login

Follow on screen instructions for validating Cellosign callback URL on your connected app and click login

In case you don’t see “Approve Salesforce login” pane, follow on screen instructions, most common reasons are:

  1. You will need to allow popups on your browser
  2. Consumer or Secret keys are incorrect

Verifying installation

After a successful setup you will be able to see a valid connection on Cellosign integration pane for Salesforce

Troubleshoot

In case of errors in completing this stage

  1. Make sure settings for Connected app are correct.
  2. Check token policy. In Salesforce search for “Manage connected apps”, locate your app. make sure “Refresh Token Policy” is set to “Refresh token is valid until revoked”

Install and configure Cellosign Salesforce package in your Salesforce instance

At the end of this configuration you will be able to create flows in Salesforce and connect it with Cellosign templates to:

  1. Create new interactive transactions
  2. Create Signed document (SEAL)
  3. Revoke transaction

To install this package, first we need to create a “Service user” in Cellosign. Add user and retain Access token.

Install Package by adding the url below to your salesforce url.

https://yourinstance.salesforce.com/packaging/installPackage.apexp?p0=04t8d000000hYmq

Select required profile and check “Acknowledge” for installing 3rd party package and click “Install”

4. Approve installation process. Check “grant access” and click “Continue”

5. Wait for the installation to complete [might take couple of minutes] and click done

6. Next. we need to configure the application. On setup left pane search’ lookup “custom settings” and click on “custom settings” page

7. Click on “Cellosign instance” and then click on “manage” on top pane and new on the next screen

8. Next we need to configure credentials point to Cellosign instance on the following screen

LabelRequiredValue
API TokenYesInsert here your user Token [Or service user token]. This token will be used to authenticate the request in Cellosign
Authorization TypeYesInsert here “Bearer Token”
Instance URLYesInsert your Cellosign base instance url. For example, for shared pre-production insert “https://preprod.cellosign.com” [Note: without “/” at the end of the url]
TimeoutYesEnter “30,000” for 30 seconds timeout

9. Click “Save” when done.

Next.

Salesforce connection tab

Synchronization pane

Click on Gear icon and click on “Synchronization” pane.

Use this function if you require to initiate new requests from Salesforce to Cellosign, first we need to enable synchronization. Otherwise, click the next tab.

By checking Synchronization, template data [“Blueprints”] will be pushed from Cellosign to your Salesforce instance. This will enable to configure Salesforce actions [“flows”] and connect them with Cellosign templates.

Use “Filter tags” option to sync only Cellosign templates that includes specific tags. If left blank, all templates within your project will be synced.

Note: Sync occurs when saving a template.

Connection test pane

This pane serves two debug functions:

  1. Make sure objects are pulled and refreshed. Refresh occurs automatically every 24 hours, however if you have applied changes in your Salesforce schema (such as adding tables and columns) click on “Pull instance schema” for fetching Salesforce objects so they can become visible to business process consumers, such as template connector.
  2. Dump requests that were made from Salesforce to Cellosign. To find the request ID click Transactions board, lookup your transaction, expand the result. The request ID is displayed at “Request Parameters” pane. Copy and paste the “Request ID” into “Connection test” pane and click “Execute request”. As a result a JSON file will be dumped to your browser with the full body request

Build Salesforce connected business process

What we want to do here is build a template that can be initiated from Salesforce to Cellosign that inject Salesforce AccountID. Cellosign connector will:

  1. Get the request
  2. Fetch Account name and website address from Salesforce
  3. Post the invitation to the client
  4. Get updated data back [On client submit] and update Salesforce with: Updated data and signed document

Build template

  1. Create new template, name it “Update account”
  2. Drag and drop 3 Text fields and name it “Account ID”, “Account name” and “Website”
  3. Also add signature field
  4. Click on Template integrations and “Connector” and click “Add Preset Connector”. Follow this guide to set it up. Eventually your PRESET connector should look as in the image below. Make sure to save the template and go to your Salesforce instance to connect it [next step].

Next we will build connector to update Account name and website on submit. Add new connector on “Submit”

Next we will build connector to upload signed PDF and associate with it with account on submit. Add new connector on “Submit”.

Save the connectors and the template.

Connect Template to Salesforce

In your Salesforce instance search for “blueprints” in top left search pane

Click on template that was created “Update Account”

Note: In case you don’t have “Description” or “Create Date” columns, simply click gear icon on the top row. Click “select fields to display” and add those to view.

Click the Blue print name link. This view display the blueprint ID, Name and related fields. Note that on “Related fields” there are two fields created by default.

  1. “Invitation recipient email or phone number”. Will be used to post the request to clients email or phone
  2. Fill form field <AccountNumber> from table <Account> column. Will be used for mapping field into action

Creating flow (trigger) in Salesforce

At the end of this stage we will have a flow in Salesforce that is getting Account ID and posting request to Cellosign including: Blue print, Account is and client email. Flow should look as in the image below

  1. Click on Gear icon at the top right corner and then “Setup”
  2. On quick find (top left) search “flows” and enter “flows” view
  3. Click “New flow” at top right corner
  4. select “Screen flow” and click “Create”

First we need to define flow variable that we can consume within the flow.

  1. On the left pane of flow view, click the left most icon “Toggle toolbox”
  2. Click “New resource” button”
  3. On the opened pane select “Variable”
  4. Insert “recordId” on “API Name”
  5. Select “Text” for “Date type”
  6. Check “Available for Input” at the bottom and click save

Next, we need to define single parameter and collection of parameters flow variables that can consume blueprints data. Use “cellosign__ProcessParameter apex-defined” type for both.

First we will create collections of parameters

On flow toolbox:

  1. Add new resource
  2. Select “Variable”
  3. Insert “varProcessParameters” on “API name”
  4. Select “Apex defined” on Data type
  5. Check “Allow multiple values”
  6. Select “cellosign__ProcessParameters” on “Apex class”
  7. Click “Done”

Carry out the same process for single parameter.

  1. Add new resource
  2. Select “Variable”
  3. Insert “varProcessParameter” on “API name” [Note: var name is singular]
  4. Select “Apex defined” on Data type
  5. Select “cellosign__ProcessParameters” on “Apex class”
  6. Click “Done”

Next. on flow diagram Click on “Add element” and Add “Get records”.

  1. Insert “Get SF Account data” to label
  2. Select “Account” on “Object” field
  3. On field, select “Id” to match Account ID
  4. On “Operator” pick “equals”
  5. On “Value” pick the variable “recordId” we just created
  6. Click “Done”

At this stage we need to connect the collection of parameters to Cellosign blueprints.

  1. On flow diagram Add “Assignment”
  2. On “Label” insert “Build Parameters”
  3. Now we need to add key/value pairs for the invitation and Account ID

First, we assign Key/Value pair to single parameter flow variable, and then add that variable to our parameters collection variable.

You can assign fixed values to parameter, or you can assign values from specific record field (see 3rd parameter assignment – we assign account name).

To add key/value pairs:

  1. On “Variable” add “varProcessParameter.Key” from the dropdown
  2. Set Operator as “Equal
  3. Set Field blueprint ID for invitation. [This should be copied from blueprints parameters page]
  4. On “Variable” add “varProcessParameter.Value” from the dropdown
  5. Set Operator as “Equal”
  6. Set Field from Account > phone number
  7. On “Variable” add “varProcessParameters” from the dropdown
  8. Set Operator as “Equal”
  9. Set Field “varProcessParameter” [Note: there’s no “s” at the end, for single]

Carry out the same procedure to add “Account ID”. Eventually, “Build parameters” pane should look like this:

Save the pane.

Next, add element “Action”.

  1. Blueprint ID – ID of blueprint you want to initiate a process for
  2. Cellosign API Service developer name. Type one of these: start_process, seal_process – start_process
  3. Parameters – your collection variable of process parameters – Run Immediate – (True/False) – will define to run action synchronously (True) or asynchronously (False).
  4. Click “Save”

At this stage you may add any conditions, logs, on screen display before flow ends.

Save the flow and enter

Connect to action button

Now we want to add a button to trigger a form submission to client. to do so follow these steps:

  1. On Salesforce app, search and select “Accounts” page
  2. Click gear icon on top right and select “Edit Object”
  3. On left pane, select “Buttons, links and actions”
  4. Click “New action”
  5. On “Action type” select “flow
  6. Select the flow we crated previously
  7. Update label “My update” and save

Next we need to display this button on account page, for whenever is clicked, form will be submitted.

  1. On “Account Object manager”, click “Page layouts” and then “Account layout”
  2. Locate the Action created “My update” on top pane and drag it to “Salesforce Mobile and Lightning Experience Actions”
  3. And click save

On account page you will find new button “My update”. Make sure you have mobile phone number on Account details and click “My update” to submit a form

Now you should be receiving SMS with a link to form. If all configured correctly, you should see Account name and Website on the form.

When form is submitted the data will be updated and PDF result is uploaded to Account related items.

Methods

Start

This API initiates a new session process. This method is described above in details

SEAL

Similar to Start API (above) this API generate a new session. The differences are:

  1. Use key word “seal_process” for activation
  2. Response: since SEAL does not include interactive form, it does not include URLs as interactive session does. Instead, it includes the following response:
{
    "id": "djE6czp0ZXN0ZW5nOm1lcHlMR3R4cmI=",
    "blueprint_id": "djE6dDp0ZXN0ZW5nOjQ3NzAwZTUxMjkzODQ2ZWJiZjQ4NmU3ZGU4ZmEzYTUy",
    "document": {
        "id": "mepyLGtxrb",
        "hash": "942adb09cda9d9602e4784513b14cff2"
    }
}
idEncoded unique id. Can be use later for delete API
blueprint_idTemplate blueprint used for the process
Document idClear text for unique id
Document hashPF Document hash. Hash can be used to verify the content when callback occurs

Delete

This API revoke a session. Follow these steps to configure a delete session:

  1. In flow menu, add an APEX action, Search for “Delete Cellosign Process” action type
  2. Add “delete_process” to first input value
  3. Add process id to revoke. Process id is received on response to “start_process”
  4. Add logic as needed and save
  5. On success, process will return HTTP 201 status code, Otherwise will return 4xx or 5xx response

Limitations and known issues

  1. Currently Cellosign package for Salesforce include session level API. That is workflow, BPM process types cannot be created via this package
  2. Field level blueprints includes only fields that are mapped for inquiry through the connector
  3. Create new session currently doe’s not include specific address for OTP. However the address included with the blueprint can be used for both the invitation and the OTP. This feature will be included in future versions

Data types specifications

as asdasd as

Salesforce datatypeHandling in Cellosign
Pick listPicklist values are fetched using toLabel() api and not the API value
Date and date timeDate and datetime objects in Salesforce are stored in ISO format. Using the connector you have the option to format the value to your requirement
Time
Numbers
Currency
Boolean
Text and long texts

Process Logs

Cellosign installed package includes full log for APEX action that includes: Request URL, Body, response and time stamp for initiate and response. To view logs, type “Create Process Logs” is Salesforce quick search.

Additional data

Following are object classes with Cellosign application that can be consumed for implementation.

Class ProcessRequest

LabelNametyperequire
Blueprint IdblueprintIdStringTrue
ParametersparamsList of ProcessParameterTrue
Run ImmediaterunImmediateBooleanTrue
Cellosign Api service developer nameCelloSignMdtNameStringtrue

Class ProcessParameter

LabelNametyperequire
KeyKeyStringTrue
ValueValueStringTrue

Class ProcessResponse

LabelNametype
ResultsresItemsList of ProcessResponseItem

Class ProcessResponseItem:

LabelDescriptiontype
isSuccessProcess initiation statusBoolean
errorMessageerror message if failedString
processIdUnique process ID in cellosignString
formIdThis is reference to Token generated in CellosignString
clientUrlUrl that was submitted to clientString

Leave a Comment

Share this Doc

Salesforce

Or copy link

CONTENTS