Meliorainsights.com
  • Home
  • Tableau CRM
  • Blog
  • Non-Profits
  • Our Clients
  • About
  • Trading Studio

​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.

    Archives

    June 2025
    April 2025
    January 2025
    November 2024
    August 2024
    April 2024
    March 2024
    February 2024
    January 2024
    December 2023
    June 2023
    May 2023
    April 2023
    March 2023
    February 2023
    December 2022
    October 2022
    September 2022
    July 2022
    April 2022
    March 2022
    January 2022
    November 2021
    June 2021
    April 2021
    March 2021

Site powered by Weebly. Managed by Hostwinds
  • Home
  • Tableau CRM
  • Blog
  • Non-Profits
  • Our Clients
  • About
  • Trading Studio