SOLVED

Group records by email domain and date

Go to solution
Anonymous
Not applicable

Group records by email domain and date

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

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Group records by email domain and date

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.

View solution in original post

5 REPLIES 5
Josh_Hill13
Level 10 - Champion Alumni

Re: Group records by email domain and date

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.

Anonymous
Not applicable

Re: Group records by email domain and date

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

SanfordWhiteman
Level 10 - Community Moderator

Re: Group records by email domain and date

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?).

Anonymous
Not applicable

Re: Group records by email domain and date

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

SanfordWhiteman
Level 10 - Community Moderator

Re: Group records by email domain and date

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.