Newer Version Available
Extended Metadata (XMD) Reference
Formats Section
The formats section of the extended metadata file allows you to specify a format and multiplier for measures. The following example shows code for specifying a format string and a multiplier of 1 for the Amount measure:
For more information about numeric formatting, see “Numeric Formats” in the Analytics Cloud External Data API Developer’s Guide.
Labels Section
- Dimension: Maps the dimension API name to a display label.
- Measure: Maps the measure API name to a display label.
- Measure filter: Specifies display labels to be used when the dashboard is showing a range for a measure. You can set the measure filter if you want to use a shorter name than the one that is defined in the measures section.
- Key: Specifies display labels for dimension keys.
The following example shows code for mapping API names to display labels used in the user interface.
Types Section
The types section of the extended metadata file allows you to group dimensions into composite types that are treated as a single dimension in the user interface. The following example shows code for creating a type that’s called “Close Date GMT” and groups date dimensions and measures.
Colors Section
The colors section of the extended metadata file allows you to set custom colors for charts. The following example shows code for setting the colors for particular StageName and Region values.
Values Query Columns Section
The values_query_columns section of the extended metadata file allows you to specify a list of default columns to be displayed for a values table.
Hide Dimensions and Measures Section
The hide_dimensions and hide_measures sections allow you to provide lists of dimensions and measures to be hidden in the user interface.
Dimensions Section
Add a dimensions section to an XMD file to create custom quick action menus that enable users to do the following from any dimension value in a table or chart within a Wave lens or dashboard:
- Take advantage of actions on Salesforce objects. The current Dimensions implementation supports Account, Cases, Lead, and Opportunity Salesforce objects and so-called create actions. See “Quick Actions Menu Support for Objects and Actions” in Enable Quick Actions and Links to Salesforce and External Records With Custom Menus in Salesforce Help for a complete list of support for Salesforce objects and actions.
- Access records from Salesforce or any website that uses HTTP or HTTPS protocols
Add the dimensions section to the highest level of the XMD file (at the same level as the labels and types sections).
Through the XMD file dimensions section, you can specify if the menu includes all or a subset of actions and a link to a record in Salesforce or an external website.
- Adding A Menu With Actions and a Link
-
The following shows a dimensions section that adds a menu with all available create actions and a link to a record.
In the above example, “field” is the name of the dimension that the menu appears on in dashboard and lens charts and tables. Setting “recordIdField” enables the create actions and a link in the menu that opens a record. The link uses the current Salesforce org instance and the dimension (in the example “Id”) specified in the “recordIdField”.
You can specify “linkTemplate” to override the default link, which is "/{{row.recordIdField}}". (For more detail about "recordIdField", see “Adding a Link to a Salesforce Record to a Menu,” below). Here’s an example showing a link to a record in Google and an optional tooltip:
Other options include the following:
- "linkTemplateEnabled": Defaults to true to set the link to the Salesforce or external record. If set to false, the menu does not display the open record link option.
- "sfdcActionsEnabled": Defaults to true to enable and display actions in the menu. If set to false, the menu does not display actions.
- “sfdcActions”: Use to include only specific actions on a dimension. The actions specified by “sfdcActions” must be available for the record as determined when you set up actions in Salesforce using the action publisher. For example, the following includes the New Account and New Lead actions, where “name” references the name of the action within the action publisher:
In some instances, a dimension value is associated with multiple IDs and is not unique. For example, an opportunity with the name “acme” has multiple opportunity IDs (and records). But the action or link can only be directed to one record. In this scenario, the user is given a choice of associated records in a modal. Here’s an example showing “recordDisplayFields”:
This image shows the result of setting “recordDisplayFields” from the above example:

The following combines the above, showing a complete XMD file for a dataset that includes quick action menus on several fields:
- Adding an Open Record Link to a Menu
-
If your XMD file has no other specifications, the dimension section for adding an open record link to the menu looks like the following:
In the above example, “field” is the name of the dimension that the link appears on in dashboard and lens charts and tables. “LinkTemplate” is the destination of the link. “linkTooltip” is optional and can contain text that appears when a cursor hovers over the link.
- Adding a Link to a Salesforce Record to a Menu
-
To link to a Salesforce record within the current organization instance, configure “LinkTemplate” as follows:
In the example, / sets the link’s destination to your Salesforce organization and {{row.Id}} is the record to link to. Id is the dimension that’s looked up in Salesforce, so specify a dimension that exists in the dataset and that returns results when queried in Salesforce, such as an ID or case number.
The chart or table would contain a link from an account name (such as Acme). If the Salesforce account ID for Acme is0011a0000040KEz on an instance of Salesforce located at https://na24.salesforce.com, the URL generated when the user clicks Acme is https://na24.salesforce.com/0011a0000040KEz.
- Adding a Link to an External Website to a Menu
-
To link to an external website and pass information such as a username to the linked website, configure “LinkTemplate” like the following:
In this example, {{row.username}} passes a username through the URL of an external website; for example, if the username is dsmith, the URL generated by clicking dsmith is https://www.ExternalWebsite.com/users/dsmith. “LinkTemplate” must specify "http://{{row.websiteURL}}" or "https://{{row.websiteURL}}" for the link to work.
Here are some additional examples of adding open record links to menus, each showing variations on the above:
As the last example shows, in the XMD file you can specify any static URL, as long as it starts with http:// or https://, and insert a dynamic value by using the {{row.}} notation.
Organizations Section
For datasets that combine records from multiple Salesforce org instances, specifying an organizations section in the XMD file makes it possible to construct a link to a specific record in the correct org instance.
Add the organizations section to the highest level of the XMD file (at the same level as the dimensions section). For a given dimension, add a ”linkTemplate” to create a link to a Salesforce record as described in “Adding a Link to a Salesforce Record to a Menu” in Dimensions Section within this guide. Along with ”linkTemplate”, you use“recordOrganizationIdField” to indicate that ”linkTemplate” looks for the OrgId dimension in the dataset in which you define the menu.
With “recordOrganizationIdField” set, ”linkTemplate” knows to look for an organizations section in the XMD. In the organizations section of the XMD file, you map between orgIds and instance URLs for each Salesforce org instance referred to by records in the dataset.
The result is that when a user clicks such a link, the mapping in the organizations section makes sure that the link resolves to the correct URL for the record.
Here’s an example organizations section: