I suggest you ...

expand the support for conditionals to include API tags

For instance, if I have a message field defined in code as follows:

List<MessageFieldObject> fields = new ArrayList<MessageFieldObject>();

// add message fields
MessageFieldObject field = of.createMessageFieldObject();
field.setType("html");
field.setName("foo");
field.setContent("hello");
fields.add(field);

in my message template, I would like to be able to use the field as such:

{dynamic_code}
{if $#foo neq ""}%%#foo%%{/if}
{/dynamic_code}

66 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    SeanSean shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Kara SheilKara Sheil commented  ·   ·  Flag as inappropriate

        I think this is exactly the functionality that we are looking for as well. Question to Bronto Support: Is there a plan for the future for us to be able to evaluate our custom variables within an email to create the if/then scenarios? It seems you can with Bronto's static variables.

        We were looking for a way to compare the values of two custom variables, and if they were equal, then display a certain graphic on the page, if not equal display a different graphic. The answer received from support was "We unfortunately do not have the ability to compare two different fields to see if they match. Your best option would be to code this logic on your end while using the API to pull the field values, compare them and decide what content you should populate back to an API triggered delivery in order to populate API Message Tags.

        Otherwise you'd have to use our Dynamic Content feature in conjunction with segments. But, even then, with segments, you would only be able to compare one specific date value per segment (not ideal) or compare date values with things like date is 'TODAY', or 'YESTERDAY' for example, which would probably not work in your situation.

        For now we handled this externally from the template which hurts our marketing team and the transactional email templates lose their power. Now if they want a change it is a request to the development team for the code feeding the template and not just a more simple template change directly.

        If this is a separate issue from what Sean initially requested back in 2011, then let me know and I will start a new post.

      • JoeJoe commented  ·   ·  Flag as inappropriate

        As a programmer, I want to send the most amount of data to my marketing group so they can use it any way they see fit. Currently, with API tags, if I send them a blank tag, there is no programmatic way to suppress blank api tags in the message. So they can't hide the text that would surround the API tag where I, for instance, send the size, even though not all products have size.

      Feedback and Knowledge Base