1

I am trying to create an AMPScript that creates EmailSend Record in Salesforce that is associated to a Contact (the way they are connected by CustomerID and the ExternalID on the Person Account; ideally, we would like all emails to be launched through Salesforce but they are currently triggered from Exact Target, we are on a tight timeline and looking for some assistance. I have gotten pretty far with the following. The record creates but it doesn't relate exactly to the jobid in ET, is there any way to do this?

Below is how far I could get:-

set @SFid = RetrieveSalesforceObjects("Account", "PersonContactId", "SampleExternal_Id__c", "=", @CustomerId)
set @SFidRow = Row(@SFid,1)
set @Contact_Id = Field(@SFidRow,"PersonContactId")
set @updateresult = CreateSalesforceObject("et4ae5__SendDefinition__c",3,"et4ae5__SendStatus__c","Sent","et4ae5__Contact__c", @Contact_Id,"et4ae5__EmailName__c", "Sample Subject")
  • When you say that it the record doesn't relate to the jobid in ET - do you mean that you would like the jobid for that particular send to be added in the CreateSalesforceObject call? – Amtera Jun 13 '17 at 13:52
  • I apologize, still new to AMPScripting, but we want be able to track the email send analytics in salesforce, is that possible? – Chipper456 Jun 13 '17 at 17:16
  • this is possible the SFDC Marketing Cloud Connector. With the connector you'll be able to send to Salesforce contacts/leads and Marketing Cloud will report back Individual Email Results for each send. More Info: help.marketingcloud.com/en/documentation/… – Amtera Jun 13 '17 at 17:18
  • I know that works, we are wondering can it work the other way around if the email is trigger from exact target first not salesforce. The email is triggered by an external system. – Chipper456 Jun 13 '17 at 17:23
  • So this is possible through Journey Builder - sending a triggered send with the triggered sends feature won't feed data back to Salesforce. Using Journey Builder you can create a Fire Event entry point and when that action occurs to send an email. This can then be configured to feed that tracking data back to the record in Salesforce - just ensure you use the exact Salesforce ContactID as the ContactKey in your API Call. developer.salesforce.com/docs/… – Amtera Jun 13 '17 at 17:50
1

Sending a triggered send with the triggered sends feature won't feed data back to Salesforce.

Using Journey Builder you can create a Fire Event entry point and when that action occurs to send an email.

This can then be configured to feed that tracking data back to the record in Salesforce - just ensure you use the exact Salesforce ContactID as the ContactKey in your API Call.

Refer to: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/postEvent.htm

  • Sandeep is correct, currently there are only two ways to get "triggered emails" to show in salesforce - either via Journey builder or via "Salesforce Triggered Emails" (e.g. create a field in salesforce, that when set, triggers an email) - this will show up in the standard tracking. – Kenneth Wagner Jun 15 '17 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.