MngUpdateCustomer¶
Deprecated
The command still works, with no change to its request, response, or
required permissions. It is superseded by a pair of commands split by
customer kind: MngUpdateClient (set_clients) and MngUpdateLead (set_leads). See
Deprecated Commands.
Updates customer fields. customer_id is required. Password is not changed by this method; use MngSetCustomerPassword.
deposit_allowed and withdrawal_allowed can be updated here and act as
global customer-level Cashier gates.
The same method is the manual CRM operation for recording milestones, by writing
a whole lifecycle_flags mask. KYC and Cashier activity never raise a flag
implicitly. For configured automation, use the workflow action
customer.set_lifecycle_flags.
Only the fields the request changes are written, on top of the current record; see How Updates Are Written.
Lead to client conversion is a separate pair of commands,
MngConvertLeadToClient and
MngConvertClientToLead, which also maintain
conversion_flags and conversion_time. conversion_flags is never accepted as
input, here or anywhere else; conversion_time can be written explicitly as an
ordinary field.
Access Control¶
Requires CRM access and set_customers. Both the current customer and the target updated brand / desk must be inside the manager scope. Admin scope bypasses this check.
If the request changes email, phone, or password, set_customer_contacts is also required. If the manager does not have see_customer_contacts, contact fields in the response are masked.
Request¶
{
"command": "MngUpdateCustomer",
"extID": "1",
"data": {
"customer_id": 1,
"lifecycle_flags": 5,
"customer_kind": 1,
"crm_stage": "qualified",
"assigned_manager_id": 10,
"deposit_allowed": 1,
"withdrawal_allowed": 1,
"avatar": "8e68414e-0e3f-48dd-b7b8-f5be9e26d4f7.svg"
}
}
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
customer_id |
int | Yes | Customer id |
status |
int | No | Operational state: 0 active, 1 blocked, 2 archived |
lifecycle_flags |
int64 | No | Whole milestone mask, 0 or greater. Only the lower bound is checked here, so bits outside the dictionary are stored as supplied. See Lifecycle Flags |
customer_kind |
int | No | 0 lead, 1 client |
source_type |
int | No | Acquisition channel: 0 manual (default), 1 web, 3 affiliate, 5 introducer, 6 referral, 7 lead provider. Values 2 and 4 are retired and rejected |
landing_url, referrer_url |
string | No | Acquisition URLs |
utm_source, utm_medium, utm_campaign, utm_content, utm_term |
string | No | Marketing attribution |
import_batch_id, old_id |
string | No | Import and legacy references |
address_of_residence |
string | No | Residence address, free text, up to 255 characters |
avatar |
string | No | Customer avatar reference, at most 4096 characters. Must be a supported legacy UUID avatar or a registered public customer-avatar upload; omitted means unchanged |
first_contact_time, archive_time |
time_t | No | Lifecycle timestamps |
deposit_allowed |
int | No | 1 deposits allowed, 0 deposits blocked globally for this customer |
withdrawal_allowed |
int | No | 1 withdrawals allowed, 0 withdrawals blocked globally for this customer |
affiliate_id is not accepted: a request that contains it is rejected with
400 INVALID_DATA and nothing is changed. To detach the record from its affiliate, use
MngUnlinkClientAffiliate or
MngUnlinkLeadAffiliate.
Response Data¶
{
"customer": {
"customer_id": 1,
"avatar": "8e68414e-0e3f-48dd-b7b8-f5be9e26d4f7.svg",
"lifecycle_flags": 5,
"customer_kind": 1,
"conversion_flags": 1,
"crm_stage": "qualified",
"assigned_manager_id": 10,
"deposit_allowed": 1,
"withdrawal_allowed": 1
}
}