Prerequisite
- Create a Trigger
- Create a Journey
Click here to learn how to create a trigger and a journey.
Open Visual Studio and Create a new class file or existing file to add the logic for calling the Trigger
Initilize the Organization Request, and In the Request Name, add your trigger name.
OrganizationRequest customTrigger = new OrganizationRequest() { RequestName = "Your Trigger Name" };
Add the Parameters by Prefixing with "msdynmkt"
customTrigger.Parameters.Add("msdynmkt_firstname", "Akhilesh");
Finally, add the Organization Request i.e customTrigger, to Service as below.
Service.Execute(customTrigger);
Final Code view
public void IntegrateTriggerUsingC#()
{
OrganizationRequest customTrigger = new OrganizationRequest() { RequestName = "Your Trigger Name" };
customTrigger.Parameters.Add("msdynmkt_firstname", "Akhilesh");
Service.Execute(customTrigger);
}
Demo