Manage dynamic content in email marketing


Updated: November 1, 2016

Applies To: Dynamics Marketing


Microsoft Dynamics Marketing is scheduled to be retired on May 15, 2018. After that date the service will no longer be available. Please plan accordingly. For details, see the blog post Microsoft Dynamics Marketing service will be discontinued, and learn what’s coming next.

Each marketing email that you send is individually customized for the recipient by using dynamic data. The following types of dynamic data are available:

  • Contact field values: these are values that come from the recipient’s contact record, such as first name, last name and other values. In your message, these take the form @EntityName.FieldName (for example, @Contact.FirstName). Both the graphic and code-based email editors provide a drop-down list to help you position such values in your email design. More information:Design message content using the graphical editor, Design message content using the text-based code editor

  • External entities: these are data tables submitted and maintained by an external system and stored in Dynamics Marketing in XML format. This system provides a way of adding custom data to contacts from a table of common, shared values. The advantage is that you can update the data in just one place and thereby update values for any number of contacts that use it. You might use this, for example, to hold a table of local store information (such as addresses and phone numbers) that is maintained centrally and could thereafter be included in email messages. You must submit and maintain this XML data using the Dynamics Marketing API. More information:Set up external entities to provide tailored details to marketing contacts

  • Dynamic content for externally triggered message: usually you will manage your email sends directly in Dynamics Marketing using internal lists and/or campaign automation. However, you are also able to trigger some types of emails via an external system that communicates with Dynamics Marketing via its API. When you trigger a transactional message in this way, then your external system can include an XML document together with the trigger command, and you message design is able to incorporate this custom, external data, into the message body.

This topic describes how to set up and use dynamic content to be included with externally triggered messages (the last item from the previous list). For more information about setting up externally triggered email messages, see also Validate, test and send messages.

An XML schema definition (.xsd) file is required for each different format of XML data that will be submitted via the API together with the send-message command. For more information about how to create and use XML schemas, see any standard, up-to-date XML reference.

To work with the collection of XML schemas available to your system, go to Marketing Execution > Email Marketing > External Content. From here you can view, find, edit, copy and delete various schemas using the usual list-view controls provided by Dynamics Marketing (see also Learn how to work and get around in Microsoft Dynamics Marketing). Whenever you add or edit an XML schema, the settings and controls in the following table are provided.

Setting or control



Assign a status for the schema. This value can be useful for sorting and filtering your records and for supporting internal processes or policies. Your admin can customize the values available here; see Create custom drop-down values and folders for details about how to customize drop-down values. (Category type = XML Schema Status.)


The Status drop-down list includes a few permanent entries that cannot be removed by editing its category (though they can be renamed). Of special note is the “Disabled” status, which marks the schema as deleted (so it will no longer appear in list views and other parts of Dynamics Marketing), but still keeps the schema in your database in case you need it later. Use the show/hide inactive Show All/Active Only button button in the list-view toolbar to show or hide schemas marked with a Status of “Disabled”.


Enter a short but descriptive name. This value will identify the current record in list views, type-ahead fields, drop-down lists, and other areas of Dynamics Marketing. Choose a value that you and all other users are likely to recognize in the future.


Shows the file name of the uploaded schema.


Enter a description that can help you and other users remember what this record is for and how it should be used.

Upload button

Choose this button to upload a new schema file. This will replace the current file (if any).

Download button

Choose this button to download the current schema file (if any). This might be useful when creating the XML data that you plan to submit to be sure it conforms to the schema.

Once your XML schema is complete and uploaded to Dynamics Marketing you are ready to create an email design that uses it. To do so:

  1. Create or open a marketing email configured with its Send externally checkbox enabled and with a Designation of “Transaction” (see also Create or view email marketing messages and Validate, test and send messages).


    The Send externally setting is only available if your admin has enabled the SDK for your site (see also Configure the SDK and Dynamics 365 Connector). The setting is furthermore only editable when you first create a message; once you have saved the message, you can no longer change this setting.

  2. Save your message design at least once so that the related-information tabs are available at the bottom of the Summary.

  3. Choose the External Content related-information tab.

  4. Choose the Assign button Update Status button from the External Content tab to open a pop-up window that lists the available schemas. Find the schema you want to use, mark its checkbox and choose Assign. You can only have one schema assigned at a time, so if one is already assigned, then you will replace it with your new selection.

  5. Continue setting up your email design as usual. Now that your XML schema is in place and attached to your message design, you can place external data fields in your message content using @Ext.FieldName (where FieldName is the name of a field included in the attached schema).

To send the message, you must trigger an external API call that specifies a message ID and attaches the required XML file. For information about using the API and SDK, go to the Microsoft Dynamics Marketing Developer Center. See also Validate, test and send messages