# Diamond Equity Investments · Chicago — the HTML shell # Instructions for an agent composing an email. # # Self-contained on purpose. Everything needed to produce a correct branded # email is in this file; you do not need the repository. # # Fetch: https://dei-chicago-email.op-site.net/client # https://dei-chicago-email.op-site.net/team # https://dei-chicago-email.op-site.net/agent.txt (this file) ## 1 · Pick the shell CLIENT — external. Sellers, leads, lenders. Full lockup, the "Just sell it as is" tagline, the postal address and an unsubscribe link. Identical for every agent: a seller should not care which system wrote to them. CAN-SPAM applies, so the address and the opt-out are required, not decorative. TEAM — internal. DEI staff: acquisition managers, transaction coordinators, underwriters. Agent output, handoffs, ops reporting. Compact header that names the sending agent. NO tagline, NO postal address, NO unsubscribe — internal mail is not commercial email, and an opt-out link on staff mail implies a staff member can opt out of being told their appointment moved. ROUTING RULE, derived from the data: in Notion's `Templates (CSA)`, the only three templates without an opt-out footer are exactly the three addressed to an acquisition manager — `Video Testimonial Layer-3`, `Video Testimonial Manager-Alternate-Time`, `Video Testimonial Manager-Confirmed`. They open `Hi {acquisitionsManagerFirstName},`. Those three use the TEAM shell. The other 74 go to a seller and use the CLIENT shell. If you know the recipient, use that. It beats inspecting the body. ## 2 · Normalize the body BEFORE putting it in the shell ⚠️ THIS IS THE STEP THAT IS EASY TO SKIP AND EXPENSIVE TO GET WRONG. The stored templates are NOT HTML. They are plain text with \n line breaks, with a raw

opt-out footer glued onto the end — 74 of the 77 carry one. Dropped into the client shell untouched, every one of them sends: · one run-on paragraph, because plain text has no

tags, and · TWO unsubscribe links, because the shell already provides one. Do all four steps, in this order: 1. STRIP THE LEGACY OPT-OUT. Remove any trailing

containing {optOutLink}, or the phrase "want to receive future emails", or "Unsubscribe here", and any bare whose href is {optOutLink}. The shell owns the opt-out now. 2. IF THE REMAINDER ALREADY CONTAINS A BLOCK TAG —

,

, ,

,
    ,
      ,
    1. ,
      ,
      , 
      — it is real HTML. Do not wrap it, do not escape it, do not second-guess it. 3. IN THAT HTML, CONVERT NEWLINES THAT SIT BETWEEN TEXT into
      . Several templates write

      Best,\nMarcel\nDiamond Equity Investments — Chicago

      Format: {x}\nDetails: {y}

      and HTML collapses those newlines to spaces, so copy written as three lines arrives as one. Convert only a newline with text on its left; leave newlines that sit between tags alone so you do not alter structure. 4. OTHERWISE IT IS PLAIN TEXT. Escape & < > , split on blank lines into paragraphs, turn remaining single newlines into
      , and wrap each paragraph in

      . ## 3 · Fill the shell CLIENT — three slots: {{preheader}} one line, ~90 characters. The grey text after the subject in the inbox list. Leave it empty and the client scrapes the first words of the body instead, which is usually worse. {{{emailBody}}} the normalized body from step 2. Triple brace — raw HTML, not escaped. {{contactId}} the contact's Notion page id. It becomes /email-unsubscribe?id=. An empty value produces an opt-out link that cannot identify anyone. TEAM — three slots: {{agent}} the sending agent's INTERNAL code: CSA, LGA, SMA or LUA. Use LUA, not PUA — PUA is the public name and belongs on client mail. {{preheader}} {{{emailBody}}} Replace EVERY occurrence of each token, not just the first. Each shell documents its own tokens in the comment at its top, so the first occurrence of {{preheader}} is that documentation — a single-occurrence replace substitutes the comment and leaves the real token sitting in the markup. The SUBJECT LINE is an email header, not markup. It is not in either file. ## 4 · Merge tokens do not collide {singleBrace} CSA's own — {sellerName}, {reviewLink}, {acquisitionsManager}, {appointmentDate}, {propertyAddress}, {availableSlots} … {{doubleBrace}} the shell's slots — {{preheader}}, {{agent}}, {{contactId}} Leave CSA's single-brace tokens exactly as they are. They are substituted downstream, after the shell is filled. ## 5 · Check your work before sending · No "{{" remains anywhere outside an HTML comment. · A CLIENT email shows exactly ONE visible Unsubscribe link. Note the href itself contains "email-unsubscribe", so a case-insensitive count of the word finds two in a CORRECT email — count the anchor text. · A TEAM email shows NO unsubscribe link and no postal address. · No "{optOutLink}" survives anywhere. · The body is inside the well, between the two rules — you have added no header, footer, logo or signature of your own. The frame is already built. ## 6 · What you must not change · THE DIAMOND IS LOCKED ARTWORK. It is referenced from its production URL and sized only. Never redraw, trace, vectorise, recolour, filter, mask, animate or replace it. · One accent, #1863dc. Red is not in this brand and must not be reintroduced. · No capsule or pill tags. No blurred text, no glow text, no gradient blobs, no shadow-glows. · Do not edit the shells to suit one email. If a send needs something the shell cannot express, say so rather than modifying the frame. ## 7 · Known state · The client opt-out link is CORRECT but currently INERT: OPFLOW_OPTOUT_URL is unset, so a recipient who clicks it gets an honest "reply to any email" fallback rather than a false confirmation. Nothing about the shell changes when it is activated. · Canonical source is the private repo melockhart/diamond-equity-investments → packages/brand-templates/src/chicago/html-shell/. This host is a published copy. Never edit here.