Skip to main content

I am setting up a Salesforce (Actions) destination. When I receive a particular event, I want to create a custom object that is associated with a lead. The event has the lead's email address (a unique identifier for the lead), but not the lead ID.

Ideally, I would use the email address to get the lead ID and then include the lead ID when I create the custom object. Is there any way to do something like this in Segment?

Thanks in advance!

Hi @Hannah B - to make sure I understand, are you wanting a LeadID object to be created and populated with LeadID when the event (with email address) data flows into Salesforce?


Hi @Hannah B - to make sure I understand, are you wanting a LeadID object to be created and populated with LeadID when the event (with email address) data flows into Salesforce?

Thanks for your response! When this particular event is received, the lead object will have already been created. We want to be able to populate the custom object with the lead ID (given the email address).


Hi @Hannah B 

I have found the Actions destination doesn’t work that well for that use case (it can’t query a Lead for a Lead ID and then create another object).  The way I found around it was to:

  1. Create your new object, with a temporary field that will contain the search field (say email, etc)
  2. Create a Salesforce Flow (triggered on object create) which reads this field, looks up the Lead, then assigns the Lead Id to the new object

Hope that helps


Reply