0

I am using cloud connect between Sales cloud and marketing cloud .I couldnt find information on one issue, Is it possible to use query in marketing cloud activities ,but using sales cloud lead or contact object. I am able to query the synchronised data extention but wondering if it is possible to query the sales cloud object directly .And if so any help on how would be helpful.Thank you.

1 Answer 1

4

You can't do this in Query activity, however it is possible in AmpScript (e.g. in an email or CloudPage). You can a.o. fetch all leads where their region is set to 'west':

%%[ var @rs
Set @rs= RetrieveSalesforceObjects('Lead', 'Id, FirstName,LastName', 'region', '=', 'west')
]%%

If you really need to do this as part of an automation, you can use an SSJS activity. Even though SSJS doesn't have any functions for reading or writing objects in Core, you can reference AmpScript content block to execute above code, while wrapped in a Script Activity code. Adam Spriggs has a some guidance on this, here: Update Salesforce object with a Script Activity

You must log in to answer this question.

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