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.
Environments
Metaforce Software Environment
Static setup/configuration of the URLs to Metforce’s Editor API, Smartforms API and Centerpoint API. There are two configurations
| Metaforce Software Environment Name | Description |
|---|---|
| Production | URLs for production features |
| Staging | URLs for testing new features before available in production |
Metaforce Customer Environment
Configuration selected software environment, schemas, folder name, callout log etc. as below:
| Category | Description |
|---|---|
| Editor Customer Environment | The current Centerpoint “database” environment, for instance: (Development, Test or Production) |
| Editor Software Environment | The Metaforce Editor software version to use: (Staging or Production) |
| Smartforms Software Environment | The Metaforce Smartforms software to use: (Staging or Production) |
| Viewpoint Schema | The database schema to be used in Viewpoint (Centerpoint document archive) |
| Dynamo Folder | Name of folder in Dynamo (Centerpoint document queue) |
| Callout Log Enabled | Turn callout log on or off. Logs all callouts and responses, good for reviewing data sent back and forth between Salesforce and Centerpoint. |
| Callout Timeout (ms) | Number of milliseconds for the timeout when performing callouts to Centerpoint from Salesforce. |
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:
| Field | Description |
|---|---|
| Label | Name of the data service |
| Apex Class Name | Customer’s Apex class name that implements the interface. |
| Default | Checkbox, 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, orCaseshould be used as the recipient identifier (e.g., the attributesSSNorVATin the<ReceiverAddress/>tag in XML data sent to Metaforce). You can use relational fields as well, likeContact.Namefrom aCaserecord. -
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:
| Label | Name of the line, set it to the same as the SObject field |
|---|---|
| Name | API 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. |
| Default | Check this box if this is the default config for an object having multiple receiver types, like Case has Contact and Account. |
| SObject | SObject name (API name) for which this receiver configuration is used for. Account usually has one line; Case usually has two lines. |
| Lookup Field | Name 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 Field | Name 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 Field | Name 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 Field | Name 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 Field | Name 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 Field | Name 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 Field | Name 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.Email. |
| City Field | Name 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.City. |
| Country Field | Name 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.Country. |
| Country Picklist | Check this box if country picklists are enabled in your org and country field contains 2-char country code. |
| Create Task | Check 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.
Metaforce authentication details stored after authentication has been made from Salesforce to Centerpoint. It stores code, scope, token type, access token, refresh token and valid to datetime. Dynamically generated Centerpoint client id and client secret for Smartforms functionality.
| Field | Description |
|---|---|
| Access Token 1 .. 6 | Access token part 1 .. 6 |
| Refresh Token 1 .. 6 | Refresh token part 1 .. 6 |
| Client Id | Automatically generated client id for use with Smartforms API in Centerpoint after successful authentication. |
| Client Secret | Automatically generated client secret for use with Smartforms API in Centerpoint after successful authentication. |
| Client Name | Automatically generated client name for use with Smartforms API in Centerpoint. Typical value: Centerpoint_for_Salesforce_100D00000000xxxxXXX |
| Scope | The scope of the access token. |
| Token Type | The type of the access token. |
| Valid Until | Datetime until the access token is valid. |
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 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.
From a contact list view, select one or more contacts to send a letter to, then clicking the “Batch Distribute Document” button. A Visualforce page with lightning styling will be shown where the selected list of recipients will be shown and a dropdown selection for what template to use. Then clicking submit will create print orders for each recipient and finally the print job will be started.
| Field | Description |
|---|---|
| Allowed | Check 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:
| Field | Description |
|---|---|
| Custom Permission Name | Name of corresponding custom permission, must be unique. |
| Description | Descriptive 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 Salesfoprce application internal use only, not for customer customization or configuration.
| Field | Description |
|---|---|
| Name | The column name from the Dynamo database, typically contains (JOBID, DOCID, DISTRIBUTION, XMLDATA, TEMPLATE, etc). |
| Type | The 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.
| Field | Description |
|---|---|
| DeveloperLevel | Check this to get developer detailed low level informative, warning and error messages. |
| Error Logging Enabled | Check 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.
| Field | Description |
|---|---|
| Name | The name of the fixed text. Will be present as an attribute name in the resulting XML sent to Centerpoint API. |
| Label | The 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 Saleforce 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:
| Field | Description |
|---|---|
| Metaforce Database | Defines for what database the metadata field is displayed. Valid values are: “Viewpoint” or “Dynamo”. |
| Name | A unique name, typically named SearchD1..D10 for Dynamo, and Search1..10 for Viewpoint. |
| Label | A unique label, typically named Search D1..D10 for Dynamo, and Search 1..10 for Viewpoint. |
| Custom Label Name | Name 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 Name | The name of the schema field name, see Dynamo field names in the section about “Metaforce Dynamo Fields” above. |
| Column Order | In what order the column shall be presented, left to right. Use 1,2,3 etc. 1 = leftmost, 2 = right of leftmost, etc. |
| Show Column | If checked show column, if unchecked do not show column in document list. |
| Column Type | Type 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 Width | Column 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 on startup and it is used by Centerpoint for Salesforce to speed up the creation of references and web urls.
| Field | Description |
|---|---|
| Namespace | Package’s namespace without the leading double underscores __.Example: ‘mfcp’. This field is automatically set when package is installed. |
| NamespacePrefix | Package’s namespace with __ prefix added.Example: __mfcp. This field is automatically set when package is installed. |
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.
| Field | Description |
|---|---|
| Auto Batch Size | Check 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.
| Field | Description |
|---|---|
| Template Cache Enabled | Check this to enable use of template cache. |
| Template Cache Reload Interval Seconds | After 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 Time | Date 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:
| Field | Description |
|---|---|
| Label | Shall be “View Settings” |
| Name | Shall be “ViewSettings” |
| Use External Viewer | Check this if external viewer is to be used. Uncheck if default viewer shall be used. |
| External viewer URL | External 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 Field | The 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:
| Field | Description |
|---|---|
| Access Token 1 .. 6 | Access token received from Centerpoint part 1 .. 6 |
| Token Type | Access token type received from Centerpoint, typically “Bearer”. |
| Expires At | Date and time when the access token will expire. |
Template SObject Map
This setting controls
| Field | Description |
|---|---|
| Label | Unique 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. |
| Name | Same 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. |
| Order | 1 = 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 Id | Metaforce 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 Name | Name 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 Name | Name of SObject (API name) in Salesforce being the current record, the related record (lookup) or child record. |
| Filter | Will be used as a SOQL WHERE clause when querying child records. Example: “ExitDate__c = NULL” or “IsClosed = TRUE”. |
| Parent Field Name | Name of parent field name (API name) on the child record relating the child (using lookup) to its parent (the current record). |
| XML Node Name | Name of XML node representing this record and SObject. |
| XML Parent Node Name | Parent 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 Prefix | A 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 Type | Type 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. |
| Lookup Field Name | Name 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:
| Keyword | Description |
|---|---|
| USERSELECTABLE | just 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 |
| CLASSIFICATION | must 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. Example: CLASSIFICATION=HR |
| SOBJECT | must 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. |
| FIELDVALUES | a 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 |
| DATASOURCE | specify what data source (data service) the template shall use to retrieve data from. See custom setting External Data Service. Example: DATASOURCE=MY_APEX_SOURCE |
| DATATEMPLATE | specifies 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. Example: DATATEMPLATE=AccountWithContacts |
| RECEIVERINTEMPLATE | specifies the user is not able to select recipient if multiple recipients exist. The receiver is defined in the template. See custom settings Identifying Field. |