0

Is it possible to Retrieve Data from a Data Extension and Update Sales cloud record without using Data Sync or Sync Data extension.

If yes, what would be the approach?

1 Answer 1

0

You can use UpdateSingleSalesforceObject to update data on Sales/Service Cloud. This is an example from the doc:

%%[
var @result
set @result = UpdateSingleSalesforceObject('Lead','00Q00003yAEj','Email','[email protected]')
]%%

The system updates the Email field on the Lead with ID 00Q00003yAEj to contain [email protected].

To retreive data, you need to use the RetrieveSalesforceObjects function. It returns a rowset that you can loop through..

Returns a rowset with the selected information from Salesforce objects that match the criteria you specify. This function works only with an account integrated with a Salesforce account. Include multiple sets of ordinals 3, 4, and 5 to retrieve information as necessary. Because this function returns data as a rowset, use Row() and Field() to evaluate the data.

Example: The system returns the first name and last name of all leads in your Salesforce account where the region equals west:

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

Reference:

UpdateSingleSalesforceObject

RetrieveSalesforceObjects

2
  • Should we loop the functionality for multiple retrieving multiple records?
    – CloudDot
    Jan 28, 2020 at 12:59
  • I've updated my answer to include the Retreive function. And yes, it returns a rowset that you can loop through.. Jan 28, 2020 at 13:02

You must log in to answer this question.

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