Meliorainsights.com
  • Home
  • Tableau CRM
  • Field Notes
  • Non-Profits
  • Our Clients
  • About
  • Home
  • Tableau CRM
  • Field Notes
  • Non-Profits
  • Our Clients
  • About
Search

Meliora Insights, LLC

​Data Cloud | CRM Analytics  (TCRM / Einstein Analytics) Consulting
​meliora - 'for the pursuit of the better'


A blog series distilling quantitative concepts /use-cases in CRM Analytics  (Einstein Analytics).

Picture

recipe formula format  and whoID & whatId...etc..

2/20/2024

0 Comments

 
User Story: As a user, I need to know tally any tasks (call, email, meeting, etc) that was done in a certain period. I  also want to know whether the source of the email, call,etc was the oppty, account, contact or lead object.
  
Solution: Ingest the Task and/or Event objects and use the whoId and WhatId fields to join to the above 4. These 2 fields in the task and event are 'polymorphic'-- which means its purpose changes to what object it is connected to. (In object oriented programming, a command 'animal.move' is said to be polymorphic since I means crawl for a snake or fly  for a bird.. but I digress). To this point,  whatId can either augment to an account or opportunity... WhoId can be augmented to either a lead or a contact. More documentation here from saleForceBen... https://www.salesforceben.com/what-is-the-difference-between-whoid-and-whatid/

After joining the 4 objects into the task (left grain), we can then use a case statement in the recipe to label each row in task--whether the taks is from an oppty, acct, lead or contact. Here is the saql.

case 
when WhoId is null and "opty.Id" is not null then 'Opty'
when WhoId is null and "opty.Id" is null then 'Acct'
when WhoId is not null and "Lead.Id" is not null then 'Lead'
when WhoId is not null and "Lead.Id" is null then 'Contact'  end




Picture
0 Comments



Leave a Reply.

Site powered by Weebly. Managed by Hostwinds
  • Home
  • Tableau CRM
  • Field Notes
  • Non-Profits
  • Our Clients
  • About