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

Whole Number fields Personlization to include commas in email

(2) ShareShare
ReportReport
Posted on by 2,175
Hi all,
 
I'm trying to add personalization in a email on Customer Insights Journeys. The field is a whole number and could go into the thousands or hundreds of thousands. How do I format it so that the whole numbers when it gets to a certain size include commas? At the moment for example when the field has a value of 1000. The content comes through in the email tests as 1000. I want it to look like 1,000 for better readability. 
I have the same question (0)
  • Eugen Podkorytov Profile Picture
    176 on at
    Currently, this is not possible to do either for whole numbers neithor for currency. 
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    7,835 Super User 2025 Season 2 on at
    Hello MikeC282,
     

    You're right, adding commas to large whole numbers significantly improves readability in emails. While Dynamics 365 Customer Insights - Journeys doesn't have a direct, built-in formatting option within the personalization token syntax for this, you can achieve this using a Power Automate flow to pre-process the data before it's used in the email.

    Here's the approach:

    1. Identify the Trigger: Your flow will likely trigger when the data you're using for personalization is created or updated (e.g., on the creation of a segment member or a relevant entity record).

    2. Retrieve the Whole Number Value: Get the record containing the whole number field you want to format.

    3. Format the Number with Commas: Use the formatNumber() function in Power Automate.

    4. Store the Formatted Number: Store this formatted number in a new field on the same entity or a related entity that you can then use for personalization in your email.

       


    5.  

    Detailed Steps:

    1. Create a New Text Field: On the entity that holds the whole number you want to format, create a new Single Line of Text field (e.g., FormattedWholeNumber). This field will store the comma-separated version.

    2. Create a Power Automate Flow:

      • Trigger: Choose a trigger that suits when you want this formatting to happen. For example:

        • When a row is added, modified or deleted (Dataverse): Trigger on the creation or update of the entity containing your whole number field. You'll need to specify the entity and the scope. 

      • Action: Get Row by ID (Dataverse): Get the details of the record that triggered the flow.

      • Action: Compose (Data Operation): Use the formatNumber() function to format your whole number field. The syntax would be something like this:

        formatNumber(outputs('Get_row')?['body/your_whole_number_field_logical_name'], '#,###')

        • Replace 'your_whole_number_field_logical_name' with the actual schema name of your whole number field.

        • '#,###' is the format string that adds commas for thousands separators.

         


      • Action: Update a Row (Dataverse): Update the same record (or a related record) to store the formatted number in the text field you created earlier.

        • Entity name: Select the entity.

        • Row ID: Use the ID of the record you retrieved.

        • Set the value of your new text field (FormattedWholeNumber) to the output of the "Compose" action.

          


    3. Use the Formatted Text Field in Your Email: In your Customer Insights - Journeys email, when adding personalization, select the Single Line of Text field (FormattedWholeNumber) you created instead of the original whole number field.

    4.  

    Example Flow:

    Let's say your whole number field is new_revenue on the Account entity.

    1. Trigger: When a row is added or modified in Accounts.

    2. Action: Get Row by ID: Get the Account record.

    3. Action: Compose - Format Revenue:
      formatNumber(outputs('Get_row')?['body/new_revenue'], '#,###')

    4. Action: Update a Row - Update Account:

      • Entity name: Accounts

      • Row ID: {item()?['accountid']} (from the trigger or "Get Row" action)

      • Set FormattedWholeNumber to: outputs('Compose_-_Format_Revenue')  

    Now, when you personalize your email using the FormattedWholeNumber field from the Account entity, values like 1000 will appear as 1,000.

    Considerations:

    • Trigger Logic: Carefully choose your trigger to ensure the formatting happens when needed (e.g., when the data is created or updated before the email is sent).

    • Performance: For very high volumes of data updates, consider the performance implications of the flow.

    • Localization: The #,### format will use the comma as the thousands separator. If you need different separators based on the recipient's locale, you might need more complex logic involving conditional formatting or retrieving user/contact language preferences. However, for a general comma separator, this format works well.
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak

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 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans