phone.invoke
Overview
- Runs a smartphone app action by app and action name, e.g. app=PocketMarket action=purchase_service service_id=Cleaning. It forwards to the command listed by phone.get_actions, so rules, failures and the return value are exactly that command's. Failure messages start with a reason code; UnknownAction means the app/action pair is not in phone.get_actions.
Metadata
| Field | Value |
|---|---|
| Display | Invoke Phone App Action |
| Category | phone |
| Access | ScriptCheat |
| Scope | B2Authority |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| app | string | yes | — | App id from phone.get_actions, e.g. PocketMarket |
| action | string | yes | — | Action name from phone.get_actions, e.g. purchase_service |
| service_id | name | no | — | purchase_service: service to buy, e.g. Cleaning |
| category_id | name | no | — | purchase_service: shopping category, only needed when the service is sold in several categories |
| entity_id | entityId | no | — | purchase_service: Zoi who buys; its household pays (default: possessed) |
Returns
- Freeform result (shape is not fixed).
Same as the target command; see the 'command' field of phone.get_actions.
Usage
await inzoi.cli.execute('phone.invoke', {
app: '',
action: '',
service_id: '', // optional
category_id: '', // optional
entity_id: 0, // optional
});