Skip to content

docs(email-content): document OTP email placeholders and org name resolution - #849

Open
onderay wants to merge 4 commits into
mainfrom
docs/otp-email-placeholders
Open

onderay wants to merge 4 commits into
mainfrom
docs/otp-email-placeholders

Conversation

@onderay

@onderay onderay commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Description (required)

Adds a Placeholders subsection to the OTP email section of Customize email content.

A customer was confused when ${business_name} in their OTP email showed their organization's name instead of their business name. That's intended, but the page didn't explain it. It only said "Use the placeholders to personalize and define where the code appears."

Changes:

  • A table of the placeholders available in each field (subject line, content, disclaimer). Any other placeholder text is sent exactly as typed.
  • How ${business_name} resolves: the organization's name when the user signs in to a specific organization, otherwise the business name (also used if the organization's name is empty). It's the same in every field and matches the hosted sign-in pages.
  • An aside: to always show your own business name, type it as plain text instead of using ${business_name}.
  • Step 3 of the OTP steps now links to the new subsection. The frontmatter updated date is bumped and an "email placeholders" keyword is added.

Checked locally with astro dev: the table, aside and links render correctly.

Related issues & labels (optional)

  • Suggested label: documentation

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Expanded the OTP email customization guide with a reference for ${code} and ${business_name} placeholders, including how the business name is selected and when it falls back to a default.
    • Clarified that other placeholder text is sent as written and that ${business_name} can be replaced with literal text.
    • Updated the document’s revision date and keywords.

…olution

Add a Placeholders subsection to the OTP email section listing which
placeholders each field supports, and explain that ${business_name}
resolves to the organization's name when a user signs in to a specific
organization, falling back to the business name otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@onderay
onderay requested a review from a team as a code owner November 9, 2026 03:04
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Deploying kinde-docs-preview with  Cloudflare Pages  Cloudflare Pages

Latest commit: 058c77e
Status: ✅  Deploy successful!
Preview URL: https://cde7bb2b.kinde-docs-preview.pages.dev
Branch Preview URL: https://docs-otp-email-placeholders.kinde-docs-preview.pages.dev

View logs

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d69a66dc-32c5-4c6e-90b7-0023af125f18
Commits

Reviewing files that changed from the base of the PR and between 0348199 and 058c77e.

Files selected for processing: 1

  • src/content/docs/design/content-customization/email-content.mdx

No actionable comments were generated in the recent review.

Walkthrough

The email content guide adds an OTP placeholder reference. It describes ${code} and ${business_name}, explains how the business name is resolved for organization sign-ins, and updates the document date and keywords.

Changes

Email placeholder documentation

Layer / File(s) Summary
Document OTP email placeholders
src/content/docs/design/content-customization/email-content.mdx
The guide links to a placeholder reference and explains ${code}, ${business_name}, literal placeholder text, and business name resolution for organization sign-ins. The document date and keywords are also updated.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Suggested reviewers: tamalchowdhury, clairekinde11

Merge Risk: Minimal · previous review 03481

The guide adds OTP placeholder and name-resolution guidance. No concrete issue requiring correction before merge was established; the change is mergeable subject to normal documentation checks.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the docs change to the email-content page and the two topics it covers: OTP email placeholders and organization name resolution. The raw summary says the change adds a Placeholders sec…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the docs change to the email-content page and the two topics it covers: OTP email placeholders and organization name resolution. The raw summary says the change adds a Placeholders section that lists the placeholders for OTP email fields, explains that other text is sent as typed, and describes how ${business_name} resolves for organization sign-ins and falls back to the business name. The title matches the main change, and it follows the conventional commit style with a clear scope.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit reads the email guide
${code} hops in, a sign-in key
${business_name} names the place
Plain text stays just as it was
Fresh words help the guide keep pace

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7243147c-44f1-4b72-b82e-1b3efd37c0de
Commits

Reviewing files that changed from the base of the PR and between 958353d and 0348199.

Files selected for processing: 1

  • src/content/docs/design/content-customization/email-content.mdx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@tamalchowdhury tamalchowdhury self-assigned this Nov 10, 2026
onderay and others added 2 commits November 11, 2026 16:35
… content

The OTP email content field also replaces ${expiration_duration} with the
code's validity period, so it isn't sent as typed like other placeholders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@onderay onderay self-assigned this Nov 12, 2026

@tamalchowdhury tamalchowdhury left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The repository lacks independent implementation or fixtures validating field-specific placeholder allowlists, literal handling of unsupported placeholders, and the empty-organization-name fallback, so these production contracts require product-owner confirmation.

No open issues 🎉

What changed in this PR

Expands the OTP email customization guide to explain supported placeholders and clarify when ${business_name} uses an organization name instead of the business name.

Changes:

  • Adds a field-by-field placeholder table, expiration-duration guidance, and handling of unsupported placeholders.
  • Documents organization-name resolution, fallback behavior, and using plain text for a fixed business name.
  • Links the editing steps to the new subsection and updates the page’s revision date and keywords.
File Description
src/​content/​docs/​design/​content-customization/​email-content.mdx Adds OTP placeholder reference and organization-name guidance; updates navigation and metadata.

Review effort: Balanced

@dtoxvanilla1991 dtoxvanilla1991 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changes. The remaining questions about placeholder allowlists, literal handling of unsupported placeholders, and organization-name fallback are already raised in the Copilot review and lack confirmation from an authoritative source. I found no distinct issue to add.

@onderay

onderay commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Following up on the Copilot review and @dtoxvanilla1991's comment, which asked for confirmation of three behaviours. I checked each one against the current OTP email code in the product, and all three match what the page says.

1. Placeholders in each field

  • Subject line: ${code} and ${business_name} are substituted.
  • Content: ${code}, ${business_name} and ${expiration_duration} are substituted. This applies to both the HTML and plain-text versions of the email.
  • Disclaimer: only ${business_name} is substituted.

The placeholder hints in the dashboard editor for Content list only code and business_name. ${expiration_duration} is still substituted in Content, and the default English content uses it ("This code will expire in ${expiration_duration}"), so the table is right to include it.

2. Other placeholder text is sent as typed
Substitution is a literal find-and-replace of those exact tokens. Anything else, such as ${first_name} or a placeholder a field doesn't support (for example ${code} in the disclaimer), stays as written and is not replaced with an empty string. ${business_name} is substituted last, so an organization named ${code} can't inject the code.

3. How ${business_name} resolves, including the empty-name fallback
${business_name} uses the organization's name when the sign-in has an org code, otherwise the business name. An empty organization name ('') is treated as missing, so the business name is used instead. The same value is used in the subject line, content and disclaimer.

No content changes are needed. Requesting re-review from the reviewers who flagged this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants