I have a custom preference center for a client with an ExactTarget account integrated with Salesforce. I have tried a couple of methods for unsubscribing a record through ampscript including the one discussed here:

One-click Custom Unsubscribe

However when using the InvokeUpdate approach I get the subscriber set to Unsubscribe in ExactTarget, but the HasOptedOutOfEmail flag in Salesforce is not automatically set and no Unsubscribe event is recorded in the Individual Email Results object in Salesforce -- I'm assuming beaosue no JobID is passed?

If I try the LogUnSubEvent approach and pass in a JobID I get this feedback:

Response: ExactTarget.Integration.WSDL.ExecuteResponse

Status: Subscriber not found on the specified send

Error: 400

Why doesn't ExactTarget find the subscriber on the JobId? I have noticed that email events (sent, Open, Click, Bounce, Unsubscribe) don't seem to be recorded in the ExactTarget Data Views for sends to Salesforce Reports and campaigns -- is this normal?

If I try the LogUnSubEvent and do not pass in the JobID I get the subscriber Unsubscribed in the All Subscribers list, but again no event info goes back to Salesforce for the Lead record.

Has anyone been able to create a custom unsubscribe option using ampscript that will mark a subscriber as Unsubscribe in ExactTarget and have the record of the Unsubscribe go back to the Salesforce Lead Record on the Individual Email Result Detail object? This is the behavior of the default ExactTarget Profile Center and what I feel should be possible via ampscript. Any ideas are welcome!

Thanks, Kevin

1 Answer 1


ExactTarget has the ability to unsubscribe a person from Salesforce, but it's an all-or-nothing type or situation. In other words, if a subscriber unsubscribes, they unsubscribe from all publications for your account (All Subscriber's List).

If you're looking to also update the Salesforce Contact/Lead, you would need to use the "UpdateSingleSalesforceObject()" AMPScript Function.

See below for further information on this function...On your subscription center, it may look similar to the below. Hope this helps!

var @result
set @result = UpdateSingleSalesforceObject("Lead",@leadid,"HasOptedOutOfEmail","true")


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .