Fire Journey through Salesforce Trigger
Are you facing a problem with your Journey not been executed through Salesforce DML Operations? No problem!!
Lets try executing the Journey without 'Salesforce Data' entry criteria replacing with API event executed from the Apex trigger.
We dont need to worry about our connectivity or Type of Ord or Permission issues.
Just need to copy paste the below code in Salesforce and need to make a minor changes.
Step 1: Find your ClientId and Client Secret from your Marketing Cloud Instance.
Goto Platform tools
Under Apps, Click Installed packages(Hope package is installed already else please do it)
Select for your right package and find your Client Id and Client Secret.
Step 2: Replace your 'Salesforce Data' Entry to 'API Entry event'.
Copy the EventDefinitionKey as shown below.
Step 3: Copy paste the below Trigger and Apex class in your Salesforce instance and make the Object and field changes as per your requirement and Done!!!!!
After create or update operation on the Salesforce Object will trigger the Journey event.