Group records by email domain and date | Community
Skip to main content
Aug 23, 2017 3:35 PM UTC
Solved

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Aug 23, 2017 9:29 PM UTC

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.

5 replies

Josh_Hill13
Level 10
Aug 23, 2017 4:25 PM UTC

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.

Translate
Aug 23, 2017 8:14 PM UTC

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

Translate
SanfordWhiteman
Level 10
Aug 23, 2017 8:41 PM UTC

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

Translate