Inserting Rules for Conditional Content in a Template


This is the second of two related demos:

 

- Adding Merge Fields to a Template

- Inserting Rules for Conditional Content in a Template

 

The two-part demo shows how to create a treatment template inviting customers to a tradeshow. It uses conditional content to determine the geographic location of each recipient, and to invite them to the closest show.

 

In this second  part, you open the template that you created in the first part, and you insert rules to invite customers to one of three tradeshows.


Steps:

  1. Locate the Tradeshow Template you created in the first part of the demo.

     

    Click an entry in the Tradeshow Template row.

    Step 1
  2. Click the Actions menu.

    Step 2
  3. Click the Edit list item.

    Step 3
  4. The tradeshows are being held in San Francisco, Seattle, and Las Vegas. You will add rules to decide where to invite each recipient, based on their state of residence.

     

    Position your cursor on a new line under the invitation text.

     

    Click the button to the right of the Rule Condition field.

    Step 4
  5. Click the If list item.

    Step 5
  6. Click the button to the right of the Merge Fields field.

    Step 6
  7. Click the scrollbar.

    Step 7
  8. Click the State list item.

    Step 8
  9. Click the button to the right of the Operators field.

    Step 9
  10. Click the Is equal to list item.

    Step 10
  11. Click the Insert button.

    Step 11
  12. You have begun the first rule.

    Step 12

  13. Here, you can either:

    • insert text directly, or

    • insert a placeholder for a pre-defined block of content.

     

    In this demo, you insert a placeholder.

     

    Use the mouse to position your cursor to the left of $(endif) and click.

    Step 13
  14. Click the button to the right of the If field.

    Step 14
  15. Click the Insert block list item.

    Step 15
  16. Click the Insert button.

    Step 16
  17. You have inserted a block in the rule.

     

    You now replace the two variables with the values to use. You will enter the State to test for, and the name of the block to insert.

    Step 17

  18. In the If statement, select the string between the quotation marks, but do not select the quotation marks themselves.

     

    Enter the desired information into the field. Enter

     a valid value
     e.g.
     "California"
    .

    Step 18
  19. In the InsertBlock statement, select the string between the quotation marks, but do not select the quotation marks themselves.

     

    Enter the desired information into the field. Enter

     a valid value
     e.g.
     "SFO"
    .

    Step 19
  20. Now you create the block of text to insert in place of SFO.

     

    First make a new line in the template. Position the cursor at the end of the line.

     

    Press [Enter].

    Step 20
  21. Click the button to the right of the Insert block field.

    Step 21
  22. Click the Create block list item.

    Step 22
  23. Click the Insert button.

    Step 23
  24. In the DefineBlock statement, select the string between the quotation marks, but do not select the quotation marks themselves.

     

    Enter the desired information into the field. Enter

     a valid value
     e.g.
     "SFO"
    .

    Step 24
  25. Now you make a place in your template to enter a definition of SFO.

     

    Use the right arrow key to position your cursor between the close parenthesis and the dollar sign.

     

    Press [Right].

    Step 25
  26. Start a new line.

     

    Press [Enter].

    Step 26
  27. Enter the address for the San Francisco show:

     

    Moscone Center

    747 Howard Street

    San Francisco, CA 94103

     

    Press [Enter].

    Step 27
  28. You have completed the definition of the SFO block.

     

    To invite customers to the other shows you repeat the previous steps using Washington state and SEA for Seattle and Nevada state and LAS for Las Vegas.

     

    The next frame shows the results.

    Step 28

  29. Use the CreateBlock as you did for SFO, to define addresses for the Seattle and Las Vegas shows.

     

    The next frame shows the results.

    Step 29

  30. Click the Save button.

    Step 30

You began with a template that merged in the name of every recipient.

 

Then, you inserted rules to check each recipient's location and invite them to the tradeshow in the corresponding city.

 

This concludes the demo.

Table of Contents  Start Topic