Group records by email domain and date | Community
Skip to main content
August 23, 2017
Solved

Group records by email domain and date

  • August 23, 2017
  • 1 reply
  • 3175 views

Hi guys,

I'm trying to get a list of leads based on their email domain but the rule should apply for the count of records. So if in a period of time (weeks or months) there are more than X number of different records with the same email domain, add them to a list.

It is possible?

Regards,

Raúl

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 SanfordWhiteman

With the API is not possible to use Linq and group by domain or something like that?


There's no server-side group by or distinct.

Any .NET function that does this must emulate it client-side by retrieving *all* records into a temporary structure, then filtering -- a massive amount of work to throw away after each use. At that point you'd be much better off committing to syncing to SQL and having actual server-side queries to run whenever.

1 reply

Josh_Hill13
New Participant
August 23, 2017

This is not possible within Marketo.

You should extract the larger list and use excel to filter, then re-upload the emails to the static list.

August 23, 2017

or using the SDK to group records? or even with the SDK is not possible?

SanfordWhiteman
New Participant
August 23, 2017

No, not with the API. Even if you had a custom field for the domain (a prerequisite in any case) you could get leads for a particular domain, but there's not a "select distinct domain" command.

But you can do this with a webhook. On every new lead, parse and add their domain to a counter. Then once a day run a batch to get those leads whose domain counter is over some max count and add them to your list (which I assume is an ABM effort, right?).