Is it possible to create aggregate fields | Community
Skip to main content
March 3, 2016
Solved

Is it possible to create aggregate fields

  • March 3, 2016
  • 1 reply
  • 1676 views

I was wondering if it is possible to create custom, aggregate fields on an object. I am hoping to be able to access these fields via the API (preferably through the LeadChanges API). If these fields are standard on Leads, that works, too. I must've just missed them

  • LastEmailOpenDate - Date/Time that the Lead most recently opened an email
  • LastEmailSendDate - Date/Time that the Lead was most recently sent an email
  • LastClickDate - Date/Time that the lead clicked a link in an email

Thanks for the help!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Grégoire_Miche2

Hi Zack,

These ones are not aggregates, rather the outcomes of activities. Create these 3 fields, type datetime. Then create 3 triggered smart campaign in you data management program (if you do not have a data management program, create one, it will be handy on the long term )

  1. Campaign 1. Trigger: "Opens email". Flow step: "Change data value", attribute: LastEmailOpenDate, new value {{system.datetime}}
  2. Campaign 2. Trigger: "Email is delivered". Flow step: "Change data value", attribute: LastEmailSendDate, new value {{system.datetime}}. Unfortunately, on this one, we do not have an "email is sent" trigger
  3. Campaign 3. Trigger: "Clicks link in email". Flow step: "Change data value", attribute: LastEmailClickDate, new value {{system.datetime}}

-Greg

1 reply

Grégoire_Miche2
Grégoire_Miche2Accepted solution
New Participant
March 3, 2016

Hi Zack,

These ones are not aggregates, rather the outcomes of activities. Create these 3 fields, type datetime. Then create 3 triggered smart campaign in you data management program (if you do not have a data management program, create one, it will be handy on the long term )

  1. Campaign 1. Trigger: "Opens email". Flow step: "Change data value", attribute: LastEmailOpenDate, new value {{system.datetime}}
  2. Campaign 2. Trigger: "Email is delivered". Flow step: "Change data value", attribute: LastEmailSendDate, new value {{system.datetime}}. Unfortunately, on this one, we do not have an "email is sent" trigger
  3. Campaign 3. Trigger: "Clicks link in email". Flow step: "Change data value", attribute: LastEmailClickDate, new value {{system.datetime}}

-Greg

SanfordWhiteman
New Participant
March 4, 2016

Just being needlessly pedantic, and this is all in fun, but those are aggregate fields in the RDBMS sense. That is, MAX(LastEmailOpenDate) is as much an aggregate as SUM(LastEmailOpenDate) in that they both use a group as input.

Grégoire_Miche2
New Participant
March 5, 2016

Hi Sanford,

Yes, you are right , but the way they are calculated in Marketo is not...

-Greg