0

In Sitecore 9.1, we have custom unsubscription logic where we need to get the messageId and ContactId from ec_eq parameter in the query string.

We are using below code for the same

TransformQueryStringPipelineArgs transformQueryStringPipelineArg = new TransformQueryStringPipelineArgs(Sitecore.Context.Request.QueryString);
Sitecore.Modules.EmailCampaign.Core.PipelineHelper Pipeline = new Sitecore.Modules.EmailCampaign.Core.PipelineHelper();
Pipeline.RunPipeline("transformQueryString", transformQueryStringPipelineArg, "exm.messageEvents");
if (transformQueryStringPipelineArg != null)
{
   ContId = transformQueryStringPipelineArg.Query["ec_contact_id"];
   messageId = transformQueryStringPipelineArg.Query["ec_message_id"];
}

var qsa = Sitecore.Configuration.Factory.CreateObject("pipelines/group/pipelines/transformQueryString/processor", true) as Sitecore.Modules.EmailCampaign.Core.Pipelines.TransformQueryString.DecryptQueryString;
qsa.Process(transformQueryStringPipelineArg);

How ever it returns null for both messageId and ContactId, is it any configuration issue? This is standalone system.

Thanks for any inputs

Your Answer

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

Browse other questions tagged or ask your own question.