I currently have a Marketing Cloud CloudPage form that retrieves information from the Contact object in Salesforce CRM to identify a matching contact in our system. If a match is found, it creates and assigns a task to the correct sales team member.

We currently have Zipcode as a required entry on our form, but in our system there are two potential Zipcode fields it could match on. We want to increase our match rate by checking both Zipcode fields for a possible match. Below is the current code:

SET @rs = RetrieveSalesforceObjects(
                          "Id, FirstName, LastName, Email, Phone, MailingPostalCode, Region__c",

What I want to say is MailingPostalCode OR PhysicalPostalCode -- from what I have read about the RetrieveSalesforceObjects this can't be done, but I thought I would check with this group to see if someone has found a solution.

Thanks in advance for your help.

1 Answer 1


You can use a simple if else statement. Do the first retrieve request with MailingPostalCode and check the rowcount. If the rowcount = 0, then do the next retrieve with PhysicalPostalCode or vice-versa.

You must log in to answer this question.

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