When to use this endpoint

Use Customers_setCallback for the Customers-page bulk action that assigns one callback date/time to all selected rows.

Use the single-customer setter when you need its normalization contract, or Customer_deleteCallback when clearing both the callback and its notes.

Authentication and permissions

The request must establish tenant context. The handler checks DBP but performs no additional page or role-permission check.

Parameters

ParameterTypeRequiredDescription
idsJSON array stringYesCustomer IDs. Each element is converted to an integer; values below 1 are skipped. The endpoint does not validate the decoded value as an array.
valStringYesRaw callback value stored for every changed row. The handler performs no datetime validation or normalization. An explicitly blank string is accepted.

Example request

$result = FM_api('Customers_setCallback', [
	'ids' => json_encode([1042, 1088]),
	'val' => '2026-10-01 09:30:00',
]);

Example response

{
  "ok": 1
}

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: ids"}The ids key is absent.
{"error":"missing or invalid parameter: val"}The val key is absent.

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

Behaviour and edge cases

  • Rows are read and updated one at a time. Duplicate IDs can be revisited, though the second visit normally detects no change.
  • The lookup does not apply deleted=0, so a soft-deleted customer can be updated.
  • Equality is a direct database-value/string comparison. No timezone or date parsing is performed.
  • There is no pagination or explicit batch limit.

Side effects

  • For each changed row, updates callback, last_edited, and edited_uuid, then writes a customer activity-log entry.
  • Does not change callback notes, write customer change history, send notifications, or fire Customer_edit.

See it in Fieldmotion

CRM1

Select Customers rows and use the bulk callback action. CRM1 sends JSON IDs plus one date/time to Customers_setCallback.

CRM2

Select Customers rows, choose the callback-date bulk action, and filter Network requests for Customers_setCallback.

Related endpoints