BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
7 / 81 · Module 4 — Salesforce Connector · filtered: interview← prev⊞ allnext →

4.7CREATE

Suppose you're creating a Contact:

[
    {
        FirstName: "John",
        LastName: "Smith",
        Email: "john@acme.com"
    }
]

Then:

Salesforce Create
Object Type = Contact

Conceptually:

salesforce.create(
    "Contact",
    contacts
);

Result:

[
  {
    "id": "003ABC...",
    "success": true
  }
]

Create is perfectly appropriate when:

this genuinely must be a new record

Examples:

new immutable event

new transaction

new Case

new audit record

The mistake is using Create when you don't know whether the business entity already exists.