You are here:
Guidelines for Requesting Row-Level Formulas
A row-level formula evaluates each record in a report, with the results of the formula shown in each report row. Learn more about row-level formulas to help you request useful formulas from Einstein Report Formula Generation.
Required Editions
| Available in: Lightning Experience. |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions with Einstein 1 Sales Edition and Einstein 1 Service Edition. |
Here are some tips to help with phrasing your requests to Einstein.
- Each report supports one row-level formula.
- Describe the formula you want in simple terms in your natural language.
- Be as specific as you can about the details of the formula.
- Name the fields and functions, if possible, and define your concepts. For example, if you want your formula to contain a logical evaluation, name a function such as IF or CASE.
- Often a question about your business is the best approach. Here are a few examples.
- How many days did it take each opportunity to close?
- Which cases had agent work time less than 10 minutes?
- As defined by a customer satisfaction (CSAT) score, which customers are satisfied or upset?
- Einstein can generate Number, Date, DateTime, Text, or Boolean row-level formula types.
- Einstein can use these types of operators and functions in row-level formulas.
- Math and logical operators (such as +, -, >, <)
- Math functions (such as MAX and MIN)
- Logical functions (such as IF, AND, OR)
- Einstein can’t use aggregation functions, such as SUM, AVG, UNIQUE, and MEDIAN in row-level formulas.
- A row-level formula can't reference bucket fields or summary formulas.
To give you more ideas about how to create useful formulas, here are some common requests and the responses they generate. Keep in mind that your field names can be different than those shown in the table.
| Your Request | Einstein's Response |
|---|---|
| Calculate profit margin as a percentage | This formula calculates the profit margin as a percentage by subtracting the Total Product Amount from the Cost, dividing the result by the Cost, and then multiplying by 100 to convert it into a percentage. (ssot__SalesOrder__dlm.ssot__GrandTotalAmount__c - ssot__SalesOrder__dlm.ssot__Cost__c) / ssot__SalesOrder__dlm.ssot__Cost__c * 100 |
| Create a Full Name field that combines the contact first name and last name fields | This formula combines the contact's first name and last name fields with a space in between to create a full name. ssot__Individual__dlm.ssot__FirstName__c + ' ' + ssot__Individual__dlm.ssot__LastName__c |
| Help me group any opportunity amounts larger than 100,000 as BIG, for amounts that are bigger than 10,000 as MEDIUM, SMALL for the rest. | This formula classifies opportunities based on their amount. It assigns 'BIG' to opportunities with an amount larger than 100,000, 'MEDIUM' to those larger than 10,000 but less than or equal to 100,000, and 'SMALL' to the rest. IF(Opportunity_Sales__dlm.Amount__c > 100000, 'BIG', IF(Opportunity_Sales__dlm.Amount__c > 10000, 'MEDIUM', 'SMALL')) |
| Is the Close Date past due? | This formula checks if the Close Date and Time of an Agent Work record is before today's date, indicating the task is past due. It returns TRUE if the Close Date is in the past, otherwise FALSE. IF(IF(apa_AgentWork__dlm.CloseDateTime__c < TODAY(), TRUE, FALSE), "TRUE", "FALSE") |
| Number of days between start date and close date | Calculates the number of days between the start date (RequestDateTime) and the close date (CloseDateTime). apa_AgentWork__dlm.CloseDateTime__c - apa_AgentWork__dlm.RequestDateTime__c |
| Sum total answer time for each row so that handle time and speed to answer are considered | This formula calculates the total answer time for each row by summing the handle time and speed to answer. apa_AgentWork__dlm.HandleTimeSeconds__c + apa_AgentWork__dlm.SpeedToAnswerSeconds__c |

