The Message Catalog allows you to provide a localized experience for end users of Vault extensions. For example, you can display a localized error message to the user based on validation criteria. To do this, create a custom Message Group and related Messages.
Once created, the message group is immediately available to call by custom code. At runtime, users see messages in their preferred language. If no translation exists, Vault uses the default value in the base language.
Limits for Message Groups and Messages
The following limits affect message groups and messages:
- A message group contains a maximum of 500 messages.
- Message text cannot exceed 1,500 characters nor 5 lines.
- When creating a message Default Value or editing an existing Value, all tokens used must follow the format
${token_name}
, where “token_name” is a string starting with a letter and followed by zero or more letters and underscores. For example,${email_input} is not a valid email address
.
How to Create a Message Group
To create a new message group:
- From Admin > Configuration > Message Catalog, click Create on the Message Groups page.
- Enter a Label for the group. Values for the label field do not appear to end users nor to developers.
- Optional: Vault auto-populates the Name field. If you wish, you can edit this field. The name is used by developers to call the message group.
- Click Save.
How to Delete a Message Group
Note: Before deleting a message group, ensure the action does not break any existing Vault extension.
To delete a message group:
- Select a message group.
- On the group’s edit page, click Delete.
- Click Continue in the dialog.
How to Add a Message to a Message Group
To add a message to a message group:
- Select a message group.
- On the Message Group record detail page, click Create in the Messages section.
- Enter a Name for the message. The name is used by developers to call the message.
- Enter the Default Value. This field is global for all messages in the group.
- Click Save.
- Repeat these steps to add additional messages.
How to Delete a Message from a Message Group
Note: Before deleting a message, ensure the action does not break any existing Vault extension.
To delete a message from a message group:
- Select a message group.
- Select a message on the Message Group record detail page.
- On the View Message page, click Delete.
- Click Continue in the dialog.
How to Edit a Message
To edit a message:
- Select a message group.
- Select a message on the Message Group record detail page.
- On the View Message page, click Edit.
- If desired, enter a new Name for the message. The name is used by developers to call the message.
- If desired, enter a new Default Value. Changes made to this field are global for all messages in the group.
- If desired, enter a new Value (optional). This field is typically the translated message for the current user’s language. If no translation exists or if the value is deleted, Vault uses the Default Value regardless of the user’s language setting. While it is possible to provide translations by changing languages in your profile and entering the value here, it is recommended to use the Bulk Translation tool.
- Click Save.
How to Translate Messages
Translate messages using the Field Labels option of the Bulk Translation tool. In the export CSV, messages have the message__sys
Type. Their Key follows the pattern Messagegroup#Message
. For example: person_validation__c#email_format__c
.