When to use this endpoint

Use CustomerType_updateField only for low-level mapped inline editing. No production CRM1 or CRM2 caller was found during this investigation.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session. The handler performs no additional page or role-permission check.

The lookup and any write use the authenticated tenant; an ID from another tenant cannot be addressed through this call.

Parameters

ParameterTypeRequiredDescription
fieldStringYesMapped field name: id, name, allowedNext, triggers, lastEdited, or colourHex.
valMixedYesReplacement value. Text/char values are stored without customer-type business validation.
idInteger string or native arrayConditionallyOne target ID or an already-decoded ID array. Supply id or ids.
idsInteger string or native arrayConditionallyAlternative bulk target IDs.

Example request

$updated = FM_api('CustomerType_updateField', [
	'id' => '12',
	'field' => 'colourHex',
	'val' => '#224466',
]);

Example response

{
  "ok": 1,
  "oldData": [
    {"id": "12", "colour_hex": "#336699"}
  ]
}

When no matched row needs a change, the response is {"ok":"1","warning":"no change required"} and oldData is omitted.

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.
{"error":"missing or invalid parameter: field"}field is absent.
{"error":"missing or invalid parameter: val"}val is absent or null.
{"error":"missing or invalid field"}field is not in the Customer Type map.
{"error":"missing or invalid parameter: id/ids"}Neither target key is supplied.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Changing any ordinary mapped field also advances last_edited to current server time. A supplied lastEdited value is likewise replaced by current time.
  • Blank names, malformed allowed-next text, invalid trigger text, and arbitrary colours are accepted. Missing target rows can return success under shared-helper behavior.
  • There is no filtering or pagination beyond the explicit target IDs.

Side effects

  • Updates the selected field, invalidates the customer-type cache, and writes the shared audit record.
  • It does not update customers or execute email triggers.

See it in Fieldmotion

CRM1

No production CRM1 caller was found.

CRM2

No production CRM2 caller was found; the configurable editor submits multi-field saves to CustomerType_updateData.

Related endpoints