4 Replies Latest reply on Dec 21, 2018 11:28 AM by Sanford Whiteman

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

    Victor Herrero

      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!

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

          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?

          1 of 1 people found this helpful
            • Re: Is there a way to see the code behind our smart campaigns?
              Victor Herrero

              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.

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

                  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.

                  1 of 1 people found this helpful
                  • Re: Is there a way to see the code behind our smart campaigns?
                    Sanford Whiteman

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

                    1 of 1 people found this helpful