Contact lookup and tracked SMS
Obtain the owner's intended contact and exact message first. SMS can cost money. This workflow needs contacts-read and SMS-send access. Read native data.
- Query
phoneswithdikciz_content_query, matchingdisplay_nameexactly or using literal substringquery. Readdata1, the number. Resolve multiple distinct matches before sending. - Read
dikciz_sim_list. Select the intended activesubscriptionIdwhen no valid default exists or when the owner specifies a SIM. - Call
dikciz_sms_sendwithidempotencyKey,recipient,body, and optionalsubscriptionId:
{"idempotencyKey":"example-request-1","recipient":"4085550100","body":"Example message"}
- Poll
dikciz_sms_statuswith the same key.acceptedmeans submission;sentconfirms successful callbacks for all parts;deliveredconfirms carrier delivery reports for all parts. Missing reports leave delivery unconfirmed. - Read permitted history through
dikciz_content_queryresourcesmswhen needed. Android can save outgoing messages sent by a non-default SMS app.
Retry identical requests with the same key. Different content fails with sms_idempotency_conflict. A persisted submission_unknown must not be resent under a new key without checking. Receipts survive launcher/process restart and expose no body or recipient. Capacity is 512 retained keys; full storage rejects new sends instead of losing duplicate protection.
For a Lua custom event, enable a script, policy and namespaced subscription with manualTrigger. Pass a bounded Lua object table to context.request for contentQuery, require an unambiguous result, then call smsSend. The runtime escapes table values safely. The reply is the canonical envelope: inspect type, result or code. Use a stable caller-supplied request key and poll smsStatus through the same function. Do not concatenate unescaped names or message text into JSON.
Publish network events through dikciz_automation_dispatch with a valid HTML sourceWidgetAddress and an emitEvent action. See event setup. Publication is asynchronous; inspect script status and the SMS receipt.