MngSetLeadLifecycleFlags¶
Sets the lifecycle milestones of one lead by writing the whole
lifecycle_flags mask. The request carries the target mask rather than an
increment: the server compares it with the current value and works out which
bits to raise and which to clear.
The command is available through the manager command API only; there is no REST
path for it. The kind is fixed by the command name, so customer_kind is not
accepted on input. See
Clients and Leads Commands.
It replaces the deprecated MngSetCustomerLifecycleFlags. Flag values are listed in Lifecycle Flags.
Access Control¶
Allowed sessions:
SESSION_MANAGERSESSION_ADMINSESSION_DEALERSESSION_CRM_MANAGERSESSION_CRM_ADMIN
The caller must have CRM access and set_leads. The record is checked against the
caller's brand and desk scope.
Every call is written to the journal, successful ones included.
Request¶
Raise Registered, KYC approved, and First deposit, which is 1 + 4 + 8:
{
"command": "MngSetLeadLifecycleFlags",
"extID": "1",
"data": {
"customer_id": 500,
"lifecycle_flags": 13
}
}
Clear every flag:
{
"command": "MngSetLeadLifecycleFlags",
"extID": "2",
"data": {
"customer_id": 500,
"lifecycle_flags": 0
}
}
An empty mask is a valid state, not an error: the record has reached no milestone yet.
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
customer_id |
int | Yes | Target customer id, 1 or greater |
lifecycle_flags |
int64 | Yes | Whole target mask, 0..63 |
The upper bound 63 is the sum of all six known bits. A higher value is
rejected.
Response Data¶
{
"customer_id": 500,
"lifecycle_flags": 13
}
| Field | Type | Description |
|---|---|---|
customer_id |
int | The identifier passed in the request |
lifecycle_flags |
int64 | The resulting mask |
Behavior¶
When the supplied mask equals the current one, the command answers 200 with
that value and writes nothing: no update and no events. The call is therefore
safe to repeat.
The conversion fields conversion_flags and conversion_time are never touched
here; they change only when the kind changes.
Errors¶
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
Request validation failed |
400 |
RET_INVALID_DATA |
The customer exists but is not a lead |
403 |
RET_NOT_ENOUGH_RIGHTS |
Missing permission, missing scope, or the record is outside the caller's visibility |
404 |
RET_NOT_FOUND |
No customer with that identifier exists |
Every error carries a message field with free-form text. Its contents are not
part of the contract; branch on error.