Zephr User Guide

Create a Name Check Sub Rule

18 views 0

When a registered user has viewed two pieces of content and has not already supplied us with their first name, we want to ask them to provide it. To do this, we need to build a data capture form outcome. For this example, we use a sub rule to build the data capture form that checks whether we already have the registered user’s first name and displays the form if we don’t.

Note: Sub rules are useful when you need to manage complex journeys. For further information on using sub rules, see the Simplify User Journeys with Sub Rules section.

To build the data capture form in a sub rule, complete the following steps:

  1. If necessary, navigate to the feature we used for our Anonymous and Registered user types as follows:
    1. Select Products from the main menu
    2. Select Features from the menu options
    3. Select the Article feature
    4. Select the version to update

      The rules builder displays

  2. Select the circle beneath Registered in the user type selector bar

    A blank canvas displays.

  3. Add a sub rule, as follows:
    1. Select the Sub Rules segment title from the decision bar
    2. Drag the Sub Rule outcome to the rules canvas

      The Sub Rule dialog box displays, as illustrated below:

      Sub Rule

    3. Enter Name Check in the Title text box
    4. Select the Save button

      A blank sub rule canvas displays as illustrated below:

      Sub Rule Canvas

  4. Select the User segment title from the decision bar
  5. Drag the User Attribute decision node to the sub rule canvas

    The User Attribute dialog box displays, as illustrated below:

    User Attribute

    Complete this dialog box as follows:

    1. Select First Name (Text) from the User Attribute menu

      A further field displays, as illustrated below:

      User Attribute - Condition

    2. Select Is Empty from the Condition menu
    3. Select the Save button

      The User Attribute decision node is added to your sub rule canvas.

      For further information on the User Attribute decision node, see the User topic.

  6. Add an output option for registered users that have already supplied their first name as follows:
    1. Select the Sub Rules segment title from the decision bar
    2. Drag the Output Option decision node to your sub rule canvas

      The Output Option dialog box displays, as illustrated below:

      Output Option

    3. Enter Name Provided in the Title text box
    4. Select the Save button

      The output option is added to your sub rule canvas.

  7. Add a data capture form outcome to collect the first name from registered users that have not supplied their first name as follows:
    1. Select the Outcome segment title from the decision bar
    2. Select Add Outcome

      The Add an Outcome screen displays.

    3. Enter Data Capture Form in the Title text box
    4. Select the Add A New Form Or Custom Component Block button
    5. Select the Add button under the Form heading
    6. Select the Data Capture radio button under the Type options

      The Title text box is pre-filled with Data Capture Form. You can edit this if required.

    7. Select the Add A User Attribute button

      The Add a User Attribute dialog box displays, as illustrated below:

      Add a User Attribute

    8. Select the Add button at the end of the First Name row

      The First Name user attribute is added to your form.

    9. Select the Required toggle
    10. Select the Save button

      The Edit an Outcome screen displays.

    11. Select the Save button

      Your Data Capture Form outcome is added to the decision bar.

    12. The outcome is added to your sub rule canvas.

  8. Drag the Data Capture Form outcome to your sub rule canvas
  9. Connect your sub rule as follows:
    1. Drag from the white circle under the Start Sub Rule node to the Is Empty User Attribute decision node
    2. Drag the Yes node from the User Attribute decision node to the Data Capture Form outcome
    3. Drag the No node to the Name Provided output option

      Your rule looks similar to the following:

      Sub Rule - complete

    4. Select the Done button to return to the main rules canvas

    Your sub rule displays in your main rule as a pink box with a Name Provided node that you can connect to the rest of your rule.

    We continue building the rule with a further trial. To do this, we can follow the instructions in the Create Your Trial topic from the end-to-end example.

    Note: As we now have two trials on the Registered canvas, by default both use the Article default registered tracker. If you want to use different consumption trackers for these trials, select the Consumption Tracker button and define the tracker you want to use, as described in the Access topic.

    After we have added the further trial, we build a paywall to allow registered users to subscribe to a product and become a customer. To do this, follow the instructions in the Create Your Payment Form Outcome from the end-to-end example.