We are upgrading the Sitecore version from 8.2 to 10 and we have a few customizations in our projects related to campaign creation. In Sitecore 8.2 we use to have the SaveCampaign class present in the Sitecore.Analytics.Pipelines.DeployDefinition namespace which use to take care of the customization but in Sitecore 10 this class is not present and hence the implementation is not working. In Sitecore 10 it is mentioned to use Marketing operation API to deploy the campaign. As I am new to this, I am not able to understand which processor I need to alter to accomplish the same. Right now I am trying the Sitecore.Marketing.xMgmt.Pipelines.DeployDefinition.Deploy processor but not sure if it is the correct one. Kindly help if anyone has worked on similar requirements or faced such challenges. Any help or lead is appreciated.

  • Are having any issues when using Sitecore.Marketing.xMgmt.Pipelines.DeployDefinition.Deploy pipeline? It sounds correct.
    – grg
    Dec 1 '20 at 10:00
  • Not having any issue with the deploy pipeline. Just want to know if we are doing some customization like adding few extra parameters to default campaign parameters, the how it should be save and which pipeline need to patch etc.
    – Shri
    Dec 1 '20 at 11:16

I think you want code like this

Guid planId;
var manager = ServiceLocator.ServiceProvider.GetDefinitionManagerFactory().GetDefinitionManager<IAutomationPlanDefinition>();

var plan = manager.Get(planId, new CultureInfo("en"));
plan.Description = DateTime.Now.ToString(CultureInfo.InvariantCulture);
await manager.SaveAsync(plan);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.