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

How can I archive personalized email and SMS content sent by RTS journeys in Dynamics 365?

(2) ShareShare
ReportReport
Posted on by 39

Hi everyone,

I’m working with Dynamics 365 Real-Time Marketing (RTS), and I’ve noticed that when a journey sends emails or SMS messages to contacts, the system only logs the template reference (template name and title) in the timeline or interaction tables — but it doesn’t store or display the personalized content that was actually sent to the contact (with merged tokens like {{FirstName}} or {{AccountName}}).

For example:

  • In emails → I see the template name but not the final merged body.
  • In SMS → I see the template reference but not the exact text message sent.

My goal:

I want to archive the personalized content for both email and SMS after they are sent, so we have an auditable record of the actual communication delivered to the contact.

What I’ve explored so far:

  • Checked msdynmkt_emailinteraction → logs email sends, but only links to the template.
  • Checked msdynmkt_smsinteraction → logs SMS sends, but only the template reference.
  • Reviewed the msdynmkt_email and msdynmkt_sms tables → hold the templates, not the merged messages.
  • Considered a Power Automate flow to capture the interactions, pull contact data, and reconstruct the personalized content.

My questions:

  1. Is there an out-of-the-box feature in Dynamics 365 RTS to store or view the final personalized email or SMS that was sent?
  2. Has anyone built a Power Automate flow or plugin to automatically archive these messages to SharePoint, Dataverse, or another system?
  3. Are there any best practices, limitations, or performance concerns when doing this with Power Automate, especially for:
    1. Handling dynamic tokens ({{FirstName}}, {{AccountName}})
    2. Capturing conditional content
    3. Managing message volume and storage?

Context:

  • We use Real-Time Marketing with journeys sending both emails and SMS to contacts.
  • We need a compliant audit trail of the final personalized messages.
  • We’re open to storing the archive in Dataverse, SharePoint, or forwarding copies to an admin mailbox for compliance tracking.

Any advice, examples, or documentation links would be hugely appreciated!

 

Thank you!

I have the same question (0)
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    7,835 Super User 2025 Season 2 on at
    Hello jseb04,
     

    You've correctly observed the out-of-the-box behavior of Dynamics 365 Real-time Marketing (RTS). It primarily tracks the template used for sending, not the fully personalized content.

     

    Answers to your questions:

    1. Out-of-the-box feature: No, there isn't a direct, out-of-the-box feature in Dynamics 365 RTS that automatically stores or displays the final personalized email or SMS content linked to the interaction records.

    2. Power Automate flow or plugin: Yes, building a Power Automate flow is a common and viable approach to achieve this. Plugins could also be used, offering more real-time processing but requiring code development.

       


    3.  

    Recommended Approach: Power Automate Flow

    A Power Automate flow offers a flexible way to capture the necessary data and archive the personalized content. Here's a conceptual outline of such a flow:

    Trigger:

    • For Emails: Trigger on the creation of a new msdynmkt_emailinteraction record where msdynmkt_customerjourneyid is not null (indicating it was sent by a journey) and msdynmkt_operationtype is 'Send'.

    • For SMS: Trigger on the creation of a new msdynmkt_smsinteraction record where msdynmkt_customerjourneyid is not null and msdynmkt_operationtype is 'Send'.

    Actions:

    1. Get the related Email/SMS Template:

      • Use the "Get a row by ID" action to retrieve the msdynmkt_email record (for emails) or msdynmkt_sms record (for SMS) linked through the lookup field in the interaction record (msdynmkt_emailid or msdynmkt_smsid). 

    2. Get the Contact/Lead Data:

      • Use "Get a row by ID" to retrieve the Contact (contactid) or Lead (leadid) record that the interaction is related to (check the msdynmkt_customerid field in the interaction record). 

    3. Reconstruct the Personalized Content:

      • For Emails:

        • Retrieve the msdynmkt_body (HTML) and msdynmkt_plaintextbody from the email template.

        • Use "Compose" actions to find and replace the tokens (e.g., {{FirstName}}, {{AccountName}}) in the template body with the corresponding values from the retrieved Contact/Lead record. You'll need to know the schema names of the fields you're using in your personalization.

        • For more complex scenarios with conditional content, you might need more intricate logic using "Condition" controls and potentially parsing the template content. 

      • For SMS:

        • Retrieve the msdynmkt_message from the SMS template.

        • Use "Compose" actions to find and replace the tokens with data from the Contact/Lead record, similar to emails. 
         

    4. Archive the Personalized Content:

       

      • Option 1: Create a new Dataverse record: Create a custom entity (e.g., "Archived Communication") with fields to store the interaction type (Email/SMS), the related Contact/Lead, the sent date, and the personalized content (a text or memo field). Use the "Add a new row" action.

      • Option 2: Store in SharePoint: Use the SharePoint connector to create a new item in a list or upload a file containing the personalized content.

      • Option 3: Send to an Admin Mailbox: Use the Outlook connector to forward a copy of the personalized content to a designated mailbox.


      •  

    Best Practices, Limitations, and Performance Concerns with Power Automate:

    • Handling Dynamic Tokens: This is feasible with the "Compose" action and the replace() function in Power Automate. You'll need to know the exact token syntax used in your templates and the corresponding Dataverse field schema names. For a large number of tokens, this can become a bit lengthy.

    • Capturing Conditional Content: This is more complex. Standard "Compose" actions won't directly interpret conditional logic within the templates. You might need to:

      • If the conditional content is based on specific Dataverse field values, you can replicate that logic in your flow using "Condition" controls and build the final content accordingly.

      • If the conditional content is more intricate (e.g., FetchXML-based), it becomes significantly harder to reproduce accurately in Power Automate without more advanced parsing. 

    • Managing Message Volume and Storage:

      • Performance: For high-volume sending, consider the number of API calls your flow will make. Optimizing the flow by batching or being selective about what you archive might be necessary.

      • Storage: If you choose Dataverse, consider the storage implications of archiving potentially large email bodies. SharePoint offers a different storage model. 

    • Error Handling: Implement proper error handling in your flow (e.g., using "Try-Catch-Finally" blocks) to manage potential issues like missing data.


    •  

    Example Flow Snippet (Conceptual - Email):

    1. Trigger: When a msdynmkt_emailinteraction record is created... (filter for sent emails from journeys)

    2. Get Email Template: Get row from msdynmkt_email using _msdynmkt_emailid_value.

    3. Get Contact: Get row from contact using msdynmkt_customerid_value (assuming it's a Contact).

    4. Compose Personalized Body:
      replace(outputs('Get_Email_Template')?['body/msdynmkt_body'], '{{FirstName}}', outputs('Get_Contact')?['firstname'])
      (Add more "Compose" actions for other tokens)

    5. Create Archived Communication Record: Create a new row in your custom "Archived Communication" entity, setting the content field to the output of your final "Compose" action.

    6.  

    Next Steps for You:

    1. Identify the key tokens used in your email and SMS templates.

    2. Decide on your preferred storage location for the archived content (Dataverse, SharePoint, etc.).

    3. Start building a Power Automate flow with the trigger and initial "Get" actions.

    4.  

    Let me know if you'd like help with specific parts of building this Power Automate flow, such as handling token replacement or creating the custom entity. Good luck with your compliant audit trail!

     
    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
  • jseb04 Profile Picture
    39 on at

    Thank you, Daivat, for the detailed and thoughtful response — it’s really appreciated!

     

    If I go down the Power Automate flow approach, I have a concern: how can I reliably know all the attributes that users are using in the templates? Sometimes I see fields like fullname, fullname1, or even custom fields from other tables. Since there’s no consistent way for me to know in advance which attributes a customer might include in their personalization tokens — especially when they can freely choose fields — this solution seems functional but quite limited without deep involvement from the admin team or developers.

     

    Is there not a temporary or system field somewhere in Dynamics 365 that keeps track of the fully merged, personalized content just before or after it’s sent? I would absolutely be open to storing this data in a custom table or entity — but I would need a way to access the final content that was actually sent in order to do that reliably. Without that, recreating it manually through Power Automate seems risky and potentially incomplete.

     

    As for the option you mentioned (Option 3: Send to an Admin Mailbox), would that effectively create another “send” action from the journey and simply use a different attribute or recipient to forward the personalized content to an admin mailbox? Would that require additional configuration, or is there native support for that approach?

     

    Also, what about using queues — are they available or usable for routing these types of messages for archival or compliance purposes?

     

    At this point, I’m starting to think we may need to consider solutions outside of CRM, as this feels like a core functionality that ideally should be handled natively.

     

    Thanks again for your insights — I’m happy to hear any further recommendations or ideas you might have!

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

#2
#ManoVerse Profile Picture

#ManoVerse 83

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans