How do I pass a parameter to a Marketing Automation workflow?
I need to pass a parameter called 'MeetingId' to the workflow 'MeetingInvitation'. How can I do that?
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);
}