Loading
Set Up Trade Promotion Management
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          JSON for Report Metadata

          JSON for Report Metadata

          Datasources, attributes, filters, and UIMapping are the components of the JSON structure of report metadata.

          Required Editions

          Available in: Lightning Experience

          Available in: Enterprise and Unlimited Editions where Consumer Goods Cloud is enabled

          Note
          Note Avoid using special characters in product data fields. For example, names and descriptions shouldn’t contain double quotes or backslashes. Special characters can interfere with the JSON parsing process when generating a report.

          Datasources

          Determines the source and granularity of the reporting read KPIs for an account and promotion. For example, in a report, you can show the account KPI values on a monthly basis, and show the aggregated values of the promotion’s KPIs.

          Use one of these datasources:

          • AccountMonthlyMeasures: To view the monthly data in the report. Using this datasource, a KAM can access the monthly values ofreporting KPIs for promotion and account plans at the account and product levels. With the Account Monthly Measure or AccountWeekly Measure datasource, you can use the promotion or account reporting KPIs as a filter in the report.
          • AccountWeeklyMeasures: To view weekly data. Using this datasource, a KAM can access the values of the promotion and AccountPlan reporting read KPIs at the account and product levels.
          • PromotionMeasures: Using this datasource, a KAM can access the total values of the promotion KPIs at the product level.
          • PromotionTacticMeasures: Using this datasource, a KAM can access the total values of the promotion or tactic KPIs at the productlevel.
          • PromotionTacticPaymentMeasures: Using this datasource, a KAM can access the total values of the promotion or tactic KPIs thathave payments related to them. This datasource removes all tactics and promotions that don't have any payment related to them.
          • AllPromotionTacticPaymentMeasures: Using this datasource, a KAM can access all promotion, tactics, and payment information fortactics with associated payments.

          Attributes

          Determines the specific attributes that are shown in a report. Add attributes from the list of attributes defined in the report dimensions.

          "attributes": {
              "productattributes": [
                {
                  "name": "productcode"
                }
          Important
          Important Avoid special characters in product data fields. For example, names and descriptions shouldn’t contain double quotes or backslashes. Special characters can interfere with the JSON parsing process when generating a report.

          The dimension from which you can pick attributes for a report, depends on the datasource of the report. This table shows the dimension you can use for every datasource.

          Datasource Dimensions
          AccountMonthlyMeasures Product or Promotion dimensions
          AccountWeeklyMeasures Product or Promotion dimensions
          PromotionMeasures Promotion dimension
          PromotionTacticMeasures Tactic dimension
          PromotionTacticPaymentMeasures Payment dimension
          AllPromotionTacticPaymentMeasures Payment dimension

          Filters

          The list of filters that you can use to restrict the data retrieved from the datasource. The filters can be shown in the Filters section of a report page or can be hidden. You can also define default values for each filter. In the Reporting app page, Product, Account, and Time filters are always available. For the promotion object, you can also filter custom fields.

          When adding a filter, add these properties:

          • Filtername: Name of the filter.
          • FilterType: Type of the filter, such as singleselect or multiselect.
          • required: Indicates whether the filter is required.
          • label: The label as shown in a report. If you don’t define a label, the filter name is used as the label.
          • FilterValues: Values for the selected filter types. For singleselect and multiselect filter types, add at least one value or source attribute. If multiple attributes are set, the values are determined based on whether the attribute is set as a value or source. If the attribute is set as a value, the values defined in the values property are used. If the attribute is set as a source, the value defined by the source property is used.
          • ValuesProvider, ValuesSource: Determines the source that the value is fetched from for a filter type. Sets a provider for the values of the filters for hidden, fixed, subaccount, and select filters. If the parameter is a string and doesn't reference any value defined in ValuesSource, the system retrieves the values by using the run method of the Apex class with the same name. You can use the <<NS__>> token in a string to dynamically resolve the cgcloud namespace. For example, <<NS__ >>Field1__c, and cgcloud__Field1__c.
          • level: Only applicable for product filters and specifies the level of the product hierarchy to retrieve values. The specified level must exist in the product dimension and this field is mandatory if you’re using the product source.
          • FilterDefaultValue: Default value of a filter when a view is created. The value depends on the filter type.
          • accountfilter: References the account filter to be used. It provides the subaccount filter with the list of main accounts. If you use the subaccount filter, ensure that you enter a value in this property.

          UIMapping

          Includes information on how data is shown in a report. You can configure a report to be shown as flatlists, scorecards, or charts.

           
          Loading
          Salesforce Help | Article