Guides / n8n × Salesforce / Field mapping

Restricted vs unrestricted picklists in Salesforce: which one an integration needs

One rejects unknown values loudly; the other accepts them silently and pollutes the value set. The describe flag that tells them apart, and why the loud one is what an integration should want.

Illustrated troubleshooting diagram for Restricted vs unrestricted picklist in Salesforce: which one your integration needs.
No error on an unrestricted picklist — that is the problem: an unknown value is stored as-is and appears in reports as a one-off category nobody defined.
Short answer: A restricted picklist enforces its value set and rejects anything outside it with INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST. An unrestricted picklist stores whatever you send, so a typo or an unmapped source value becomes a new de facto category that breaks grouping in every report. For an integration, restricted is the better setting: it turns a data-quality problem into a visible failure at write time instead of an invisible one discovered months later in a report. Check which you have with the restrictedPicklist flag on the field describe.

The difference is enforcement, and it is a field setting

Both kinds of picklist have a defined value set and both present that set in the UI. The difference appears only on an API write. A restricted picklist checks the incoming value against its set and rejects a value that is not in it. An unrestricted picklist performs no check — the value is stored exactly as sent, even if no one ever defined it.

So an unrestricted field accepts "Gold", "gold", "GOLD " and "Golde" and stores four distinct values. Every report grouping by that field now shows four categories where the business has one, and nothing in Salesforce flagged any of it. Multi-select picklists behave the same way per value in the selection.

The setting lives on the field and is visible in the describe, so you never have to guess which behaviour you are dealing with.

What each does with a value outside its set

RestrictedUnrestricted
API write with an unknown valueRejected with an errorStored as sent
When you find outImmediately, at write timeLater, in a report
Effect on reportsValue set stays cleanSilent proliferation of categories
restrictedPicklist in describetruefalse
Good default for an integrationYesNo

Checking which one a field is

One describe call answers it. The field entry carries restrictedPicklist as a boolean alongside the full picklistValues array, and each entry in that array carries its value, its label and whether it is active. Inactive values are worth noting: on a restricted field they are rejected exactly like unknown ones, which produces a confusing error on a value that is visibly present in the field's configuration.

GET /services/data/v66.0/sobjects/Opportunity/describe
Authorization: Bearer ACCESS_TOKEN

# fields[] entry:
# { "name": "StageName",
#   "type": "picklist",
#   "restrictedPicklist": true,          <- enforcement on/off
#   "picklistValues": [
#     { "value": "Closed Won",   "label": "Closed Won",
#       "active": true,  "defaultValue": false },
#     { "value": "Needs Review", "label": "Needs Review",
#       "active": false, "defaultValue": false }   <- rejected like an unknown value
#   ] }
#
# Note: value is what the API takes. label is display text an admin
# can change at any time without touching the value.

The API takes the value, never the label

This applies to both kinds and is the most frequent cause of rejections on restricted fields. Each picklist entry has a value and a label, and admins change labels for the UI while the underlying value stays fixed. Sending the label works only while the two happen to be identical, and stops working the moment anyone renames anything.

Matching is exact: case-sensitive and space-sensitive. "Closed Won", "closed won" and "Closed Won " with a trailing space are three different strings and only one of them is the value. When a rejection is genuinely baffling, compare the sent string with the describe value character by character — the difference is nearly always case, a space, or punctuation.

Which to choose, and what not to do about it

Restrict fields that an integration writes to. A rejected write is an event you can route to an error branch, count, and fix at the source. A silently stored typo is a data-quality problem that surfaces in a quarterly report, by which point thousands of records carry it and nobody remembers which import introduced it.

The correct integration-side response to a restricted field is a mapping step: convert each source value to the exact API value, trim whitespace, match case, and route anything unmapped to an error branch rather than sending it. Where the business genuinely needs a value Salesforce does not have, add it to the value set in Salesforce — and enable it for the relevant record types — before the workflow sends it.

Two responses look like fixes and are not. Un-restricting the field to stop the errors makes the problem invisible rather than absent. And adding every source variant to the value set to force a match fills the picklist with near-duplicates — "USA", "U.S.A.", "United States" — which defeats the entire point of having a defined set.

On a restricted field, an inactive value is rejected exactly like a value that was never defined. Check active as well as presence when a describe seems to contradict the error.

Turning restriction on for a field that already has bad data

Restricting an existing unrestricted field is the right direction of travel and it is not a free change, because whatever values have accumulated are still sitting in records. Salesforce will stop accepting new values outside the set; it does not retroactively clean the ones already stored, and those records keep their non-conforming values until someone fixes them.

Audit first. A grouped query on the field returns the distinct values actually present with their counts, which usually reveals the shape of the problem in one look: a handful of legitimate values with large counts, and a tail of near-duplicates and typos with counts of one or two.

Decide for each tail value whether it maps onto a real one or was always wrong, fix the records in bulk, and only then restrict the field. Restricting first leaves every subsequent update to one of those records failing, including updates that have nothing to do with the picklist — an unrelated write that happens to include the field in its payload now carries a value the field no longer accepts.

Tell whoever owns the integrations before you do it. A field becoming restricted is invisible from their side until their writes start failing, and the failure names a value that worked the day before.

-- What is actually in the field today
SELECT Tier__c, COUNT(Id)
FROM Account
GROUP BY Tier__c
ORDER BY COUNT(Id) DESC

-- Typical result before restricting:
--   Gold           4,812
--   Silver         3,140
--   gold              27   <- case variant
--   Gold              11   <- trailing space
--   Golde              2   <- typo
-- Fix the tail, then restrict.

Where these facts come from