Skip to main content

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

FieldValue
DisplayInvoke Phone App Action
Categoryphone
AccessScriptCheat
ScopeB2Authority
TagsExperimental
Aliases—

Parameters

NameTypeRequiredDefaultDescription
appstringyes—App id from phone.get_actions, e.g. PocketMarket
actionstringyes—Action name from phone.get_actions, e.g. purchase_service
service_idnameno—purchase_service: service to buy, e.g. Cleaning
category_idnameno—purchase_service: shopping category, only needed when the service is sold in several categories
entity_identityIdno—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
});