DocumentationCenterpoint for SalesforceInstall and connect

Install and connect

This page takes a Salesforce administrator from nothing to a working connection between a Salesforce org and Doxis Doc Gen. You do it once per org. It is about Centerpoint for Salesforce, the managed package, and not about SmartForms Studio or Pages.

Before you start

You need:

  • A Salesforce administrator.
  • A Centerpoint company and a Centerpoint user who can sign in.
  • The package install link and its password, which Doxis gives you. Package versions are installed from a link of the form /packaging/installPackage.apexp?p0=<package version id> added to your Salesforce URL.

The package ships with the Named Credentials and Remote Site Settings it needs to reach Doc Gen, so you do not add the Doc Gen addresses yourself.

1. Install the package

  1. Open the install link in the Salesforce org you want to connect and enter the package password.
  2. Choose Install for Admins Only or Install for All Users, and finish the installation.
  3. The user who installed the package receives an e-mail with the subject Package install successful! The same e-mail is sent after an upgrade.

The installation also records the package namespace in Metaforce Package Information. You do not edit that setting.

2. Give users access

  1. In Setup, open Permission Sets and assign Metaforce Access to every user who will use the package. It gives access to the components, the tabs, the bulk send buttons and the settings.
  2. Open the Metaforce Demo app from the app launcher, or add the Metaforce Application tab to an app you already use. The Metaforce Demo app also holds the admin tabs described in Troubleshooting.

3. Create the public site

Doc Gen reports back to Salesforce through a public site. Smartform status, completed forms, letters finished in the editor and the sign-in described below all use it.

  1. In Setup, open Sites and create a site named exactly webhook.
  2. Make the site active and give it a Salesforce Sites domain.
  3. Assign the permission set Metaforce Webhook Access to the site’s guest user. It lets the site create and read the Smartform records and publish the platform events.

If no site with the name webhook exists, the package shows the text MISSING SITE where it needs the site address, and the sign-in in step 7 cannot finish.

4. Check the connection settings

The package includes these items. Check that they are in place:

ItemNameUsed for
Named CredentialMetaforce AuthSign-in to the Production software environment
Named CredentialMetaforce Auth StageSign-in to the Staging software environment
Named CredentialCenterpointCalls to Centerpoint
Remote Site SettingsEleven entries for Production and StagingAllow Salesforce to call Doc Gen

The editor integration signs in to Doc Gen with a client id and a client secret, which Doxis gives you for your company. It reads them from the user name and password of the Metaforce Auth named credential (Metaforce Auth Stage for the Staging software environment). The package ships these named credentials without authentication, so enter the values yourself:

  1. In Setup, open Named Credentials and edit Metaforce Auth.
  2. Change the authentication protocol to password authentication.
  3. Enter the client id as the user name and the client secret as the password, and save.

If the editor cannot sign in, the Callout Log shows the response from the sign-in call.

5. Create the default settings

  1. Open the Metaforce Application tab. The Metaforce Configuration card opens on the Initial Setup tab.
  2. Click Delete settings, then click Create default settings. Do this only the first time. It overwrites all settings with the defaults.
  3. Read the Status line above the buttons. It shows the result of each action.

The Configuration screen lists what the defaults contain.

6. Choose the environments

Open Setup, then Custom Settings, then Metaforce Customer Environment, and open Manage. The default settings create one record named SelectedEnvironment. The package reads only that record, so keep the name exactly.

Set at least:

  • Webeditor Customer Environment, the Centerpoint environment this org works against, for example Test or Production.
  • Webeditor Software Environment, Smartforms Software Environment and Workflow Software Environment, which choose between Production and Staging.

Every field is described in Configuration.

Note: In a Salesforce sandbox, the editor integration never uses a Production Webeditor Customer Environment. It works against Development instead, so letters created in a sandbox do not reach your production environment. This rule does not change the Smartforms or Workflow software environments.

7. Log in

  1. On the Metaforce Application tab, click Log in.
  2. A pop-up window opens (960 by 550 pixels) with the Centerpoint sign-in. Sign in with your Centerpoint user.
  3. When the sign-in works, the pop-up shows a short success page and closes itself. If it fails, the page shows the error text instead. Check the Callout Log for the details.

The first successful sign-in also creates the Smartforms client for your org in Centerpoint. Its name is your org name, with spaces replaced by underscores, followed by the org id. The package stores the client id, client secret and client name in Metaforce Authentication, and asks for a Smartforms access token whenever it needs one. That token is kept only for the current request and is not stored.

Click Open to open Centerpoint in a new browser tab.

8. Find the webhook address

If a Smartform is started outside Salesforce and has to report back, Doc Gen needs your org’s webhook address. Open the Smartforms Webhook URL tab on the Metaforce Configuration card and copy the address.

Upgrades and languages

  • Upgrades keep your settings. The Token Endpoint Path, Authorize Endpoint Path and Additional API Scopes fields are blank after an upgrade, which gives the same sign-in addresses as before.
  • Doxis tells you if your org needs different values for the sign-in paths. They are described in Configuration.
  • Labels and messages come in English and Swedish. Add other languages with the Salesforce Translation Workbench. A few pages are in Swedish only, see Batch sending.

Next steps