Loading
Salesforce now sends email only from verified domains. Read More
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
          Referencing Variables

          Referencing Variables

          Depending on the scope of a KPI, you can reference a promotion or a tactic variable in a formula.

          Required Editions

          Available in: Lightning Experience

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

          If the scope of a KPI is Promotion, Promotion Tactic, or Payment Tactic, the KPI can reference the Promotion object. Define the fields of the Promotion object in the Promotion__c.CalculationVariables fieldset. For example, if you have a Phase__c field, then you can add the Promotion object as the input parameter in a formula.

          Promotion as Variable
          Promotion as Variable
          {
              "name": "myExampleKPI",
              “scope”: “promotion”,
              "type": "calculated",
              "formula": "(MyKpi1, MyKpi2, Promotion) => { if Promotion.phase === 'Planning') return MyKpi1; else return MyKpi2}",
          }

          (MyKpi1, MyKpi2, Promotion) => { if Promotion.phase === 'Planning') returns MyKpi1; else return MyKpi2}

          If the scope of a KPI is Promotion Tactic or Payment Tactic, use the Tactic object as the input parameter in a formula. Define the fields of the Tactic object in the Tactic__c.CalculationVariables fieldset.

          Tactic as Variable
          Tactic as Variable
          {
              "name": "myReferencedKPI",
              "type": "read",
              "aggregation": {
                  "rule": "sum"
              },
              "totalcalculation": {
                  "rule": "sum"
              },
              ...
          }, {
              "name": "myExampleKPI",
              “scope”: “promotiontactic”,
              "type": "calculated",
              "formula": "(myReferencedKPI, Tactic) => { return myReferencedKPI / Tactic.lift;}",
              "aggregation": {
                  "rule": "sum"
              },
              "totalcalculation": {
                  "rule": "sum"
              },
              ...
          }
           
          Loading
          Salesforce Help | Article