דלגו לתוכן

Start processes from Salesforce

תוכן זה אינו זמין עדיין בשפה שלך.

The Cellosign package for Salesforce (“Cellosign Integration”) lets Salesforce start Cellosign transactions. A Salesforce flow, for example behind a button on the Account page, sends a form to the client, creates a sealed document without a form, or revokes a transaction that it started. Cellosign puts its templates in Salesforce as blueprints, so the flow knows which templates exist and which values each one needs.

You need:

  • a Salesforce connection in the Cellosign project, with the wizard finished;
  • the installation link of the package, which you get from Cellosign support;
  • a Cellosign user whose access token the package uses, usually a service user with a role in the project that may create transactions.
  1. Open the installation link in the browser where you’re logged in to Salesforce as an administrator.
  2. Select who can use the package, for example Install for All Users, select the acknowledgement for a non-Salesforce application, and click Install.
  3. Select Yes, grant access to these third-party web sites, and click Continue.
  4. Wait until “Installation Complete!” appears, and click Done. It can take a few minutes.

The Salesforce package installation page for Cellosign Integration, with Install for All Users selected

The Approve Third-Party Access dialog of the package installation

  1. In Salesforce Setup, search for Custom Settings, and open it.
  2. Click Cellosign Instance, click Manage, and then click New.
  3. Fill in the settings below, and click Save.

The Cellosign Instance custom setting with the New button

Edit Cellosign Instance with API Token, AuthorizationType, Instance URL and Timeout

Setting What to enter
API Token The access token of the Cellosign user. See Access token. When you refresh the token in Cellosign, enter the new one here.
AuthorizationType Bearer Token
Instance URL The address of your Cellosign environment, without / at the end, for example https://cellosign.example.com.
Timeout How long the package waits for Cellosign, in milliseconds. Enter 30,000 for 30 seconds.

In Cellosign, turn on Synchronization in the connection preferences of the Salesforce connection, and save the templates you want to use. Each saved template gets a blueprint in Salesforce, with the template’s name as its description.

To see them, search for Blueprints in the Salesforce app launcher. Click a blueprint to see its ID and its Related parameters. If the list doesn’t show the Description or Created Date columns, add them with Select Fields to Display (the gear icon of the list).

The Blueprints list in Salesforce with the Update Account blueprint

A blueprint has these parameters. The flow sends a value for each parameter it needs, with the parameter’s Parameter Id as the key:

Parameter Hint in Salesforce What it’s for
Address for invitation Invitation recipient email or phone number The email address or mobile number that the form is sent to.
OTP destination otp address for recipient, email or phone number Where the one-time code is sent, when the template requires one.
A parameter for each field in a query condition Fill form field <field> from table <object> column <column> Created for each query condition of an active PRESET Salesforce connector of the template that compares with a form field. The value fills the form field before the connector looks up the record.
A parameter for each label in a query condition Label form <label> The same, for a query condition that compares with a label.

The Parameter Id of the invitation address is always djE6aW52aXRhdGlvbjo=, and that of the OTP destination is djE6b3RwX2Rlc3RpbmF0aW9uOg==.

A blueprint parameter in Salesforce: the Fill form field AccountNumber from table Account column Id hint and its Parameter Id

For the PRESET connector, see Connect a template to Salesforce.

This example sends the Cellosign template “Update Account” to the phone number of an account, from a button on the Account page. The template has a PRESET connector that looks up the account whose Id equals the form field AccountNumber, so its blueprint has the parameter “Fill form field <AccountNumber> from table <Account> column <Id>”.

A Salesforce screen flow: Get Account data, Build Parameters, Start Process, a Success decision and two screens

  1. In Salesforce Setup, search for Flows, click New Flow, select Screen Flow, and click Create.
  2. In the toolbox, click New Resource, and create these variables:
API Name Data Type Other settings
recordId Text Available for input. Salesforce fills it with the ID of the account the button is clicked on.
varProcessParameters Apex-Defined, Apex class cellosign__ProcessParameter Allow multiple values (collection). The list of parameters sent to Cellosign.
varProcessParameter Apex-Defined, Apex class cellosign__ProcessParameter One parameter, a key and a value.

The New Resource dialog for the recordId text variable, available for input

Add a Get Records element, with the label “Get SF Account data”, the object Account, and the condition Id Equals recordId.

The Get Records element for Account, filtered by Id equals recordId

Add an Assignment element with the label “Build Parameters”. For each parameter, add three rows:

  1. varProcessParameter > Key Equals the Parameter Id of the blueprint parameter, copied from the blueprint.
  2. varProcessParameter > Value Equals the value, a fixed text or a field of the record, for example the account’s phone number from “Get SF Account data”.
  3. varProcessParameters Add varProcessParameter.

In this example, add the invitation address (the account’s phone) and the account ID (the account’s Id). Add the OTP destination in the same way if the template needs it.

The Build Parameters assignment with the key, value and Add rows for two parameters

Add an Action element, search for Create Cellosign Process, and fill in:

Input What to enter
Blueprint Id The ID of the blueprint, copied from the blueprint.
Cellosign API Service developer name start_process to send the form, or seal_process to create a sealed document. See Methods.
Parameters varProcessParameters
Run Immediate? True to wait for Cellosign’s answer in the flow, False to send the request in the background.

The Create Cellosign Process Apex action with Blueprint Id, the API service developer name, Parameters and Run Immediate

You can add decisions, screens and logs after the action, for example a screen that shows whether the process started. Save and activate the flow.

  1. Open the Account object in the Object Manager, click Buttons, Links, and Actions, and click New Action.
  2. In Action Type, select Flow, select the flow, enter a label, for example “My update”, and save.
  3. Click Page Layouts, open the account layout, and drag the action to Salesforce Mobile and Lightning Experience Actions. Save the layout.

The Account page layout with the My update action under Salesforce Mobile and Lightning Experience Actions

On an account with a mobile number, click My update. The client gets an SMS with a link to the form, with the account’s details filled in by the PRESET connector. When the client submits the form, the SUBMIT connectors of the template write the data and the signed PDF back to the account.

start_process creates a transaction and sends the form to the invitation address. The answer includes the process ID, which you need to revoke the transaction, and the address of the form. See ProcessResponseItem.

seal_process creates a sealed document from the template without a form for the client to fill in. The answer has no form address. Instead, it includes the document:

{
"id": "<process ID>",
"blueprint_id": "<blueprint ID>",
"document": {
"id": "<document ID>",
"hash": "<document hash>"
}
}
Field What it is
id The encoded process ID, to use later to revoke it.
blueprint_id The blueprint that was used.
document.id The document ID, in plain text.
document.hash The hash of the PDF document. Use it to check the document when Cellosign calls you back.

Revokes a transaction that the flow started.

  1. In the flow, add an Action element, and search for Delete Cellosign Process.
  2. In Cellosign API Service developer name, enter delete_process.
  3. In Process Id, enter the process ID from the answer of start_process.
  4. Set Run Immediate?, and, if needed, Do update Status on Process Record to ‘revoked’?.
  5. Add the logic you need after the action, and save.

The Delete Cellosign Process Apex action with the developer name, Process Id and Run Immediate

The package logs each request to Cellosign, with the request address, the body, the answer and the time of the request and of the answer. To see the logs, search for Create Process Logs in Salesforce. To download a log record from Cellosign, use Salesforce request ID on the Connection tests tab.

  • The package starts single-form transactions. It can’t start workflows or BPMN processes.
  • A blueprint has parameters only for the query conditions of the template’s active PRESET Salesforce connectors, and for the invitation and OTP addresses. Other fields can’t be filled from the flow.
  • A blueprint is replaced each time its template is saved. Its blueprint ID and parameter IDs stay the same as long as the template and the field IDs don’t change, so your flows keep working.

These classes of the package can be used in flows and Apex code.

Label Name Type Required
Blueprint Id blueprintId String Yes
Parameters params List of ProcessParameter Yes
Run Immediate runImmediate Boolean Yes
Cellosign Api service developer name CelloSignMdtName String Yes
Label Name Type Required
Key Key String Yes
Value Value String Yes
Label Name Type
Results resItems List of ProcessResponseItem
Name What it is Type
isSuccess Whether the process started. Boolean
errorMessage The error message, if it failed. String
processId The ID of the process in Cellosign. String
formId The reference of the form in Cellosign. String
clientUrl The address of the form that was sent to the client. String