1. Marketing Automation APIs

Working with campaign templates programmatically

Version:

The topic describes how to work with marketing automation campaign templates programmatically.

Campaign templates are managed by Sitecore.Marketing.Automation.Definitions.AutomationCampaignTemplates.AutomationCampaignTemplateDefinitionManager class. They are stored in the master database under the following path:

/sitecore/system/Marketing Control Panel/Marketing Automation Templates managed by the Sitecore.Marketing.Automation.Definitions.AutomationCampaignTemplates.AutomationCampaignTemplateDefinitionManager class

  • Task:
  • Access the automation campaign template manager.The AutomationCampaignTemplateDefinitionManager is available from the sitecore DI container.: Constructor Injection
  • : ServiceLocator
  • Define an automation campaign template.:
  • Save an automation campaign template.:
  • Update an existing automation campaign template.:
  • Delete an automation campaign template.:
  • Retrieve an automation campaign template.:
  • Retrieve an automation campaign template using an alias.:
  • Retrieve all automation campaign templates.:
Note

You cannot activate an automation campaign template programatically. If the ActivateAsync method of the the AutomationCampaignTemplateDefinitionManager is called, or if the the SaveAsync is called and the activate parameter is set to true, a NotSupportedException occurs.

If you have suggestions for improving this article, let us know!