Skip to content

Module 9: cast_apostrophe

The cast_apostrophe filter adds a possessive apostrophe to whatever text value you give it. It follows the standard English grammar rule:

  • If the name ends in “s” → add just an apostrophe: James'
  • If the name does not end in “s” → add apostrophe + s: Jason's

Analogy: Think of writing a mail merge letter that says “Dear [Name]’s family.” If the name is “Smith,” you want “Smith’s family.” If the name is “James,” you want “James’ family.” You can’t hard-code the apostrophe because you don’t know which name will be inserted. cast_apostrophe makes the decision for you.

Possessive names appear constantly in narrations: “[Company]’s renewal,” “[Contact]’s health score,” “[Contact]’s team.” Getting the grammar wrong (“James’s” is debatable; “Jasons’” is clearly wrong) looks unprofessional in both text and spoken audio. cast_apostrophe guarantees correctness for any name.


{% raw %}
{{ contact_first_name | cast_apostrophe }}
{% endraw %}

That’s it. The filter looks at the last character and applies the right rule.


Input Output Rule Applied
"Jason" Jason's Does not end in s → add ’s
"Liz" Liz's Does not end in s → add ’s
"James" James' Ends in s → add ’ only
"Charles" Charles' Ends in s → add ’ only
"Julius" Julius' Ends in s → add ’ only
"Acme LLC" Acme LLC's Does not end in s → add ’s
"AT&T Services" AT&T Services' Ends in s → add ’ only

First name possessive:

{% raw %}
{{ contact_first_name | cast_apostrophe }} progress this quarter has been outstanding.
{% endraw %}

For "Jason"Jason's progress this quarter has been outstanding. For "James"James' progress this quarter has been outstanding.

Company name possessive (chained with cast_titlecase):

{% raw %}
Welcome to {{ contact_account_name | cast_titlecase | cast_apostrophe }}
Executive Business Review.
{% endraw %}

For "ACME LLC"Welcome to Acme LLC's Executive Business Review. For "AT&T SERVICES LLC"Welcome to AT&T Services LLC's Executive Business Review.

Account tenure:

{% raw %}
{{ contact_first_name | cast_apostrophe }} account has been active
for {{ CustomerSince }}.
{% endraw %}

For "Priya" with a tenure of 2 years → Priya's account has been active for 2 years and 3 months.


The most common chain is cast_titlecasecast_apostrophe, applied to company names:

{% raw %}
{{ contact_account_name | default: "your company" | cast_titlecase | cast_apostrophe }}
{% endraw %}

The order matters: first normalize the casing, then add the possessive. If you reversed the order, cast_titlecase might alter the possessive suffix.

You can also chain with default for safety:

{% raw %}
{{ contact_first_name | default: "Your" | cast_apostrophe }}
{% endraw %}

For "Jason"Jason's For nil/empty → Your's — wait, that’s grammatically wrong! “Your” is already possessive. This is a case where you need to think about your fallback carefully.

💡 Better fallback pattern for possessives:

{% raw %}
{%- assign name = contact_first_name | default: "" -%}
Your progress this quarter has been outstanding.
{% else %}
{{ name | cast_apostrophe }} progress this quarter has been outstanding.
{% endraw %}

This avoids the awkward “Your’s” by using a separate sentence structure for the fallback.


Hard-coding the apostrophe instead of using the filter:

{% raw %}
{{ contact_first_name }}'s account is thriving.
{% endraw %}

This always produces 's, even for names ending in “s” — giving you James's instead of James'.

Use cast_apostrophe:

{% raw %}
{{ contact_first_name | cast_apostrophe }} account is thriving.
{% endraw %}

Adding extra text after the filter:

{% raw %}
{{ contact_first_name | cast_apostrophe }}'s account
{% endraw %}

This would produce Jason's's account — a double possessive.

The filter already adds the possessive — just follow with a space:

{% raw %}
{{ contact_first_name | cast_apostrophe }} account
{% endraw %}

Using a possessive pronoun as the default:

{% raw %}
{{ contact_first_name | default: "Your" | cast_apostrophe }}
→ "Your's" (grammatically incorrect)
{% endraw %}

Handle the fallback case separately:

{% raw %}
{%- assign name = contact_first_name | default: "" | strip -%}
{{ name | cast_apostrophe }} account health is strong.
{% else %}
Your account health is strong.
{% endraw %}

Exercise: Write a Cast narration snippet that says “[Company]’s growth this year has been [above/below] the industry average.” Use cast_titlecase and cast_apostrophe for the company name, and handle the case where the company name might be missing.

Assume you have variables: contact_account_name (might be nil) and growth_vs_avg (a snippet that returns "above" or "below" as a string).

Click to reveal the answer
{% raw %}
{%- assign company = contact_account_name | default: "" | strip -%}
{%- assign comparison = growth_vs_avg | default: "in line with" | strip -%}
{{ company | cast_titlecase | cast_apostrophe }} growth this year has been
{{ comparison }} the industry average.
{% else %}
Your company's growth this year has been {{ comparison }} the industry average.
{% endraw %}

For "ACME LLC" with growth_vs_avg = "above": Acme LLC's growth this year has been above the industry average.

For nil company name: Your company's growth this year has been in line with the industry average.

Key details:

  • cast_titlecase before cast_apostrophe — always normalize casing first
  • Separate handling for missing company name avoids “Your Company’s” awkwardness
  • Snippet output is stripped before use

In Module 10, you’ll learn about cast_pronounce — the filter that controls how Cast’s audio narrator speaks acronyms, product names, version numbers, and tricky words.


📖 Official documentation: