SOLVED

Re: Is there a way to see the code behind our smart campaigns?

Go to solution
Victor_Herrero
Level 5

Is there a way to see the code behind our smart campaigns?

Is it possible to actually see the code that is being generated with smart campaigns, triggers, filters and flow steps...? Velociscript perhaps? Or whatever language it is...

Thanks!

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Is there a way to see the code behind our smart campaigns?

Velociscript perhaps? Or whatever language it is...

Ah, no. (Velocity -- Velocity Template Language -- is used for email output, not SC logic.)

You seem to be coming in with an assumption that isn't supported by the available evidence. At least as far as any of us can reason, SCs aren't compiled down to a single standalone runnable language, They're rulesets that are interpreted by a wide set of components at runtime. Those components use various high-level languages (SQL, Java, PHP, mustache-type token substitution, etc.) to process the elements of the ruleset.  Maybe there's true dynamic code generation at some points, but you're largely talking about data being fed into already-compiled code. You can call that data a DSL (domain-specific language) I suppose, but I don't know what that gets you.

Unless you mean the way the UI reads & stores Smart Campaigns as JSON (which is only scratching the surface and could be read using Dev Tools, though it's strongly subject to change since it's an internal API).

What are you actually trying to achieve?

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Is there a way to see the code behind our smart campaigns?

Velociscript perhaps? Or whatever language it is...

Ah, no. (Velocity -- Velocity Template Language -- is used for email output, not SC logic.)

You seem to be coming in with an assumption that isn't supported by the available evidence. At least as far as any of us can reason, SCs aren't compiled down to a single standalone runnable language, They're rulesets that are interpreted by a wide set of components at runtime. Those components use various high-level languages (SQL, Java, PHP, mustache-type token substitution, etc.) to process the elements of the ruleset.  Maybe there's true dynamic code generation at some points, but you're largely talking about data being fed into already-compiled code. You can call that data a DSL (domain-specific language) I suppose, but I don't know what that gets you.

Unless you mean the way the UI reads & stores Smart Campaigns as JSON (which is only scratching the surface and could be read using Dev Tools, though it's strongly subject to change since it's an internal API).

What are you actually trying to achieve?

Victor_Herrero
Level 5

Re: Is there a way to see the code behind our smart campaigns?

As usual, I am curious about how my campaigns would translate into code and use that as an opportunity for learning.

What I understood from what you say is that although smart lists and flow steps in smart campaigns look like "if so, then do that" instructions (so basic if statements) they are actually used as variables and rules inside the Marketo backend, meaning that no code is really generated and if we were to look at any it would have to be Marketo's own and how it works with our input.

Unless the jason file is always generated and is "easy to digest" for me. That could also be good for me.

Josh_Hill13
Level 10 - Champion Alumni

Re: Is there a way to see the code behind our smart campaigns?

They are translated to SQL queries on the backend. If you get a rare error, you can sometimes see the code in the browser.

If you want to know SQL or related languages, it might be good to find a course or download mysql.

SanfordWhiteman
Level 10 - Community Moderator

Re: Is there a way to see the code behind our smart campaigns?

What I understood from what you say is that although smart lists and flow steps in smart campaigns look like "if so, then do that" instructions (so basic if statements) they are actually used as variables and rules inside the Marketo backend, meaning that no code is really generated and if we were to look at any it would have to be Marketo's own and how it works with our input.

Correct. It's called a rules engine and you can Google for lots of different design approaches.  Also learn about DSLs as they are closely linked (DSL = business-specific dialect for declaring and saving rules, engine = app that understands the DSL).