首页 > 其他分享 >Sitecore ListManagaer Operation

Sitecore ListManagaer Operation

时间:2024-03-18 16:55:57浏览次数:35  
标签:GlobalOptout ListSubscribeOperation id Sitecore new Operation ListManagaer ID Re

private void ListManagerOperate()
{
    // 获取服务
    IClientApiService clientApiService = ServiceLocator.ServiceProvider.GetRequiredService<IClientApiService>();

    // EXM manager root id
    string managerRoot = Settings.GetSetting(Global.ExmRoot, "{C6AC22DB-90F2-4765-A383-78311E41BFF4}");
    // optout list item id
    string GlobalOptout = Settings.GetSetting("GlobalOptoutList", "{ADCC924D-DC6C-406C-B8C7-89A58F829871}");
    ID managerRootId = new ID(managerRoot);
    ID GlobalOptoutId = new ID(GlobalOptout);
    
    // RemoveFromList:从 target list id 里移除此条数据 
    clientApiService.UpdateListSubscription(new UpdateListSubscriptionMessage()
    {
        ListSubscribeOperation = ListSubscribeOperation.RemoveFromList
        // public enum ListSubscribeOperation
        // {
        //     Subscribe,
        //     Unsubscribe,
        //     UnsubscribeFromAll,
        //     AddToList,
        //     RemoveFromList,
        // }
        , ContactIdentifier = new ContactIdentifier("form", "标识符", ContactIdentifierType.Known)
        , ManagerRootId = managerRootId.Guid
        , ListId = GlobalOptoutId.Guid
    });
}

标签:GlobalOptout,ListSubscribeOperation,id,Sitecore,new,Operation,ListManagaer,ID,Re
From: https://www.cnblogs.com/fires/p/18080878

相关文章

  • Sitecore 通过 AutomatedMessage 发送邮件
    lasted:https://doc.sitecore.com/xp/en/users/exm/103/email-experience-manager/the-email-campaign-builder.htmlpublicstaticvoidSendEXMEmail(){ //发送人的名称 vartoUserName="Abigail"; //发送人的邮件 vartoEmail="[email protected]"; ......
  • WARNING: An illegal reflective access operation has occurred
    想了很久也没有弄明白是什么原因导致了控制台输出了这个警告,后面在网上查了查资料,发现是这么一回事:在JDK8之前(包括java8),Java允许通过反射机制访问所有的成员,这些成员的类型包括私有(private),公共(public),包(<package>)和受保护(protected)。JDK9新增的功能之一——模块系......
  • [LeetCode] 2789. Largest Element in an Array after Merge Operations
    Youaregivena0-indexedarraynumsconsistingofpositiveintegers.Youcandothefollowingoperationonthearrayanynumberoftimes:Chooseanintegerisuchthat0<=i<nums.length-1andnums[i]<=nums[i+1].Replacetheelementnums......
  • P.A.R.A第二部分:操作手册(PARA Part 2: Operations Manual)
    内容简介: P.A.R.A是一个轻量级的个人知识管理系统,可以减轻大脑负担,提高工作生活的效率。第一部分,主要讲的是理论,这一篇(第二部分),侧重于实践:如何区分“项目”和“领域”、“资源”和“领域”,文件如何在四个大类之间流转及常见问题。读完本文后,对如何选择P.A.R.A的分类,会有更深的理......
  • Memberinfo call generic method System.InvalidOperationException: 'Late bound op
    staticvoidMain(string[]args){GenericMethod();LogInfo();}staticvoidGenericMethod(){MethodInfomi=typeof(Program).GetMethod("Echo");Console.WriteLine(mi.IsGenericMethodDefinition);Console.WriteLine(mi.Invoke(......
  • Laura and Operations
    观察样例,感觉可以从奇偶性来搞假设我们最后要保留数字\(1\)。我们每操作一次数字\(2\)和数字\(3\),他们两个的相对奇偶性不变;每操作一次数字\(1\)和数字\(3\),数字\(2\)和数字\(3\)的奇偶性也不变;每操作一次数字\(1\)和数字\(2\),数字\(2\)和数字\(3\)的奇偶性也不变也就是说无论我......
  • vscode 的sync的问题RequestFailed (UserDataSyncError) syncResource:unknown operat
    024-03-0708:58:24.361[error]RequestFailed(UserDataSyncError)syncResource:unknownoperationId:unknown:Connectionrefusedfortherequest'https://vscode-sync.trafficmanager.net/v1/manifest'.atu.D(c:\Debug\VSCode\resources\app\ou......
  • 理解LLMOps: Large Language Model Operations
    理解LLMOps:LargeLanguageModelOperations对于像我一样的小白来说,本文是一篇非常不错的LLMs入门介绍文档。来自:UnderstandingLLMOps:LargeLanguageModelOperations本文首先解释了新术语"LLMOps"及其背景,然后讨论使用LLMs和传统ML模型构建AI产品的不同之处,并基于这些......
  • python -- 解决安装pyxll-jupyter时出现“TimeoutError: The read operation timed ou
     在cmd输入命令”pipinstallpyxll-jupyter“进行安装,控制台出现以下报错信息:Downloadingpyxll_jupyter-0.5.2-py3-none-any.whl(46kB)----------------------------------------46.3/46.3kB16.1kB/seta0:00:00Downloadingjupyter-1.0.0-py2.py3-none-any.whl......
  • 安全运营中心(Security Operation Center,SOC)
    曾经国内很多客户对安全运营中心(SecurityOperationCenter,SOC)的理解就是“大屏”,纷纷表示也想在企业内挂一块可以指挥作战(从“威胁监测”到“处置响应”)的大屏,目前,追求炫酷的“大屏”已经不再是客户的主要诉求,客户的主要诉求转变为:1)通过SOC可以一站式管理各家的安全设备或产品,......