You need to sign in to do that
Don't have an account?

Triggered Send from Salesforce using Marketing Cloud
Hi,
A salesforce newbie here. We are using PersonAccount in our Salesforce org. We have also installed and configured the Marketing Cloud Connector. Our website inserts records into Salesforce whenever someone purchases a subscription to our product. Because of technical limitations of the third party we are using for managing subscription, we have to run a nightly job to update Salesforce with subscription related information. Now, we want to send a triggered email whenever the field "subscription status" gets updated. I have a couple of questions:
A salesforce newbie here. We are using PersonAccount in our Salesforce org. We have also installed and configured the Marketing Cloud Connector. Our website inserts records into Salesforce whenever someone purchases a subscription to our product. Because of technical limitations of the third party we are using for managing subscription, we have to run a nightly job to update Salesforce with subscription related information. Now, we want to send a triggered email whenever the field "subscription status" gets updated. I have a couple of questions:
- We want to avoid having to send duplicate emails. We only want to send the email the first time the "subscription status" field gets updated. Our nightly job updates all records every time. Knowing this, what is the best way to achieve this using the triggered send configuration in Salesforce.
- Below are the "trigger" and "Apex Test Class" that I have created to get this going. Do I need to do anything else?
trigger Trig_Account on Account (after insert, after update) { et4ae5.triggerUtility.automate('Account'); }Apex Test Class:
@isTest private class Trig_AccountTest { static testMethod void myUnitTest() { Account testAccount = new Account(LastName = 'Test Account', PersonEmail = 'testclass@crtv.com'); insert testAccount; testAccount = [select Id, LastName from Account where id = :testAccount.Id]; System.assertEquals(testAccount.LastName, 'Test Account'); }
You'll also want to bulkify the trigger. Here's an example of a bulkify. You'll want to change your trigger to be before update and before insert so you can update the record and check your box.