template-info.json Attributes

The template-info.json file is the main file that describes the template. It includes or references all the information required to create a downstream app.

AttributeRequiredDescription
nameYesThe unique developer name of the template. If changed, it creates a new template; if it’s changed to an existing template devName, it overwrites the existing template.
labelYesThe template name visible to users in the Analytics template picker and wizard.
descriptionNoThe template description. Shown in the app creation wizard template picker.
iconsNoThree icon types are available: templateBadge, appBadge, and templatePreviews. If images are stored as static resources and the org uses a namespace, specify a namespace attribute for each icon.
tagsNoArray of tags used in template search and shown on template details page.
asset​VersionYesRefers to the numbered API version to use when creating Analytics assets, such as dashboards, datasets, XMDs, and dataflows. Recipes are always on the current API version. To update this version, see Update an Existing Template.
release​InfoYesContainer attribute only.
release​Infotemplate​VersionYesThe version of the template, tracked for the upgrade process. Calling wave/templates PUT automatically increments this number, but it can be changed manually as well. The format is ##.##, although it’s a string.
release​Infonotes​FileNoA template dev defined HTML file to describe new release details. Basic HTML formatting is supported, but not links or javascript. Defaults to using the template description as release notes if file isn’t specified.
rulesNoContainer attribute only - can contain 1 or more rule file definitions (loaded first to last and order matters for dependencies).
rulestypeYes, if rules is used.appToTemplate applies rules when updating the template from the source app (Rest API PUT call). templateToApp applies rules when creating an app from a template.
rulesfileYesPath to the rules file.
template​TypeYesCan specify either app, embeddedapp, data, or dashboard.
ui​DefinitionNoPath the ui.json file.
variable​DefinitionNoPath to the variables.json file.
folder​DefinitionNoPath to the folder.json file.
auto​Install​DefinitionYes for auto-installed templates, No for templates that use the configuration wizardPath to the auto-install.json file. Only specify this file for auto-install templates.
readiness​DefinitionNoPath to the orgReadiness.json file.
apex​CallbackNoContainer attribute only. Registers an Apex class that runs on wizard load, app create, and app upgrade. The Apex class examines the org and sets variable values. For example, the Sales Analytics template uses an Apex class to check whether the org uses the Products object. If it doesn’t, the has_product variable is set to no.
apex​CallbacknamespaceYes, if apexCallback is used and org uses namespace.The namespace for the org, if it has one. Required for Apex classes in the development org or packaged with the template.
apex​CallbacknameYesThe name of the Apex class to be used.
custom​AttributesNoSpecifies information describing your template in the app creation wizard, such as Salesforce objects used or notable features. Takes a label and an array of values.
dashboardsNoContainer attribute only. Array of dashboard JSON files to be used, can be empty if there are no dashboard files.
dashboardsfileYes, if dashboards is used. Otherwise no.Path to the dashboard file.
dashboardslabelYes, if dashboards is used. Otherwise no.The dashboard label. Must match the “label” attribute in the dashboard file
dashboardsnameYes, if dashboards is used. Otherwise no.The dashboard name. Must match the “name” attribute in the dashboard file.
dashboardsconditionNoIf condition is met, then the dashboard is created in the app; if the condition isn’t met, the dashboard isn’t created. Can include Overrides, which are defined in variables.json. See Complex variables.json Variable Types.
dashboards → overwrite​On​UpgradeNoIndicates if asset is overwritten during the reset/upgrade process. Uses Always, IfDifferent, Never, or an expression that evaluates to one these values. Case sensitive. Example: "overwriteOnUpgrade": "${Variables.DontOverwriteQuota ? 'Never' : 'IfDifferent'}",
lensesNoContainer attribute only - array of dashboard JSON files to be used, can be empty if there are no dashboard files.
lensesfileYes, if lenses is used. Otherwise no.Path to the lens file.
lenseslabelYes, if lenses is used. Otherwise no.The lens label. Must match the “label” attribute in the lens file.
lensesnameYes, if lenses is used. Otherwise no.The lens name. Must match the “name” attribute in the lens file.
lensesconditionNoIf the condition is met, then the lens is created in the app; if the condition isn’t met, the dashboard isn’t created. Can include Overrides, which are defined in variables.json. See Complex variables.json Variable Types
lenses → overwrite​On​UpgradeNoIndicates if asset is overwritten during the reset/upgrade process. Uses Always, IfDifferent, Never, or an expression that evaluates to one these values. Case sensitive. Example: "overwriteOnUpgrade": "${Variables.DontOverwriteQuota ? 'Never' : 'IfDifferent'}",
elt​DataflowsNoContainer attribute only – array of dataflow JSON files to be used, can be empty if there are no dataflow files.
elt​DataflowsfileYes, if eltDataflows is used. Otherwise no.Path to the dataflow file.
elt​DataflowslabelYes, if eltDataflows is used. Otherwise no.The dataflow label. Must match the sourceLabel attribute in dataflow file.
elt​DataflowsnameYes, if eltDataflows is used. Otherwise no.The dataflow name. Must match the name attribute in the dataflow file.
elt​DataflowsconditionNoIf condition is met, then the dataflow is created in the app; if the condition isn’t met, the dataflow isn’t created. Can include Overrides, which are defined in variables.json. See Complex variables.json Variable Types
elt​DataflowsoverwriteOnUpgradeNoIndicates if asset is overwritten during the reset/upgrade process. Uses Always, IfDifferent, Never, or an expression that evaluates to one these values. Case sensitive. Example: "overwriteOnUpgrade": "${Variables.DontOverwriteQuota ? 'Never' : 'IfDifferent'}",
recipesNoContainer attribute only – array of recipes JSON files to be used, can be empty if there are no recipe files.
recipesfileYes, if recipes is used. Otherwise no.Path to the recipe file.
recipeslabelYes, if recipes is used. Otherwise no.The recipe label.
recipesnameYes, if recipes is used. Otherwise no.The recipe name.
recipesconditionNoIf condition is met, then the recipe is created in the app; if the condition isn’t met the recipe isn’t created. Can include Overrides, which are defined in variables.json. See Complex variables.json Variable Types
recipesoverwrite​On​UpgradeNoIndicates if asset is overwritten during the reset/upgrade process. Uses Always, IfDifferent, Never, or an expression that evaluates to one these values. Case sensitive. Example: "overwriteOnUpgrade": "${Variables.DontOverwriteQuota ? 'Never' : 'IfDifferent'}",
external​FilesYesContainer attribute only - array of external files, CSV and descriptive files, to be used, can be empty if there are no external files.
external​FilesfileNoPath to the CSV file.
external​FilesnameYes, if externalFiles is used. Otherwise no.The externalFile name.
external​FilesrowsNoThe number of rows to stub out in the dataset created from the CSV, before data upload. If not specified, defaults to 5. By default, a file has 5 rows until the user uploads their own version of the file.
external​FilesschemaNoPath to the schema file (describes the format of the data)
external​FilesuserXmdNoPath to the user XMD file (describes the display format of the data).
external​FilestypeYesMust be CSV.
external​FilesconditionNoIf condition is met, then the external file is created in the app; if the condition isn’t met, the external file isn’t created. Can include Overrides, which are defined in variables.json. See Complex variables.json Variable Types
external​Filesoverwrite​On​UpgradeNoIndicates if asset is overwritten during the reset/upgrade process. Uses Always, IfDifferent, Never, or an expression that evaluates to one these values. Case sensitive. Example: "overwriteOnUpgrade": "${Variables.DontOverwriteQuota ? 'Never' : 'IfDifferent'}",
dataset​FilesNoContainer attribute only – array of SFDC dataset to be used, can be empty if there are no SFDC dataset.
dataset​Filesuser​XmdNoPath to the user XMD file, if it exists.
dataset​FileslabelYesThe dataset label.
dataset​FilesnameYesThe dataset name.
dataset​FilesconditionNoIf condition is met, then the dataset is created in the app; if the condition isn’t met, the dataset isn’t created. Can include Overrides, which are defined in variables.json. See Complex variables.json Variable Types
dataset​Fileslive​ConnectionNoThe container attribute for Snowflake connection live dataset settings.
dataset​Fileslive​Connectionconnection​NameYes, if liveConnection is used. Otherwise no.The connection name for the Snowflake connector. This name must match the developer name of the connector in the consumer org.
dataset​Fileslive​Connectionsource​Object​NameYes, if liveConnection is used. Otherwise no.The Snowflake source table name.
image​FilesNoContainer attribute only: array of app images to be used.
image​FileslabelYes, if imagesFiles is used. Otherwise no.A label for the image.
image​FilesnameYes, if imagesFiles is used. Otherwise no.The image name.
image​FilesconditionNoIf the condition is met, then the image is uploaded into the app; if the condition isn’t met, the image isn’t uploaded.
image​FilesnamespaceYes, if org uses a namespace.Includes reference to namespace for static resources, for example ${Org.Namespace}.
extended​TypesNoAdd extended type to a template.
extended​Typesdiscovery​StoriesNoAdd Einstein Discovery story extended type to template. Uses label, name, file, condition. See Add an Einstein Discovery Story to an Analytics Template
template​DependenciesNoArray of other templates the template is dependent on. See Share Analytics Assets Between Apps
template​Dependencies →name“Yes, if dependencies is used. Otherwise no.Developer name of the template.
template​Dependencies →namespace“NoNamespace of the org, if used.
template​Dependencies →templateVersion“NoNumber of the template version.
template​Dependencies →condition“NoCondition in which to include this dependency.
componentsNoContainer attribute only. Array of dashboard component JSON files to be used, can be empty if there are no dashboard components files.
componentsfileYes, if components is used. Otherwise no.Path to the dashboard component file.
componentslabelYes, if components is used. Otherwise no.A label for the dashboard component.
componentsnameYes, if components is used. Otherwise no.The dashboard component name.
componentsconditionNoIf the condition is met, then the dashboard component is created in the app. If the condition isn’t met, the dashboard component isn’t created.

Icon type details:

  • templateBadge defines the small icon that appears in the app picker and at the top of the template details window. Don’t use file extension with name attribute, for example "learn", not "learn.png".
  • appBadge defines the icon shown by Analytics Studio for the app after creation. Must be "1.png" through "21.png". Use file extension with name attribute, for example "16.png", not "16"
  • templatePreviews defines preview images displayed on the template details window during the app creation process. Supports multiple images. Don’t use file extension with name attribute, for example "preview_education", not "preview_education.png". Name of the icon image must use all lower case letters.

Example namespace attribute for appBadge:

1"appBadge": {
2    "name": "15.png"
3    "namespace": "${Org.Namespace}"
4}

Make sure the Apex class can be accessed by users in the organization with Manage Analytics Templated Apps user permission. Otherwise, trying to create an app from your template results in an error. In Setup, go to Apex Classes, click Security next to the class, then add the profile with the Manage Analytics Templated Apps user permission.

Important

Example customAttributes value:

1customAttributes" : [
2  { "label" : "Features",
3    "values" : ["CUSTOM OBJECTS", "MOBILE READY"]
4  },
5  {"label": "Salesforce objects",
6  	"values" : ["ACCOUNT","PRODUCT","LEADS","CASES"]
7  }],

See Also