I would like to be able to create a custom object record from a one click on a cloud pages, page. I am looking for the method that I would go about this? The information that I am seeing on the help page states the following: https://help.salesforce.com/articleView?id=mc_es_smart_capture_form_actions.htm&type=5

'Salesforce: Add record to Salesforce Object' but I am not able to find more information about how I would parse the information to Salesforce. I do not want to ingest this straight in to Marketing Cloud.

1 Answer 1


Firstly I would like to thank Eliot Harper for creating this amazing site Ampscript Guide.


To demonstrate I have created a Custom object called Animal in Sales Cloud.
With a standard field Name and a custom field Animal_type

enter image description here

Next you must create a Cloud-Page as below (change the UI as required). enter image description here

if RequestParameter("submitted") == true then
set @createAnimal = CreateSalesforceObject(
        "Animal__c", 2,
        "Name", RequestParameter("AnimalName"),
        "Animal_type__c", RequestParameter("AnimalType"),
<!DOCTYPE html>
      %%[ if not empty(@createAnimal) then ]%%
         <p>%%=v(@createAnimal)=%% record created in Animal Object</p>
      %%[ endif ]%%
      <form action="%%=RequestParameter('PAGEURL')=%%" method="post">
         <label>Animal Name: </label>
         <input type="text" name="AnimalName">
         <label for="AnimalType">Animal Type: </label>
         <select name="AnimalType">
            <option value="Pet">Pet</option>
            <option value="Wild">Wild</option>
         <input name="submitted" type="hidden" value="true" />
         <input type="submit" value="Submit">

Then once you submit the form, enter image description here

A new record will be created in Sales cloud and 18digit record ID will be returned. enter image description here

You can use this ID to find the newly created record in Sales cloud. enter image description here

  • Yes, this is the way to go. Forget about the smart capture with salesforce link. This only works with the legacy "Landing Pages" feature in Classic Content. Besides not being available to most customers anymore it has been a massive pain in the a** that was sometimes more tricky than starting from scratch based on the approach described here. Mar 12, 2020 at 22:51

You must log in to answer this question.

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