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", "[email protected]")
.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);
}
I don't think you can pass this as a parameter inside marketing automation process with a code like this. The only way you can pass something into MA process is through the trigger data if the trigger is set to activity. Please refer to this blog article for example, basically it showcases how you can start MA process after form submission and get form submission data inside MA process.
You would need something similar I guess: