Creating smart lists via API | Community
Skip to main content
Level 2
April 11, 2025
Solved

Creating smart lists via API

  • April 11, 2025
  • 5 replies
  • 1310 views

In our team, campaign planning happens in Salesforce where details about the url being tracked are entered. These url's then needs to be used to create the Smart lists in marketo. This process is error prone & time consuming. I would like to be able to create a utility that will be a Marketers assistant that will take the URL from Salesforce and generate the Marketo Smart List.

I read that this isn't possible today. Is this on the product roadmap by any chance?

Best answer by SanfordWhiteman

Any idea why Marketo doesnt have a "ends with" clause?:


“Ends with” (i.e. LIKE '%ABC') is impossible to optimize in standard SQL.

 


Also, is there a way to read the smart campaign and the filter criteria via API? I know its possible to export the data via bulk export API but I am looking for something that allows be to only fetch for one campaign

Yes, you can read the rules using the Smart Lists REST API endpoint.

5 replies

SanfordWhiteman
Level 10
April 11, 2025

Not on any roadmap I’ve seen. But I’m not really clear what you mean by “URLs needs to be used to create the Smart List”. Can you please give a real-world example w/screenshots? Maybe there’s a better way.

SanfordWhiteman
Level 10
April 15, 2025

@milricks please return to your thread and check responses.

Level 2
April 15, 2025

Hi @milricks Could you please respond to the queries below so I can assist further?

 

- Are all the tracking URLs stored in a custom field on Salesforce Campaigns?

- Is there a fixed naming convention or structure for these URLs?

- Do you want this to create the Smart Lists directly in Marketo, or just output the logic for manual use?

 

Thanks

 

 

milricksAuthor
Level 2
May 2, 2025

Hello Reetu - 

Yes, you are correct. The url is stored in a custom field in Salesforce Campaign. Salesforce Campaign is the Campaign request form. For example, if I want to track all page visits to a page with url www.ThisIsATest.com,  then requester will create a campaign request in Salesforce Campaign, and will enter the url to be tracked in a custom field.

The way it works now is that a Marketo analyst needs to manually take this url and setup a smart list as part of a Marketo program that will capture campaign members. These will then be synced to SF. For every Salesforce campaign there is an equivalent Marketo Program which in turn has a smart list.
The problem with the manual approach is that it is time consuming and also error prone because if the marketo analyst doesnt setup the smart list correctly, it will lead to less or more campaign members being created.

 

Any idea why Marketo doesnt have a "ends with" clause?

Also, is there a way to read the smart campaign and the filter criteria via API? I know its possible to export the data via bulk export API but I am looking for something that allows be to only fetch for one campaign

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
May 2, 2025

Any idea why Marketo doesnt have a "ends with" clause?:


“Ends with” (i.e. LIKE '%ABC') is impossible to optimize in standard SQL.

 


Also, is there a way to read the smart campaign and the filter criteria via API? I know its possible to export the data via bulk export API but I am looking for something that allows be to only fetch for one campaign

Yes, you can read the rules using the Smart Lists REST API endpoint.

SanfordWhiteman
Level 10
April 16, 2025

@milricks again, please return to your thread and check responses from our volunteer community members.

SanfordWhiteman
Level 10
April 29, 2025

@milricks again, please return to your thread and check responses from the community.