代码之家  ›  专栏  ›  技术社区  ›  chamara

将参数传递给Kentico Marketing Automation工作流

  •  0
  • chamara  · 技术社区  · 5 年前

    如何将参数传递给营销自动化工作流?

    我需要将名为“MeetingId”的参数传递到工作流“MeetingInvitation”。我该怎么做?

            ContactInfo contact = ContactInfoProvider.GetContacts()
                                                        .WhereEquals("ContactEmail", "chamara@e.com")
                                                        .TopN(1)
                                                        .FirstOrDefault();
    
            // Gets the marketing automation process
            WorkflowInfo process = WorkflowInfoProvider.GetWorkflowInfo("MeetingInvitation", WorkflowTypeEnum.Automation);
    
            if ((contact != null) && (process != null))
            {
                // Creates an automation manager instance
                AutomationManager manager = AutomationManager.GetInstance(MembershipContext.AuthenticatedUser);
               
                // Starts the process for the contact
                manager.StartProcess(contact, process.WorkflowID);
            }
    
    0 回复  |  直到 5 年前
        1
  •  1
  •   Dmitry Bastron    5 年前

    我认为你不能用这样的代码把它作为营销自动化过程中的一个参数来传递。如果触发器设置为activity,那么将某些内容传递到MA进程的唯一方法就是通过触发器数据。请参阅 this blog article for example ,它基本上展示了如何在表单提交之后启动MA进程,并在MA进程中获取表单提交数据。

    我想你也需要类似的东西:

    • 将MA进程配置为在触发器的活动类型上运行
    • 在您的代码中,您可以为联系人发出这种类型的活动,而不是显式启动流程,在ActivityDetailItemID参数中包含您的ID
    • 通过此发布的活动,Kentico将自动启动MA流程,并且在此MA流程中,您可以使用所需数据访问活动详细信息