Updating and creating Salesforce objects are by default enabled simultaneously in the integration. Here's what our backend does under the hood.
Setting up the root object tells the integration how the related Salesforce object is searched.
Update and creation as alternatives - a practical example
Allowing both updating and creating objects is especially handy when the source of the Salesforce object's identifier is a survey question.
Let's imagine we have a custom Salesforce object called "Customer". In addition to other identifiers, a Customer object can be identified by Email. There's already one customer in our Salesforce database with email "firstname.lastname@example.org".
On Surveypal side, we create a survey that can be used to collect Customer information. It has three questions that match the Salesforce object's fields: Your email, First name and Last name.
After the survey is created, we can integrate it to Salesforce. Existing Customers are identified by email. The value for question "Your email" is used to identify the Customers. In mappings, all survey questions are mapped to corresponding Salesforce fields.
Now, when a customer fills the survey, response to question "Your email" decides if an existing instance is updated or a new one is created. When Larry Hurst goes to update his information, the Salesforce instance is updated. The email input from the response matches an already existing Salesforce object.
Another customer fills the survey with different contact information. Response to "Your email" is again used to check if a Customer object exists in Salesforce. Since there is no Customer for "email@example.com" a new object instance is created.
Forcing creation of new Salesforce object
When selecting the root object of the integration, it is also possible to force creation of a new object. E.g. "Always create new Customer". This will make the integration skip checking of an existing Salesforce object.