DocumentationCenterpoint for SalesforceConfiguration reference

Configuration

Centerpoint for Salesforce is highly configurable. Most configurations are done using custom settings and custom labels. There are a few custom metadata and named credentials as well.

This page is the reference for every setting, custom metadata record and template keyword. To set the package up for the first time, follow Install and connect. Several settings are also edited on The Configuration screen.

Environments

Metaforce Software Environment

Static setup of the web addresses of Metaforce’s Editor, Smartforms, Workflow and Centerpoint services. This is custom metadata that ships with the package, so you do not change it. There are two configurations:

Metaforce Software Environment NameDescription
ProductionAddresses for production features
StagingAddresses for testing new features before available in production

Each configuration holds four addresses: Centerpoint Url, Smartforms Url, Webeditor Url and Workflow Url. The software environment fields in Metaforce Customer Environment choose which configuration each service uses.

Metaforce Customer Environment

Selects the software environments, the schemas, the folder name, the callout log and the sign-in details. The package reads only the record named SelectedEnvironment, so keep that exact name. The default settings create it for you.

FieldDescription
Webeditor Customer EnvironmentThe current Centerpoint “database” environment. One of Development, Test, Test1, Test2, Test3, Test4, Test5, IntegrationTest, AcceptanceTest or Production. In a Salesforce sandbox, Production is replaced by Development.
Webeditor Software EnvironmentThe Metaforce Editor software to use: Production or Staging.
Webeditor Software VersionLeave blank for the standard Editor. Enter a version, for example V4, to use that version of the Editor instead.
Smartforms Software EnvironmentThe Metaforce Smartforms software to use: Production or Staging.
Workflow Software EnvironmentThe Metaforce Workflow software to use: Production or Staging.
Viewpoint SchemaThe database schema to be used in Viewpoint (Centerpoint document archive). Default centerpoint.
Dynamo FolderName of folder in Dynamo (Centerpoint document queue). Default DYNAMO.
Callout Log EnabledTurn the callout log on or off. Logs all callouts and responses, good for reviewing data sent back and forth between Salesforce and Centerpoint. Logging only happens when Callout Timeout (ms) has a value.
Callout Log Include HeadersWhen the callout log is on, also store the HTTP headers of each request and response. Off by default.
Callout Timeout (ms)Number of milliseconds for the timeout when performing callouts to Centerpoint from Salesforce. Default 60000.
Additional API ScopesOptional extra scopes for the Editor sign-in, separated by spaces. They are added after the standard scope api.external.
Token Endpoint PathPath of the sign-in server’s token address. Leave blank unless you are told otherwise. Blank means /connect/token.
Authorize Endpoint PathPath of the sign-in server’s authorize address. Leave blank unless you are told otherwise. Blank means /connect/authorize.

The two endpoint path fields exist so that an org can be pointed at a sign-in server with a different layout without a new package version. Some sign-in servers use /protocol/openid-connect/token and /protocol/openid-connect/auth instead. Doxis tells you when your org needs them. A path without a leading slash gets one added.

Note: A Production Webeditor Customer Environment is never used in a Salesforce sandbox. The editor integration works against Development there, whatever the field says. The Smartforms and Workflow software environments are not affected.

For the Callout Log and what to look for in it, see Troubleshooting.

External Data Service

Each document template has the option of using a customer defined data service. Multiple customer data services can be defined. There is one default (standard) data service defined which uses the “Template SObject Map” configuration for retrieving Salesforce records. See separate section about the “Template SObject Map” configuration.

A custom data service could typically not only retrieve data from Salesforce records, but also retrieve data from one or more back-end systems using webservice callouts. This allows the customer to retrieve data from a more complex system landscape.

To add a custom data service, you have to implement an Apex interface provided by the Centerpoint for Salesforce application.

The following needs to be specified for each data service:

FieldDescription
LabelName of the data service
Apex Class NameCustomer’s Apex class name that implements the interface.
DefaultCheckbox, if checked marks this as the default data service

Identifying Field

This setting has multiple features:

  • Recipient Identifier: It states what field on Account, Contact, PersonAccount, Lead, or Case should be used as the recipient identifier (e.g., the attributes SSN or VAT in the <ReceiverAddress/> tag in XML data sent to Metaforce). You can use relational fields as well, like Contact.Name from a Case record.

  • Defining Recipients:

    • Each SObject (Salesforce Object) can have one or more lines to define recipients.
    • Account: Typically has one line for the VAT attribute.
    • Contact: Typically has one line for the SSN attribute.
    • Case: Often has two lines, one for the SSN attribute (using the related Contact) and one for the VAT attribute (using the related Account).
    • If multiple lines are used, ensure they have the same SObject value, and mark one as the default (checked checkbox) to define the recipient for printing batch jobs.
  • Additional Settings:

    • States the address fields.
    • Specifies if the country picklist is enabled.
    • Indicates if a task should be created on the record for each document sent.

The following needs to be specified for each line:

LabelName of the line, set it to the same as the SObject field
NameAPI name of the line, must be unique, set it to the name of the SObject concatenated with the name of the related SObject, for instance CaseAcc and CaseCon.
DefaultCheck this box if this is the default config for an object having multiple receiver types, like Case has Contact and Account.
SObjectSObject name (API name) for which this receiver configuration is used for. Account usually has one line; Case usually has two lines.
Lookup FieldName of the lookup field to check for, if a related record exists or not. In case it exists, the receiver information can be retrieved from that record. Typically used for SObject Case, where one line contains ContactId, and the other line contains AccountId.
SSN FieldName of field containing SSN (Social Security Number), can be a fieldname on the Contact for SObject Contact, typically SSN__c. For SObject Case it can be a fieldname of the related Contact’s field, typically Contact.SSN__c.
VAT FieldName of the field containing VAT (Value Added Tax number, or organization number, company registration number), can be a fieldname on the Account for SObject Account, typically “AccountNumber”. For SObject Case it can be a fieldname of the related Account’s field, typically Account. AccountNumber.
Receiver Name FieldName of field containing the name of the receiver to send the information to. If SObject is Contact then “Name” is typically used. If SObject is Case the “Contact.Name” is typically used.
Email FieldName of field containing the email address to send the information to. If the information is on a related record, like the Contact that is related from a Case, use full path from Case to the field like this Contact.Email.
Street FieldName of field containing the street address to send the information to. If the information is on a related record, like the Account that is related from a Case, use full path from Case to the field like this Account.BillingStreet.
Postage Number FieldName of field containing the postage number (zip code) to send the information to. If the information is on a related record, like the Contact that is related from a Case, use full path from Case to the field like this Contact.MailingPostalCode.
City FieldName of field containing the city to send the information to. If the information is on a related record, like the Account that is related from a Case, use full path from Case to the field like this Account.BillingCity.
Country FieldName of field containing the country to send the information to. If the information is on a related record, like the Contact that is related from a Case, use full path from Case to the field like this Contact.MailingCountry.
Country PicklistCheck this box if country picklists are enabled in your org and country field contains 2-char country code.
Create TaskCheck this box if task shall be created on the record for this SObject when document is created.

Metaforce Authentication

This custom setting is not part of a configuration for the customer to change. It is fully automatic and solely used by the Centerpoint for Salesforce application internally.

It holds the Smartforms client that is created once for your org, the first time someone logs in successfully from the Metaforce Application tab. The package stores only the client id, the client secret and the client name. It asks for access tokens when it needs them and does not store them here.

FieldDescription
Client IdAutomatically generated client id for use with the Smartforms API in Centerpoint after the first successful login.
Client SecretAutomatically generated client secret for use with the Smartforms API in Centerpoint after the first successful login.
Client NameAutomatically generated client name. It is the name of your Salesforce org with spaces replaced by underscores, followed by the org id.

The setting also contains token fields from earlier package versions. They are not used.

Metaforce Generated PDF

Controls whether a generated PDF is also saved as a Salesforce File on the record. It is off by default, so documents then live only in the archive. This custom setting is of hierarchy type, so you can set it for the whole org, for profiles or for single users.

FieldDescription
Enable store generated PDF as FileCheck this to allow saving generated PDFs as Salesforce Files. Default off.
Generated PDF storage modePromptUser shows a checkbox so the user decides each time. AlwaysStore saves the PDF every time and hides the checkbox.

With PromptUser, the user sees the checkbox Save the generated PDF as a File linked to this record when creating or editing a document. If the file cannot be saved, the document is still created and the user sees Document was created, but saving to Salesforce Files failed. See Letters and documents.

Metaforce Bulk Send

Manages the ability for the company, profile or user to bulk send documents. There is a custom button Batch Distribute Document that can be used in a Contact list view to send an on demand (no editor) letter to multiple recipients (contacts) in a bulkified way. This setting enables the ability to perform such a bulk send.

A matching button, Person Batch Distribute Document, exists for person accounts. The steps are in Batch sending.

This custom setting is of hierarchy type, so you can set it for the whole org, for profiles or for single users. When no setting exists at all, bulk sending is allowed.

FieldDescription
AllowedCheck this to enable bulk sending of a single on demand letter to multiple recipients.

Metaforce Classification

This custom setting works in combination with custom permissions. For each custom permission representing a document classification there must be a corresponding Metaforce Classification setting having the exact same name, e.g. this setting represents the mapping between these. By assigning a custom permission to a user or a group of users, they will be given access to those templates having that classification keyword, also access preview waiting documents in Dynamo as well as viewing documents in Viewpoint.

See also separate section about Metaforce Template Keywords. These are the fields on this custom setting:

FieldDescription
Custom Permission NameName of corresponding custom permission, must be unique.
DescriptionDescriptive text about this security level (document classification).

Metaforce Dynamo Fields

Metaforce Dynamo field names, a list of all fields from Dynamo database table columns. This setting is automatically populated and, for Centerpoint for Salesforce application internal use only, not for customer customization or configuration.

FieldDescription
NameThe column name from the Dynamo database, typically contains (JOBID, DOCID, DISTRIBUTION, XMLDATA, TEMPLATE, etc).
TypeThe column type from the Dynamo database (long, str, datetime, xml).

Metaforce Error Configuration

Settings for managing informative/warning/error messages for Salesforce users. How detailed and technical they shall be in the UI. All errors shown in the UI uses custom labels to support different languages. This custom setting is of hierarchy type, this means you can have a setting for the whole org, specific setting for different profiles, or specific setting for different users. Typically, normal users do not have the developer level enabled, but system admins have. If logging is enabled, full detail errors will be logged into a custom object, despite if the running user had developer level enabled or not.

FieldDescription
DeveloperLevelCheck this to get developer detailed low level informative, warning and error messages.
Error Logging EnabledCheck this box to enable full detail errors logging in custom object. This is great for System Administrators to monitor possible errors occurring in the organization.

Metaforce Fixed Text

Used by Metaforce templates to represent fixed texts. For instance phone number, www and visiting address for the company, opening hours, bank account details etc. If you want new opening ours to be present on all generated documents from now on, just change this setting and all templates using this fixed text will render the change in the documents produced.

FieldDescription
NameThe name of the fixed text. Will be present as an attribute name in the resulting XML sent to Centerpoint API.
LabelThe contents of the fixed text. Will be present as an attribute value in the resulting XML sent to Centerpoint API.

Metaforce Metadata Field

This setting specifies Viewpoint and Dynamo document listing shall be visualized in the Salesforce UI when using the Centerpoint for Salesforce pre-built lightning web components on the page layout. It specifies the columns mapping of Metaforce metadata field names, respective custom labels, column order, column type and visibility. Each line in this setting represents a column in the presentation (a list view in the lwc).

The fields used in this custom setting are the following:

FieldDescription
Metaforce DatabaseDefines for what database the metadata field is displayed. Valid values are: “Viewpoint” or “Dynamo”.
NameA unique name, typically named SearchD1..D10 for Dynamo, and Search1..10 for Viewpoint.
LabelA unique label, typically named Search D1..D10 for Dynamo, and Search 1..10 for Viewpoint.
Custom Label NameName of the corresponding custom label to show as the heading for this column. A standard value is specified in English. Add your own language translations to make the headings match the user’s language selection.
Metaforce Schema Field NameThe name of the schema field name, see Dynamo field names in the section about “Metaforce Dynamo Fields” above.
Column OrderIn what order the column shall be presented, left to right. Use 1,2,3 etc. 1 = leftmost, 2 = right of leftmost, etc.
Show ColumnIf checked show column, if unchecked do not show column in document list.
Column TypeType of column, typically text, or click. text will just show the metadata as text. click will show the metadata as a clickable link, when clicked on show a preview of the document in Dynamo or show the document in Viewpoint.
Column WidthColumn width in pixels. If specified it will set the initalWidth attribute for the column to the specified amount of pixels.

Metaforce Package Information

This setting is not specified or configured by the customer. It is an internal setting automatically created when the package is installed or upgraded, and it is used by Centerpoint for Salesforce to speed up the creation of references and web urls.

FieldDescription
NamespacePackage’s namespace without the trailing double underscores __.
Example: mfwe. This field is automatically set when the package is installed or upgraded.
NamespacePrefixPackage’s namespace with __ added at the end.
Example: mfwe__. This field is automatically set when the package is installed or upgraded.

Metaforce Print Batch Control

This setting contains the Metaforce print batch job controlling fields. It enables or disables the Centerpoint for Salesforce print batch job feature of automatically adjust the batch size of the job resulting in more efficient batch job processing. It automatically adjusts batch size based on actual consumed SOQL queries and consumed web service callouts. This control dynamically adapt batch size during execution, enhancing performance and avoiding limits.

FieldDescription
Auto Batch SizeCheck this setting to automatic control batch size adjustment based on batch job’s actual SOQL queries and web service call outs. Uncheck not to use this feature.

Metaforce Template Cache Ctrl

This setting manage the Metaforce cache control of templates. It can cache all templates with all keywords for much quicker rendering the list of available templates in the template selector. The cache max age can also be specified.

FieldDescription
Template Cache EnabledCheck this to enable use of template cache.
Template Cache Reload Interval SecondsAfter this amount of seconds the template cache will be refreshed (updated using web service call)
Default value is 300 seconds = 300/60 = 5 minutes. This can be set to 5 seconds during template development to quickly get fresh information from the template in Centerpoint during development.
Template Reloaded TimeDate and time when templates was last reloaded. Empty this field to force a reload of the cache from Centerpoint.

Metaforce UI Config

In case you need to have a custom document viewer rather than using the default viewpoint document viewer. Defines field name and URL for external document viewer. The field you have to setup is the following:

FieldDescription
LabelShall be “View Settings”. The package finds the setting by this label.
NameAny unique name. The package does not look at it.
Use External ViewerCheck this if external viewer is to be used. Uncheck if default viewer shall be used.
External viewer URLExternal viewer URL. The URL with a variable to be replaced by a Metaforce field value from document record.
Variable syntax for the unique id variable is: {$UniqueId} Example: https://myserver.domain.com/document/view/{$UniqueId}
Document Identifier FieldThe name of the Metaforce schema field that uniquely identifies a document. This value will replace the {$UniqueId} in the External viewer URL.

Webeditor Authentication

This setting contains the authentication access token from Centerpoint login through the API. It is not configured by the customer, it is automatically set internally by the Centerpoint for Salesforce application. The following fields are used:

FieldDescription
Access Token 1 .. 6Access token received from Centerpoint part 1 .. 6
Token TypeAccess token type received from Centerpoint, typically “Bearer”.
Expires AtDate and time when the access token will expire.

Template SObject Map

This setting controls which Salesforce records and fields are sent as XML data to a template, as a data template. You normally build data templates on the Template SObject Mapping tab of The Configuration screen, see Data templates. The tab edits this same setting, so use whichever you prefer. A data template consists of several rows, one for each record, lookup or child:

FieldDescription
LabelUnique name of the mapping, usually a descriptive but short name followed by the “Order” number (from field below). Can contain spaces, brackets etc. If data is defined by multiple lines, use the same label/name but with different Order number. Example: Account With Contacts 1, Account With Contacts 2.
NameSame as Label above but with all spaces replaced with “_”, no special characters or brackets are allowed. Remember to have the trailing Order number. Example: Account_With_Contacts_1, Account_With_Contacts_2.
Order1 = Current record (must be the first line = 1)
2, 3, … = Related records (lookup or child)
XML data will be created in the order stated by this field (in ascending order).
Metaforce Template IdMetaforce Id of the template (template API name) for which data shall be retrieved for this specific template. If multiple lines define the data (current record + child records or lookup records) then it is important that all these lines contain the exact same template name.
Data Template NameName of the data template these data specifications represent. Can be used from any template in Metaforce using keyword “DataTemplate=name_of_template” where name_of_template represents the content of this field. This is a very efficient method to use where multiple templates use the same data structure. Data template must be unique and present on all lines defining the data template data structure.
SObject NameName of SObject (API name) in Salesforce being the current record, the related record (lookup) or child record.
FilterWill be used as a SOQL WHERE clause when querying child records.
Example: “ExitDate__c = NULL” or “IsClosed = TRUE”.
Parent Field NameName of parent field name (API name) on the child record relating the child (using lookup) to its parent (the current record).
XML Node NameName of XML node representing this record and SObject.
XML Parent Node NameParent XML node name. Used for related records if a parent XML node shall be inserted. For instance, a parent node name can be “Cases” on the definition of Case as related child records. The resulting XML will then be: <Cases> <Case xxx></Case> <Case yyy></Case> </Cases>.
Field PrefixA text to prefix each attribute in the resulting XML node. Each Salesforce field name will be prepended with this text. If this field contains “My” then the Account field Name will be “MyName” as attribute in the resulting XML-node.
Relation TypeType of relationship:
- Record = Current record
- Child = Child record to current record
- Lookup = Record following a lookup from current record to a related record of interest
- ChildLookup = Record following a lookup from a child record. Its fields are added to the child node, with the lookup’s XML node name as prefix.
Lookup Field NameName of lookup field on current record to the related record of interest.

Metaforce Template Keywords

The following keywords on templates are used by Centerpoint for Salesforce:

KeywordDescription
USERSELECTABLEjust what it sounds as. The template shall be available for selection from the template selector in the UI. If not, the template will not show at all.
Example: USERSELECTABLE
CLASSIFICATIONmust match the API-name of the custom permission that you have assigned to a user in order for them to be able to access a specific document class. The value is compared with the names of the Metaforce Classification settings. A template with this keyword is hidden from users who do not have the matching permission, and from everyone when no Metaforce Classification setting has that name.
Example: CLASSIFICATION=HR
SOBJECTmust contain the API name of the SObject the template shall be able to be selected from, e.g. on what record page the template selector is placed on. If SOBJECT=Account is used on a template, that template will only be visible and selectable from the account record page. You can list several objects, separated by commas: SOBJECT=Account,Contact. The Show all templates property of the template selector ignores this keyword. Smartforms read this keyword too, but a Smartform takes exactly one object, written with its API name, for example SOBJECT=Account. See Smartforms.
FIELDVALUESa comma separated list of values that the specified field (in the config design attribute of the template selector must match if the template shall be selectable or not. Used when you want to filter the set of templates visible and selectable based on field value(s) on the current record. Great if you have 100 templates on Case but using the CaseType field for filtering the list of templates down to maybe 10 templates for the matching CaseType field value.
Example: FIELDVALUES=HR,Request,Fault
DATASOURCEspecify what data source (data service) the template shall use to retrieve data from. See custom setting External Data Service.
Example: DATASOURCE=MY_APEX_SOURCE
DATATEMPLATEspecifies the name of the data template to use for retrieving current record and and related objects, child objects etc. See custom setting Template SObject Map. Smartforms read this keyword too.
Example: DATATEMPLATE=AccountWithContacts
RECEIVERINTEMPLATEspecifies the user is not able to select recipient if multiple recipients exist. The receiver is defined in the template. See custom settings Identifying Field.