SOLVED

How to get an Email Program's smart list id?

Go to solution
lukea
Level 3

How to get an Email Program's smart list id?

Dear community,

 

When creating an email program, you often define its audience using a smart list
myemailprogram
Clicking on the number of people in the audience section opens a new browser tab with the people in that smart list - the url will look like https://app-nld123.marketo.com/?satellite=1#SL12345A1!  . Is there a way to get the smart list id 12345 programmatically, in order to query it for the members? I've tried to get smart lists by program folder ids, but this does not seem to include these "hidden" assets.

 

Goal: I want to determine audience sizes for several email programs, before the sends happen, in batch and without going into each program manually. (Maybe there's another way?)

 

Thanks! πŸ™‚

2 ACCEPTED SOLUTIONS

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: How to get an Email Program's smart list id?

Sorry to butt in, but it’s not hidden and it’s not temporary!

https://{{munchkinId}}.mktorest.com/rest/asset/v1/program/{{programId}}/smartList.json

 

View solution in original post

lukea
Level 3

Re: How to get an Email Program's smart list id?

6 REPLIES 6
AWmindtree
Level 4

Re: How to get an Email Program's smart list id?

Hi @lukea 
With my believe, you'll not be able to get the system created smart list under a program via api.
Workaround- You can create a Local Smart list under that program and add filters. Then use it in Email Program Smart List like "Member of Smart List- (Your Local Smart List Name)".
Then fetch the local Smart List with the below endpoint:
https://XXX-XXX-XXX.mktorest.com/rest/asset/v1/folder/{id}/content.json?type=Program

Let me know if that works.

Thanks

lukea
Level 3

Re: How to get an Email Program's smart list id?

Thanks. Yup, that's how I currently do it. I hoped there might be a "direct" solution, maybe undocumented. (Also because the setup is not under my full control - some folks set it up in program, not as a separate asset.) I will leave this open for a few days, and "mark as correct" if no other ideas pop up. 

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: How to get an Email Program's smart list id?

AFAIK you're not able to query the system SL as they aren't saved. This is contrary to campaigns, wherein you can query even the background campaigns (along with the user-created campaigns), as unlike the SLs, they stay associated with the program. It's always best to create an SL in the cloneable program template itself.

 

 

lukea
Level 3

Re: How to get an Email Program's smart list id?

Understood, I was not aware of the temporary character of these lists. Thanks for clarifying.

SanfordWhiteman
Level 10 - Community Moderator

Re: How to get an Email Program's smart list id?

Sorry to butt in, but it’s not hidden and it’s not temporary!

https://{{munchkinId}}.mktorest.com/rest/asset/v1/program/{{programId}}/smartList.json

 

lukea
Level 3

Re: How to get an Email Program's smart list id?