Create a custom object
sf_create_custom_objectCreates a custom Salesforce object via Tooling API, deriving API name from label and adding a Name field. Requires MC_NEXT_ALLOW_METADATA_CHANGES=true.
Instructions
Create a custom object via the Tooling API (POST /tooling/sobjects/CustomObject). The API name is derived from label (or name) with a "__c" suffix. A Name field is created automatically unless you pass nameFieldType: "AutoNumber". Gated behind MC_NEXT_ALLOW_METADATA_CHANGES=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | API name without the __c suffix, e.g. "Invoice". Defaults to a slug of the label. | |
| label | Yes | Singular label, e.g. "Invoice". | |
| description | No | ||
| pluralLabel | No | Plural label, e.g. "Invoices". Defaults to label + "s". | |
| sharingModel | No | Org-wide default sharing. Default "ReadWrite". | |
| nameFieldType | No | Type of the auto-created Name field. Default "Text". | |
| nameFieldLabel | No | Label for the auto-created Name field. | |
| nameFieldFormat | No | Display format when nameFieldType is "AutoNumber", e.g. "INV-{0000}". | |
| deploymentStatus | No | Deployment status. Default "Deployed". |