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
Solved! Go to Solution.
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.
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.
or using the SDK to group records? or even with the SDK is not possible?
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?).
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.