AnalyticsVisualization defines a Tableau Next visualization that belongs to an AnalyticsWorkspace. It combines a data source, a visual specification, field calculations and presentation settings, optional views, and optional interactive actions. Its inherited fullName identifies the metadata component; masterLabel is its required display name.
The entries in fields describe how the visualization uses data. They do not create Salesforce fields. Likewise, entries in views are nested view definitions, not separately deployable AnalyticsVisualization components.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName, masterLabel
|
The component's metadata identity and display name, respectively. fullName is inherited from Metadata; masterLabel is required. |
analyticsWorkspace |
Required. Identifies the Tableau Next workspace that owns the visualization. |
dataSource |
Required. Identifies the data source used by the visualization. |
visualSpecification |
Required. Holds the main visual specification as base64Binary. Optional view definitions do not replace it. |
fields: objectName, fieldName
|
Identify the data-source object and field used by a visualization field definition. |
fields: fieldKey
|
Required for each field definition. View filters and sorts can refer to this key rather than the source field name. |
fields: role, displayCategory, type
|
role is Dimension or Measure. Independently, displayCategory is Continuous or Discrete. type is Field, MapPosition, MeasureNames, or MeasureValues. |
fields: function
|
Controls aggregation or date interpretation. Values include Sum, Avg, Count, CountD, date-part functions such as DatePartMonth, date-truncation functions such as DateTruncMonth, and fiscal variants. |
fields: adHocCalc, computeUsing, quickTableCalc
|
Carry calculation expressions. The calculation element's spelling differs from the adHoCalc spelling in Salesforce's field table; see Documentation Inconsistencies. |
views |
Contains zero or more view definitions. Each requires its own fullName, masterLabel, and isOriginal. |
viewSpecification |
A string within a view definition that can contain JSON filters and sorts referencing field keys, including a sort of one field by another. |
actions |
Contains zero or more interactions. Each requires actionType and eventType. Action types are filter, flow, navigate, parameter, and recordaction; event types are click and select. parameters holds configuration as a JSON string. |
workspaceAssetRelationships |
Records associated workspace assets. Each entry requires asset, assetType, assetUsageType, and workspace. assetUsageType is Created or Referenced; optional metadataSourceType is Promoted, Reused, or ReusedEditable. |
version, analyticsVizVersion
|
The visualization's version and each view's version store API version values. analyticsVizVersion on a field or view identifies the visualization version with which that entry is associated. |
Behavior and Constraints
The required analyticsWorkspace and dataSource establish the visualization's workspace and data context. The required visualSpecification supplies its main visual definition, even when views is populated.
Interpret field settings together. role and displayCategory describe separate properties: being a measure does not itself specify whether a field is continuous or discrete. function changes the meaning of the displayed result, not just its label. Calculation expressions in adHocCalc, computeUsing, and quickTableCalc must also be considered alongside objectName and fieldName. Because type includes map positions, measure names, and measure values, not every entry represents an ordinary source column.
A view's JSON configuration can use fieldKey for filters and sorts. It can also sort one field by another field's key. Changing a key can therefore affect embedded view configuration even when fieldName remains unchanged.
Within a view, isOriginal indicates whether that view is original. It is not a flag that makes the view a separate metadata component. Similarly, an action's category alone does not describe its full behavior: the triggering eventType and JSON parameters also matter when determining what a user interaction initiates.
lastDraftModifiedDate records when the workspace draft was last modified, and lastPublishedDate records when the workspace was last published. Although these values are carried on the visualization, their scope is the workspace. They are not independent visualization activation flags.
For a visualization created from a template, templateSource identifies the source template and templateAssetSourceName identifies the source visualization within that template. These values record origin, not the current workspace or data source.
Deployment and Retrieval
AnalyticsVisualization components use the .uaviz suffix and reside in the analyticsVisualizations folder. In package.xml, use AnalyticsVisualization as the type name and the component's fullName as the member name. The manifest also supports the wildcard member *.
Deployment and retrieval limits count AnalyticsVisualization components:
| Operation | Maximum Components |
|---|---|
| Single deploy operation | 50 |
| Single retrieve operation | 100 |
| All deploy operations in a 24-hour window | 100 |
| All retrieve operations in a 24-hour window | 200 |
Splitting components into smaller operations does not remove the aggregate 24-hour limits.
Preserve the distinction between the visualization component's identity and each nested view's identity. Also account for field-key references inside viewSpecification when changing field definitions. A source-field name that remains unchanged does not protect a filter or sort whose referenced key has changed.
The categories in workspaceAssetRelationships do not establish a deployment sequence or require deployment of every supported asset type. The published sample also has serialization discrepancies, so it should not be treated as a complete deployable definition.
Relationships
The visualization references its workspace, while dashboards and workspaces can associate assets with the visualization. These connections identify possible consumers and workspace associations; they do not establish actual usage in a particular org.
References
-
AnalyticsWorkspace:analyticsWorkspace.
Referenced By
-
AnalyticsDashboard:analyticsVisualization,asset. -
AnalyticsWorkspace:asset.
Separately, workspaceAssetRelationships records assets through asset, assetType, and workspace. Its supported assetType categories are AnalyticsDashboard, AnalyticsVisualization, MktCalculatedInsightObject, MktDataConnection, MktDataLakeObject, MktDataModelObject, MktDataTransformSetup, and SemanticModel. These are categories supported by the relationship structure, not a list of dependencies that every visualization has.
Documentation Inconsistencies
- The calculation element is exposed as
adHocCalc, while Salesforce's field table spells itadHoCalc. Preserve this distinction when reviewing calculation metadata. - The published example omits
visualSpecification, even though the field definition marks it as required. Optionalviewsdo not replace that requirement. - The published example uses
AnalyticVisualizationforassetType, while the exposed enumeration containsAnalyticsVisualization. Do not treat the example spelling as the enumeration contract.
Common Questions
Where are AnalyticsVisualization files stored, and can I retrieve them with a wildcard?
They are stored in analyticsVisualizations with the .uaviz suffix. The AnalyticsVisualization entry in package.xml supports the wildcard member *.
How many AnalyticsVisualization components can I deploy or retrieve?
A single deploy can include 50 components, and a single retrieve can include 100. Across a 24-hour window, the totals are 100 deployed components and 200 retrieved components. Smaller batches do not bypass those aggregate limits.
Is visualSpecification required when the visualization has views?
Yes. visualSpecification is required and has type base64Binary. Nested views supplement it; they do not replace it. The published example's omission of this element is a documentation inconsistency.
Why can changing fieldKey affect filters or sorting?
A view's viewSpecification can reference field keys in its JSON filters and sorts, including when sorting one field by another. Changing fieldKey can affect those references even if fieldName stays the same.
Does lastPublishedDate mean this visualization is activated?
No. lastPublishedDate records when the workspace was last published, and lastDraftModifiedDate records the workspace draft's last modification. Neither is an independent visualization activation flag.