How do I add or edit rules for lead capture?

Parsing rules help Cloze automatically extract key details—like names, emails, and property info—from lead emails and organize them in the right fields.

Types of Rules:

  • Text Rules - Text rules extract values from message text.
  • Header Rule - Extract a field out of one of the email's headers
  • HTML Rule - Extract a field out of the HTML Body
  • HTML Metadata Rule - Extract a field out of the HTML meta fields
  • Copy Rule - Copy the value from another rule result.
  • Constant Rules - Use a predefined value such as a segment, tag, or custom field.

Advanced Rule Settings:

  • Output Mappings - Map values pulled from the email to the correct field and value used in your Cloze account. Output mappings can be applied to rules.

In order to add or edit rules, you are:


1.) With the lead source open in Cloze, tap on "Edit" next to Parsing Rules.

When you first open the Parsing Rules, Cloze will show you all the fields that were auto-detected. There could be many fields or only a few fields; not all of them may be relevant to the information you need to capture.

Cloze will automatically map the following fields:

  • name  - full name (first and last together)
  • first  - first name (will be combined with last name)
  • last  - last name (will be combined with first name)
  • email  - email address for lead
  • phone  - phone number for lead
  • notes  - about notes

Edit a Rule or Add a Rule

  1. If you need to update a Rule, tap on the three dots next to the rule.
  2. If you need to Add a Rule, tap on Add.



Text Rules

1. Common Settings for All Rules

  • Field: This is the Cloze field where you want the lead data to go—like name, email, phone, or notes.
    • Example: If the lead email includes a name, map it to the "Full Name" field in Cloze so it shows up correctly in the contact profile.
    • Why It Matters: Cloze uses these field names behind the scenes to organize your data. Some fields, like name and email, are built-in and automatically recognized—so using the right name ensures your data goes to the right place.
  • Behavior controls what happens if multiple rules try to fill the same field (like “Full Name”).
    • Example: A lead’s name might appear in different spots depending on the source—Cloze needs to know which rule to use.
    • Default Setting: Once Cloze finds a match, it skips any other rules for that field.
    • Advanced Option: You can change this if you want Cloze to keep checking other matching rules—this is rarely needed and typically only used in complex lead formats.

2. Focusing on Text Rules

Text rules help Cloze extract specific information from a lead email by guiding it on where to look and how to know when it’s found the right data.

They’re the most beginner-friendly parsing method and answer these key questions:

  1. What am I looking for? (Search For)

    • Choose a keyword or phrase that appears just before the data you want.
    • Example: If you're extracting a name, the keyword might be "Name:"
  2. Where should Cloze start looking? (Search From)
    • Tell Cloze where to begin its search:
      • Start from the top of the email
      • Start from where the last rule left off
    • Tip: The order of your rules matters!
  1. Which direction should Cloze search? (How to Search)
    • Choose:
      • Forward to find the first match
      • Backward to find the last match
  1. After Cloze finds the keyword, where should it move? (After Search Move To)
    • You can direct Cloze to:
      • Move to the next line
      • Skip blank lines
      • Go to the start of a specific line
  1. What mark's the end of the data? (Search For)
    • Add a keyword that tells Cloze where the field ends, or leave it blank to grab just the next word/line.
  2. How far should Cloze look before stopping? (Stop At)
    • Set a boundary for how far Cloze should search:
      • End of the current line
      • Next blank line
      • The end of the document

3. The "How to Search" Field: Simplified Options

Search Direction Option

Options What it Does
Forward to Match Searches forward through the text and stops at the first time it sees the keyword, anywhere in the line.
Forward to Line Searches forward, but only checks the start of each line (ignores spaces or tabs).
Backward to Match Searches backward through the text to find the last time the keyword appears, anywhere in the line.
Backward to Line Searches backward, but only checks the start of each line.

Case Sensitivity

  • All searches are case-sensitive.
  • Example: Searching for “Name:” will not match “name:” or “NAME:” — capitalization must match exactly.

Advanced Option: Regular Expressions (RegEx)

RegEx is a technical tool for matching patterns in text. If you're experienced with Regular Expressions (RegEx), you can access powerful search options in the advanced menu. If you’re not already familiar with it, it’s best to skip this section—you likely won’t need it for standard lead parsing.


What the Colors Mean in Test Case Previews

When setting up a rule, you'll see colors that help you understand what Cloze is doing:

Name, the field the rule is being set up for, is highlighted in green. Ellen Pickly is the value being captured and it is highlighted in yellow. All other text is gray.

Green (Search Term)
  • This highlights the label or keyword Cloze is looking for.
  • In this example, "Name: " is the search term used to locate the field.
Yellow (Field Value)
  • This is the actual data that will be saved in Cloze—in this case, "Ellen Pickly." It’s what gets filled into the field you’re setting up.
Dark Gray (Outside the Rule)
  • This text isn’t part of the search or the result. It helps give context, but Cloze isn’t looking here for this rule.

Copy Rule (Capturing Duplicate Values for 2 Fields)

A copy rule in parsing doesn’t just refer to duplicating rules between sources—it can also mean reusing a parsed value in multiple fields.

Example: International Lead Capture

Let’s say an email includes a message in French. You want that message to appear in both:

  • The Notes section
  • The Language Detection field (so Cloze can auto-detect it as French)

Instead of writing two separate parsing rules, you can:

  1. Use one rule to pull the message into Notes
  2. Then use a copy rule to automatically place that same message into the Language Detection field

This keeps parsing simple and efficient while supporting fields that share the same input.



Constant Rules

Constant Rules allow you to add a rule capturing data for predefined value such as the headline, tags, or even custom field values.

Examples of fields that can be found under Constant Rules (may differ depending on your account setup) (Note: Range Custom Fields are not supported)

Standard Fields Buyer Profile Fields Details Important Dates Other
  • Name (Full, First, Last)
  • Email
  • Headline
  • Tag(s)
  • Notes
  • Re Property
  • Re Person
  • Property Type
  • Features
  • Location
  • Referred By
  • Do Not Contact
  • Spouse
  • Children
  • Birthday
  • Anniversaries (Wedding, Purchase, Sale)
  • Real Estate Review
  • Create a New Field

Related Article: Adding a Tag to Lead Capture


Add a Constant Rule

  1. To add a Constant Rule:
    1. To Add a Rule, tap on Add.
    2. Tap on Constant Rule.

  1. Setup the rule:
    1. Field: Select the field you want to setup a rule for.
    2. Behavior: Select First Match, Last Match, or Skip Value
    3. Value: Depending on the field you select, you may need to add the value that should be used. (If you select "Tag" under Field, you will need to put the tag that should be added to the contact in the value line.)
    4. Output Mappings: Output mappings tell Cloze how to take something it found in an email and match it to the correct field and value in your account.


Output Mappings

Sometimes, the information in a lead email doesn’t exactly match how things are labeled in your Cloze account. Output mappings tell Cloze how to take something it found in an email and match it to the correct field and value in your account.

Think of it as a translation step: “If the email says THIS, save it in Cloze as THAT.”


Example

You get a lead email that says: Property Type: Duplex

But in Cloze, your picklist only has:

  • Single Family
  • Condo
  • Townhouse
  • Multi-Family

“Duplex” isn’t on the list—so Cloze doesn’t know what to do with it.


With output mapping, you tell Cloze: “Every time you see ‘Duplex,’ treat it as ‘Multi-Family’.” Now Cloze knows exactly where to save that info.

  1. Add a new rule or edit an existing rule. Scroll down to the bottom and under "Output Mappings," tap on the + icon to begin adding mapping values.

  1. Add the Output value mapping and then tap on Save
    1. Map From: This is the value that appears in the lead email. It’s what Cloze is looking for.
    2. Map To: This is the value you want Cloze to save in your account—usually a picklist or segment value that already exists in Cloze.

  1. Continue adding each value and then tap Done.

Example of multiple values listed under Output Mappings
  1. When you are finished adding or editing rules, tap on Done once more.


  1. Save your changes.
    1. (Optional) Tap on "Test" next to Run Tests to test your rules using the test cases that were added.
    2. Tap on Save to save your changes.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.