[SalesForce] Want to update a Contact Record or Create Lead using Form

I want to use either Cloud Pages or Microsites in Marketing Cloud, to host a form in order to update a contact record in SF. I want to look and see if the contact already has an email address in the system and update the contact record object if so, but if they don’t, I want to create a new lead in SF..Could I use AMPscript to pull this off? Tried using smart capture but it does not work exactly like desired.

Thank you!

Best Answer

Yes, you can use ampscript to create new lead as well as update the lead. There is a function with name create salesforce object and retrieve salesforce object. With the help of IF Conditions, you can work around. Let me know if this works for you.