1"use strict";(globalThis.webpackChunksaas_docs=globalThis.webpackChunksaas_docs||[]).push([[735],{8489(e,n,s){s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>l,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"conditional-emails","title":"Conditional Emails","description":"Send different emails based on form responses \u2014 add conditions to email different people based on form answers. For example, send different confirmation emails depending on the plan a user selects, or route notifications to different teams.","source":"@site/products/formmailer/conditional-emails.md","sourceDirName":".","slug":"/conditional-emails","permalink":"/formmailer/conditional-emails","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":6,"frontMatter":{"sidebar_position":6},"sidebar":"formmailerSidebar","previous":{"title":"Placeholders","permalink":"/formmailer/placeholders"},"next":{"title":"Notifications","permalink":"/formmailer/notifications"}}');var t=s(4848),r=s(8453);const l={sidebar_position:6},d="Conditional Emails",o={},c=[{value:"How Conditional Emails Work",id:"how-conditional-emails-work",level:2},{value:"Setting Up Conditions",id:"setting-up-conditions",level:2},{value:"Operators",id:"operators",level:2},{value:"Examples",id:"examples",level:2},{value:"Different Emails by Plan",id:"different-emails-by-plan",level:3},{value:"Event Type Routing",id:"event-type-routing",level:3},{value:"Multiple Conditions",id:"multiple-conditions",level:2},{value:"Fallback Template",id:"fallback-template",level:2}];function a(e){const n={admonition:"admonition",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"conditional-emails",children:"Conditional Emails"})}),"\n",(0,t.jsx)(n.p,{children:"Send different emails based on form responses \u2014 add conditions to email different people based on form answers. For example, send different confirmation emails depending on the plan a user selects, or route notifications to different teams."}),"\n",(0,t.jsx)(n.h2,{id:"how-conditional-emails-work",children:"How Conditional Emails Work"}),"\n",(0,t.jsxs)(n.p,{children:["You can create ",(0,t.jsx)(n.strong,{children:"rules"})," that match specific form answers. When a submission matches a rule, Form Mailer sends the corresponding template instead of the default one. You can create ",(0,t.jsx)(n.strong,{children:"multiple rules per form"}),", each with its own conditions and templates."]}),"\n",(0,t.jsx)(n.h2,{id:"setting-up-conditions",children:"Setting Up Conditions"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Open the Form Mailer sidebar on your form"}),"\n",(0,t.jsxs)(n.li,{children:["Go to the ",(0,t.jsx)(n.strong,{children:"Conditions"})," tab"]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Add Condition"})]}),"\n",(0,t.jsx)(n.li,{children:"Configure:"}),"\n"]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Question"})}),(0,t.jsx)(n.td,{children:"The form question to check"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Operator"})}),(0,t.jsx)(n.td,{children:"How to compare (equals, contains, etc.)"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Value"})}),(0,t.jsx)(n.td,{children:"The value to match against"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Template"})}),(0,t.jsx)(n.td,{children:"The email template to send when matched"})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"operators",children:"Operators"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Operator"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Example"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"equals"})}),(0,t.jsx)(n.td,{children:"Exact match"}),(0,t.jsxs)(n.td,{children:["Plan ",(0,t.jsx)(n.code,{children:"equals"}),' "Enterprise"']})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"not equals"})}),(0,t.jsx)(n.td,{children:"Does not match"}),(0,t.jsxs)(n.td,{children:["Status ",(0,t.jsx)(n.code,{children:"not equals"}),' "Cancelled"']})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"contains"})}),(0,t.jsx)(n.td,{children:"Includes the text"}),(0,t.jsxs)(n.td,{children:["Comments ",(0,t.jsx)(n.code,{children:"contains"}),' "urgent"']})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"starts with"})}),(0,t.jsx)(n.td,{children:"Begins with the text"}),(0,t.jsxs)(n.td,{children:["Name ",(0,t.jsx)(n.code,{children:"starts with"}),' "Dr."']})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"is empty"})}),(0,t.jsx)(n.td,{children:"No answer provided"}),(0,t.jsxs)(n.td,{children:["Phone ",(0,t.jsx)(n.code,{children:"is empty"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"is not empty"})}),(0,t.jsx)(n.td,{children:"Answer was provided"}),(0,t.jsxs)(n.td,{children:["Phone ",(0,t.jsx)(n.code,{children:"is not empty"})]})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,t.jsx)(n.h3,{id:"different-emails-by-plan",children:"Different Emails by Plan"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Condition"}),(0,t.jsx)(n.th,{children:"Template"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsxs)(n.td,{children:["Plan ",(0,t.jsx)(n.code,{children:"equals"}),' "Free"']}),(0,t.jsx)(n.td,{children:"Free plan welcome email"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsxs)(n.td,{children:["Plan ",(0,t.jsx)(n.code,{children:"equals"}),' "Pro"']}),(0,t.jsx)(n.td,{children:"Pro plan welcome with setup link"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsxs)(n.td,{children:["Plan ",(0,t.jsx)(n.code,{children:"equals"}),' "Enterprise"']}),(0,t.jsx)(n.td,{children:"Enterprise welcome with onboarding calendar link"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"event-type-routing",children:"Event Type Routing"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Condition"}),(0,t.jsx)(n.th,{children:"Template"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsxs)(n.td,{children:["Event Type ",(0,t.jsx)(n.code,{children:"equals"}),' "Workshop"']}),(0,t.jsx)(n.td,{children:"Workshop details + materials list"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsxs)(n.td,{children:["Event Type ",(0,t.jsx)(n.code,{children:"equals"}),' "Webinar"']}),(0,t.jsx)(n.td,{children:"Webinar link + calendar invite"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsxs)(n.td,{children:["Event Type ",(0,t.jsx)(n.code,{children:"equals"}),' "Conference"']}),(0,t.jsx)(n.td,{children:"Conference agenda + travel info"})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"multiple-conditions",children:"Multiple Conditions"}),"\n",(0,t.jsxs)(n.p,{children:["You can add multiple conditions to a single rule using ",(0,t.jsx)(n.strong,{children:"AND"})," / ",(0,t.jsx)(n.strong,{children:"OR"})," logic:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"AND"}
1)," \u2014 all conditions must match"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"OR"})," \u2014 at least one condition must match"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Example:"}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:["Plan ",(0,t.jsx)(n.code,{children:"equals"}),' "Enterprise" ',(0,t.jsx)(n.strong,{children:"AND"})," Region ",(0,t.jsx)(n.code,{children:"equals"}),' "EU" \u2192 Send EU Enterprise welcome email']}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"fallback-template",children:"Fallback Template"}),"\n",(0,t.jsxs)(n.p,{children:["When no conditions match, Form Mailer sends the ",(0,t.jsx)(n.strong,{children:"default template"}),". Always configure a default to ensure every respondent receives an email."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"Conditions are evaluated in order from top to bottom. The first matching rule wins. You can drag to reorder rules in the sidebar. Remember, you can create multiple rules per form to handle different notification scenarios."})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},8453(e,n,s){s.d(n,{R:()=>l,x:()=>d});var i=s(6540);const t={},r=i.createContext(t);function l(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.