1

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

我需要将一个名为“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);
        }
4

1 回答 1

1

我认为您不能使用这样的代码将其作为营销自动化过程中的参数传递。如果触发器设置为活动,则可以将某些内容传递到 MA 流程的唯一方法是通过触发器数据。例如,请参考这篇博客文章,基本上它展示了如何在表单提交后启动 MA 流程并在 MA 流程中获取表单提交数据。

我猜你需要类似的东西:

  • 将您的 MA 流程配置为在触发器的活动类型上运行
  • 在您的代码中,而不是显式启动流程,您可以为联系人发出此类活动,包括您在 ActivityDetailItemID 参数中的 ID
  • 通过此发布的活动,Kentico 将自动启动 MA 流程,在此 MA 流程中,您可以使用所需数据访问活动详细信息
于 2020-09-16T17:11:32.463 回答