household_biz.get_customer_diagnostics
Overview
- Returns why a business customer is or is not eligible for restaurant service: visit ticks, entry/payment flags, pending party and waiting queue membership, table assignment, and the gate that emptied the resolved party.
Metadata
| Field | Value |
|---|---|
| Display | Get Customer Diagnostics |
| Category | household_biz |
| Access | Public |
| Scope | B2Authority |
| Tags | — |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| customer_entity_id | entityId | yes | — | Customer entity id to diagnose |
| household_biz_id | entityId | no | — | Target HouseholdBiz entity id (default: possessed) |
Returns
Returns a JSON object with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
is_customer_in_site | bool | yes | Whether the customer is currently registered as being in the site |
has_entered_site | bool | yes | Whether an enter tick was recorded for the last visit |
has_leaved_site | bool | yes | Whether a leave tick was recorded for the last visit |
enter_ticks | int | yes | Enter ticks of the last visit (-1 when unset) |
leave_ticks | int | yes | Leave ticks of the last visit (-1 when unset) |
visit_count | int | yes | Number of recorded visits today |
is_manual_entry_customer | bool | yes | Whether the customer entered the site directly instead of through the customer spawn flow |
is_restaurant_service_completed | bool | yes | Whether a ResidenceFamily customer already completed a restaurant payment this visit |
has_paid_entrance_fee | bool | yes | Whether the one-time entrance fee was paid |
is_in_pending_party | bool | yes | Whether the customer belongs to a pending party that has not fully arrived |
pending_party_member_ids | array<entityId> | yes | All members of the pending party |
pending_party_absent_member_ids | array<entityId> | yes | Pending party members that have not arrived at the site |
is_in_waiting_queue | bool | yes | Whether the customer is enqueued for table assignment |
waiting_party_member_ids | array<entityId> | yes | Members of the waiting queue entry |
has_assigned_table | bool | yes | Whether a table is currently assigned to the customer |
assigned_table_entity_id | entityId | yes | Assigned table entity id (-1 when none) |
party_size | int | yes | Size of the party resolved by GetCustomerPartyForMember |
party_customer_ids | array<entityId> | yes | Resolved party customer entity ids |
party_block_reason | string | yes | None, NotInSite, RestaurantServiceCompleted, PendingPartyNotAllArrived, or ZoiGroupMemberNotArrived |
Usage
await inzoi.cli.execute('household_biz.get_customer_diagnostics', {
customer_entity_id: 0,
household_biz_id: 0, // optional
});