Skip to content

MngExportCustomersByFilter

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: MngExportClientsByFilter (export_clients) and MngExportLeadsByFilter (export_leads). See Deprecated Commands.

Exports customers by filter to CSV or Excel.

Contact fields can be exported in masked or full form. Filtering always works against full stored values.

The export is not paginated. It exports all customers matching the filter.

Access Control

Requires CRM access and export_customers. Export rows are limited by manager brand / desks unless the manager has see_all_customers or admin scope.

Full contact export (contacts: "full" or mask_contacts: 0) additionally requires see_customer_contacts. Otherwise contact export must stay masked.

Statuses and types are exported as human-readable values:

  • type: Individual, Business
  • status: Active, Blocked, Archived
  • lifecycle_flags: the raised flags as labels separated by commas, in a fixed order, for example Registered, KYC approved, First deposit. An empty mask exports an empty string
  • customer_kind: Lead, Client
  • dictionary statuses such as kyc_status, sales_status, risk_status, finance_status: status name from customer_statuses
  • compliance statuses such as aml_status, risk_level, pep_status, sanctions_status: readable enum text

Request Parameters

Name Type Required Description
format string Yes csv or excel
contacts string No masked or full, default masked
mask_contacts int No Alternative flag: 1 masked, 0 full
select array No Export columns. Empty or missing means default columns. lifecycle_stage is no longer an allowed field. address_of_residence (header Address of residence) is not a default column and is exported only when listed here
where, orWhere, whereNot, whereIn, whereNotIn, whereBetween, whereNotBetween array No Same filter format as list methods
orderBy array No Sort definition

Request

{
  "command": "MngExportCustomersByFilter",
  "extID": "1",
  "data": {
    "format": "csv",
    "contacts": "full",
    "select": ["customer_id", "full_name", "email", "phone", "type", "status", "lifecycle_flags", "customer_kind", "kyc_status"],
    "where": [
      ["email", "like", "example.com"]
    ]
  }
}

Response Data

{
  "file_name": "b1a4d4c8-7a99-4f64-aef0-0d8d1f9db1b9.csv"
}

Lifecycle Columns

lifecycle_flags and customer_kind belong to the default column set and take the positions lifecycle_stage used to occupy. Both are exported as text rather than as numbers, which is the difference from the CRM list commands: those return the raw mask. Flag values are listed in Lifecycle Flags.

lifecycle_stage has been dropped from the allowed export fields. Passing it in select refuses the whole export with unsupported export field: lifecycle_stage.