AI agents: the content index is at /llms.txt. Every page is also available as Markdown — send the request header Accept: text/markdown, or append .md to the page URL.
Xperience Docs

Cookie consent

We use necessary cookies (opens in a new tab) to run our website and improve your experience while browsing. Additional cookies are only used with your consent. You may revoke your consent on the Cookies Policy (opens in a new tab) page or in your browser at any time.

Configure (opens in a new tab)
  • Documentation
    InstallationUsing the Xperience interfaceDeveloping websitesConfiguring XperienceManaging usersSecuring websitesDeploying websitesManaging website contentMultilingual websitesMacro expressionsExternal utilitiesIntegrating 3rd party systemsCustom developmentE-commerce featuresOn-line marketing featuresRelease notes - Xperience 13Xperience terminology glossary
  • Tutorial
    Using the Xperience interfaceDeveloper tutorialBusiness tutorialResource hub for marketers
  • API Examples
    ConfigurationContent managementDevelopmentE-commerceOn-line marketingSocial media
  1. Home
  2. Macro expressions

Macro expressions


Was this page helpful?

Send us feedback Go back to top
  • Community Questions & Answers (opens in a new tab)
  • Contact support (opens in a new tab)

Macros are text expressions that the system evaluates and converts into values. By using macros, you can create dynamic content (for example in emails) and in general configure the application to perform different actions under different conditions. Macros range from simple expressions for loading values from data in the system, to complex sets of instructions that lead to a certain result.

Learn the macro syntax

Xperience uses a macro language (K#) with a wide range of syntax options and features.

Enter macro expressions in the system

Learn where in the Xperience administration interface you can enter macro expressions, and about the available assistance features.

Write macro conditions

One of the most common ways to leverage macros is to define dynamic conditions for various types of functionality.

  • Build conditions using a text-based interface (macro rules)
  • Create custom macro rules

Find information about macro methods

The system provides a large number of methods that you can call in macro expressions. View this reference to learn about the available methods.

Troubleshoot macros

If you encounter problems when working with macro expressions, the system provides several tools that can help identify and fix the issues:

  • Search the system for macro expressions
  • Debug macros
  • Solve problems with macro signatures

Extend the macro engine

If the default functionality of the macro engine does not cover all of your requirements, developers can extend the macro engine.

Learn to create custom:

  • Macro methods
  • Macro fields (properties)
  • Macro namespaces

Macro expressions on the live site

Usage of macros is fully supported for the Xperience administration interface and for all processes that run within the administration application, such as marketing automation processes, recalculation of contact scores, and most scheduled tasks.

However, macros are not automatically resolved within text fields when displaying page content on the live site. If you wish to use macros within page content, you need to manually resolve the macros using the API before you render the data on the live site.