DocumentationCenterpoint for SalesforceSmartforms

Smartforms

With Smartforms in Centerpoint for Salesforce you send a Smartform (also called a dialog) from a Salesforce record, follow its steps and use the answers. The Smartforms themselves are designed in SmartForms Studio. This page covers the Salesforce side.

An administrator adds the Smartform components to the record pages, see Add components to pages. The Contacts list in the send dialog is filled on Account, Contact, Case, Opportunity, Event and Task records. On other records, you choose participants from Users.

Send a Smartform

  1. Open the record you want to send from, for example an account.
  2. In the Smartforms card, find the form. The columns are SmartForm, Process, SObject and Data Template. The card shows the forms that are meant for this type of record. Tick Show all Smartforms to see the forms for other record types as well.
  3. Click the name of the form. The dialog Select SmartForm Participants opens.
  4. Keep Send SMS and Send Email ticked as you need. Both are ticked at first, and they decide how each participant is told about the form. Set them before you choose participants, because changing them clears the participants you chose.
  5. Choose the participants. A form has one tab for each party that the form defines, for example one for each signer. In each tab, choose from one of two lists:
    • Contacts: the contacts of the record’s account. On a contact record, the contact itself.
    • Users: Salesforce users. Type a name and the matches appear as you type. Type * to list up to ten users.
  6. Check the participants in the footer of the dialog, then click Next. Next is available when every tab has a participant and Send SMS or Send Email is ticked.
  7. If the form needs a secret, enter it in Enter Smartform secret under Create Secret. Use Prev to go back.
  8. Click Send. Salesforce confirms with Smartform created successfully!

If the card stays empty or sending fails with a sign-in error, see Troubleshooting.

How the list is built

The package asks Centerpoint for the Smartforms your user may send and remembers them in Salesforce as Smartform Template records. The tag SOBJECT=<object> on a Smartform decides which type of record it belongs to, for example SOBJECT=Account. A Smartform belongs to one object, so write one API name exactly as Salesforce spells it. The tag DATATEMPLATE=<name> names the data template for the form. Add the tags to the Smartform in SmartForms Studio. They are the same tags that letter templates use, see Configuration.

Follow a Smartform

Two lists on the record show the forms that were sent from it.

ListWhat it shows
Smartforms In ProcessForms that are not complete yet
Archived SmartformsForms that are complete or signed

Both lists have the columns Template (a link that opens the form), Recipients, Senders, Step Progress, Step Name and Created Date. Archived Smartforms also shows a status icon. Use Refresh to update a list.

Doc Gen reports each change back to Salesforce through a webhook, so the lists stay up to date without any action from you. The Step Name starts as Sent and changes to the name of each step as it is completed. A form that is completed in one go shows Complete, and a signed form shows Signed. A form moves to Archived Smartforms when it is complete or signed.

See the files

The Smartform Attachments component lists the files that a person uploaded in a form. It has the columns Filename and Property Name, and a Preview and a Download button for each file. If the form has no files, it shows No files available. On the record page, set the property API Name of Field to the field that holds the form’s id, for example Case.SmfId__c.

Values sent to the form

When you send a form, the package sends these values to it:

  • The fields of the record, with each field name as the value name.
  • Details about the user who sends the form, and about the system.
  • The child records of the form’s data template, as the rows of the form’s tables.
  • The values you add with a Data Table Value record, described next.

Data Table Value

A Data Table Value record adds named values and table values to one Smartform. Its Data Table Value Name must be the exact name of the Smartform. It has two fields:

  • Field Mapping: one line for each value, written as source :: name. Salesforce reads the value that has the key source from the record and sends it as name. If the record has no such key, the text source itself is sent.
  • Extra Values: one line for each value, written as value :: name. The package sends value under the name name as it is.

Edit Field Mapping with the CP Data Table Value Mapping component on the Data Table Value record page. It shows the Record, the Data template and the Primary SObject, and a list of the values you can use. Use Filter rows to find a value, add it to Mapped fields with the plus button, and fill in the Data table name and Value key for it. The values are written as sourceKey :: dataTableName lines. Click Save.

Smartforms started outside Salesforce

A Smartform that is started outside Salesforce can still report back. Copy the address from the Smartforms Webhook URL tab of The Configuration screen and give it to the system that starts the form. When the form finishes, Salesforce creates or updates a Smartform webhook record. The record’s org id must match your org, otherwise Salesforce ignores the message.

To act on the answers, use Smartform field mapping, or the events and calls in the Smartforms Apex API.

Details

  • The webhook needs the public site described in Install and connect.
  • The Smartforms tabs in the Metaforce Demo app, for example Smart Forms Webhooks and Smartform Templates, show the records behind these lists.