web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Salutation blocks for formal vs. informal greetings for different languages

(3) ShareShare
ReportReport
Posted on by 14
How do I create salutation blocks for formal and informal greetings which work dynamically for different languages (English, German, French, Italian, Spanish, Portuguese) and with a fallback version configured, where gender information or First/Last name is missing. Any advice would be highly appreciated.
 
I have the same question (0)
  • Suggested answer
    Muhammad Shahzad Shafique Profile Picture
    2,373 Most Valuable Professional on at
    1. Use Conditional Content Blocks
    Create a Content Fragment or HTML block using if/else logic in Real-time Marketing.
    Example logic using {{#if}} Handlebars-style expressions (used in D365):

    2. Sample Salutation Logic (Multi-language with Formal/Informal & Fallbacks)
     
    {{#if (eq contact.preferredlanguage 'de')}}
        {{#if contact.firstname}}
            {{#if (eq contact.salutation_preference 'formal')}}
                {{#if contact.gendercode}}
                    {{#if (eq contact.gendercode 1)}}Sehr geehrter Herr {{contact.lastname}}{{else}}Sehr geehrte Frau {{contact.lastname}}{{/if}}
                {{else}}Guten Tag {{contact.firstname}}{{/if}}
            {{else}}Hallo {{contact.firstname}}{{/if}}
        {{else}}Guten Tag,{{/if}}
    
    {{else if (eq contact.preferredlanguage 'fr')}}
        {{#if contact.firstname}}
            {{#if (eq contact.salutation_preference 'formal')}}
                {{#if contact.gendercode}}
                    {{#if (eq contact.gendercode 1)}}Monsieur {{contact.lastname}}{{else}}Madame {{contact.lastname}}{{/if}}
                {{else}}Bonjour {{contact.firstname}}{{/if}}
            {{else}}Salut {{contact.firstname}}{{/if}}
        {{else}}Bonjour,{{/if}}
    
    {{else if (eq contact.preferredlanguage 'en')}}
        {{#if contact.firstname}}
            {{#if (eq contact.salutation_preference 'formal')}}
                {{#if contact.gendercode}}
                    {{#if (eq contact.gendercode 1)}}Dear Mr. {{contact.lastname}}{{else}}Dear Ms. {{contact.lastname}}{{/if}}
                {{else}}Dear {{contact.firstname}}{{/if}}
            {{else}}Hi {{contact.firstname}}{{/if}}
        {{else}}Hello,{{/if}}
    
    {{else}}
        Hello,{{!-- Fallback if language not matched --}}
    {{/if}}
    
    3. Field Mapping Assumptions
    • preferredlanguage: ISO code or text field (e.g., 'de', 'fr', 'en')
    • salutation_preference: custom option set (e.g., 'formal' or 'informal')
    • gendercode: system field (1 = Male, 2 = Female)
    • firstname, lastname: standard contact fields

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans