phone.get_pending_actions
Overview
- Lists home services requested by the household of entity_id (default: the possessed Zoi) that have not finished yet. state is Waiting (no service Zoi assigned yet), InService (dispatched, travelling or working) or Finishing (leaving). context_id is the id returned by pocket_market.purchase_service and stays the same after dispatch. A finished service disappears from the list; there is no history. Finishing may be skipped when the service Zoi leaves on its own schedule, so treat disappearance from the list as completion. For waiting requests next_attempt_time is the game time of the next dispatch attempt (services whose work would run past midnight wait until 00:00); empty when it can be dispatched now. Requests made by the game itself, such as the automatic babysitter or a fire call, are listed too. Fails with InvalidEntity when entity_id is not a positive integer or not a character.
Metadata
| Field | Value |
|---|---|
| Display | Get Pending Phone Actions |
| Category | phone |
| Access | Public |
| Scope | B2Authority |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| entity_id | entityId | no | — | Zoi whose household's requests are listed (default: possessed) |
Returns
Returns a JSON object with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
count | int | yes | Number of requests returned |
actions | array<object> | yes | Unfinished service requests |
actions[].context_id | int | yes | Service context id from purchase time; -1 if unknown |
actions[].execute_context_id | int | yes | Dispatch id; -1 while Waiting |
actions[].service_id | string | yes | Service table row id |
actions[].state | string | yes | Waiting, InService or Finishing |
actions[].trigger_entity_id | entityId | yes | Entity that requested the service |
actions[].site_entity_id | entityId | yes | Site where the service takes place |
actions[].next_attempt_ticks | int | yes | Waiting only: game ticks of the next dispatch attempt, 0 when now |
actions[].next_attempt_time | string | yes | Waiting only: next_attempt_ticks as 'Day N HH:MM' (same day numbering as environment.get_time), empty when now |
Usage
await inzoi.cli.execute('phone.get_pending_actions', {
entity_id: 0, // optional
});