Customers
Set a customer callback
/a/Customer_setCallback
Store or clear the free-form callback value on one customer.
When to use this endpoint
Use Customer_setCallback when maintaining the callback reminder shown in the legacy customer editor.
The UI supplies a date-time value, but the endpoint itself does not parse or validate a date. Integrations should send a consistent date-time string rather than depend on that permissiveness.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer string | Yes | Customer to update; it must convert to a positive integer. |
val | String | Yes | Callback value. A truthy value is stored verbatim; blank and "0" are stored as SQL null. |
Example request
$result = FM_api('Customer_setCallback', [
'id' => '1088',
'val' => '2026-10-02 09:30:00',
]);
Example response
{
"ok": 1
}
If loose comparison says the value is already set, the legacy response is {"ok":"1","msg":"value already set"}; ok is a string on that path.
Errors and unusual responses
| Response | Condition |
|---|---|
{"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: id"} | id is absent or does not convert to a positive integer. |
{"error":"missing or invalid parameter: val"} | val was omitted. Send a present blank value to clear the callback. |
{"error":"customer does not exist"} | No customer row with that ID exists. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- The lookup does not filter inactive or soft-deleted rows.
- The no-change test uses loose comparison, so type-coercible values can be considered equal.
- No date format, timezone, or maximum length is enforced by this endpoint.
- This is a single-record mutation; it provides no list filtering or pagination.
Side effects
- A real change updates
callback,last_edited, andedited_uuid, and writes a customer audit-log entry. - It does not explicitly invalidate the customer cache or fire
Customer_edit.
See it in Fieldmotion
CRM1
Open the legacy customer edit popup, change Callback with its date-time picker, and filter Network requests for Customer_setCallback.
CRM2
No direct production CRM2 caller was found. CRM2 customer edits use the layout-driven update flow.
Related endpoints
Customer_getretrieves the stored callback value.Customers_listsupports locating customers before applying a reminder.