Skip to main content

Dive into Report Metadata JSON

Learning Objectives

After completing this unit, you’ll be able to:

  • Discuss data sources for a report.
  • Describe the attributes of report metadata.
  • Explain how to add filters to a report.
  • List the UI components that you can add to a report.

Data Source

In the previous unit, you learned that the data source is one of the components of report metadata JSON. It determines the source and granularity of the read KPIs, which are marked as reporting relevant, to show in a report.

For example, to show monthly account KPI values, Fatima uses the AccountMonthlyMeasures data source. This data source specifies that for the report, account plan KPI values are the source of the data and the granularity of the report is Monthly. Similarly, to determine promotion KPI values aggregated at the product level, Fatima uses the PromotionMeasures data source.

Here are the data sources for real-time reports.

  • AccountMonthlyMeasures: View monthly values of reporting KPIs for promotion and account plans at the account and product levels. With the AccountMonthlyMeasure or AccountWeeklyMeasure data source, you can use the promotion or account reporting KPIs as a filter in the report.
  • AccountWeeklyMeasures: View weekly values of the promotion and account plan reporting read KPIs at the account and product levels.
  • PromotionMeasures: Access the total values of the promotion KPIs at the product level.
  • PromotionTacticMeasures: Check the total values of the promotion or tactic KPIs at the product level.
  • PromotionTacticPaymentMeasures: View the total values of the promotion or tactic KPIs that have payments related to them. This data source removes all tactics and promotions that don't have any payment related to them.
  • AllPromotionTacticPaymentMeasures: Access all promotions, tactics, and payment information for tactics with associated payments.

There’s a relation between the dimension and the data source of a report. Dimensions determine the type of report, for example, whether it’s a tactic report or a promotion report. And if it’s a tactic report, it must show tactic-related data. So use the data source that fetches tactic-related KPI values.

Ready to review what you've learned? This knowledge check isn’t scored—it’s just an easy way to quiz yourself. To get started, drag the data source in the left column next to the matching dimension on the right. When you finish matching all the items, click Submit to check your work. To start over, click Reset.

Attributes

The attributes component of a report metadata JSON contains the fields that you want the report to display. The image shows an example of the KPI dimensions section in report metadata.

KPI dimension showing the list of KPIs to be shown in a report.

Add a report dimension to the section to specify the data shown in the report. Add other fields like product dimension to include the product hierarchy levels. To display product codes, add the product code as a product attribute.

As we've established previously, KPIs for the report are determined based on the data source added to the report metadata JSON. So, for an account plan report, the AccountMonthlyMeasures data source ensures that account-related KPIs are shown. A sales organization has hundreds of account-related KPIs, and if all these KPIs are displayed in an account plan report, it’s difficult for KAMs to find the data they want.

Fatima creates a report that’s focused and easy for Gustavo to understand. She specifies KPIs, such as Actual Volume, Incremental Volume, and Target Volume as KPI dimensions in the attributes section. Add labels for the KPIs as needed, which show up in the report instead of the actual KPI names. You can also group KPIs for easier viewing.

In this example, the KPI APEffectiveBase is labeled Planned Base, and RTRPlanIncrVolume is labeled Planned Incr. Volume. The report displays these KPIs under Volume Analysis, a grouping that you learn more about later in this module.

The data source of a report also determines the time frame the report covers. In a real-time report, you have the flexibility to group different time frames and see the aggregated values. For a weekly report, you can view the weekly values aggregated up to a month or even a year. Use time dimensions in the metadata JSON to define the periods for which the report KPIs aggregate. The time dimensions allowed depend on the report type. For example, it’s not possible to add Weekly as a time dimension for a monthly report.

Filters

A key feature of real-time reports is data filtering. Sometimes, Gustavo wants to see consolidated data for all his accounts, while other times, he seeks data for specific accounts only. He also needs to view the details for different KPI sets, at different times. To do this, filters come in handy.

Add the filters you need for a report in the filters section of the report metadata. When adding filters, define their properties. Here are a few examples:

  • The name of the filter to be displayed on the report page.
  • Whether the filter is a multiselect or single-select.
  • The values for each filter and whether these values are fetched from a source.

Gustavo wants to filter data by accounts. So, Fatima creates a multiselect accounts filter, setting the input source for the filter as PlanAccounts. In this case, all accounts that have defined customer business plans are shown as the filter values.

Here’s what Fatima’s filter looks like.

Multiselect filter to filter a report by account.

Gustavo also wants to filter data based on KPIs. So, Fatima adds KPI Groups as a single-select filter. The KPI groups as defined in the attributes section, such as Volume Analysis, appear as options in the KPI Groups filter. When you select a KPI group from the filter, the KPIs defined for the group are listed in the report.

Here’s a report that shows the KPIs for a KPI group as defined in the attributes section.

Screenshot showing KPI set filter and the KPIs displayed when the filter is selected.

You can add a label for a filter to be shown in a report. In this example, the KPI Group filter is labeled as KPI Set. When you select the Volume Analysis KPI group, the KPIs included in the Volume Analysis group are shown.

UI Mapping

As part of configuring a report, decide how to present the data visually. Should the report be a matrix or a chart? If the data is shown as a matrix, what data is shown in columns and rows of a report? If it’s a chart, should it be a progress bar or a gauge?

Typically, an account-weekly report is viewed as a matrix with weeks as columns and products and KPIs as rows. In real-time report terms, a matrix is called ‌a flat list. You can group rows by either KPIs or products. And, to distinguish between a product’s actual volume and total volume, a progress bar is a better option. With a progress bar, you can visually determine the difference between the two values.

After you’ve decided on how you want your report to be represented, add the details in the last part of the attributes section of a report metadata JSON — UIMapping.

Gustavo wants to show products and KPIs as rows, and he’d like to show time as columns. So Fatima creates a flat list and defines the row dimensions as productdimension and KPIdimensions, and the column dimension as timedimension.

Screenshot of a report with Product and KPIs (Measures) as the rows and Time as column.

You can define only one column dimension for a report, and you have to decide whether the rows and columns are grouped. To illustrate, you can group columns by period and rows by product levels.

Only the periods defined in the grouping section in the UI mapping determine the period for which data is shown. Let’s say in the attributes section for a weekly report, you define the time dimensions as Weekly, Monthly, and Quarterly. But in UI mapping, you define only Monthly and Quarterly. The report then shows only monthly and quarterly data.

Now that Fatima has decided on the data source, attributes, filters, and UI elements for Gustavo’s account plan report, she’s ready to go and build it.

In the next unit, discover how to create a report and an accompanying Lightning app page.

Resources

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios