Accessing data from an event
What a variable contains depends on which of two kinds of event fired:- Events that carry a message from your device or network — SMS, TCP/UDP, and socket API messages. Here
<<decdata>>is exactly what the device sent, which can be plain text or a JSON object. - System-generated events — Data warnings, data limits, IMEI changes, and similar. Your device sends nothing; Hologram builds a defined JSON payload, so
<<decdata>>is a predictable object whose fields you can reference individually (for example,<<decdata.msg>>).
Where variable values come from
Excepting the device payload in<<decdata>>, you don’t author any of the event data, you reference it. For a data warning event, for example:
<<received>>→ when Hologram received the event, such as2026-07-16T17:51:47+00:00<<tags>>→ the event’s tags, such as["_DEVICE_1234567_", "_DATAWARNING_"]<<device.name>>and<<device.id>>→ the SIM’s name and device ID<<data>>→ the raw payload, base64-encoded;<<decdata>>→ that same payload, decoded to{ "msg": "Device 1234567 has hit usage warning threshold.", … }
The full event versus its payload
Those variables each read a specific part of the event — none of them returns the whole thing. When you view an event in event history or through the events API, you see a wrapper of metadata around the message, and<<decdata>> returns only the innermost, decoded payload. Here is a complete IMEI change event, decoded:
<<decdata>>returns only the innermostdata— the decoded message payload, not the wrapper around it:<<data>>returns that same payload before decoding, as a base64 string.<<received>>,<<tags>>,<<device.name>>, and<<device.id>>read the surrounding fields (received,tags,device_name, anddevice_id) — not the payload.
Variables available in alerts
Variables are replaced with literal text when the notification is sent. When you use a variable inside a JSON payload, whether to wrap it in quotes depends on the type of value it is replaced with:Events that carry a device or network message
For these events,<<decdata>> is the message your device or the network sent. Hologram doesn’t change it — whatever was transmitted is what you receive. Events in this category include:
- Socket API messages — the device sends data directly to the Hologram socket API, as plain text or JSON.
- SMS — inbound and outbound messages.
<<decdata>>is the message text. - TCP/UDP messages —
<<decdata>>is the message the device sent.
<<decdata>> depends on what it transmits:
- If your device sends plain text, wrap it in quotes so it forms a valid JSON string:
"<<decdata>>". - If your device sends a JSON object, leave it unquoted so it nests as an object.
Example: Forward a device reading to a webhook
A device that reports{ "temperature": 23.5 } can be forwarded to a downstream service:
- URL –
https://example.com/webhook - Body
POST request with the following body:
System-generated event data
For these events, your device sends nothing. Hologram generates the event and builds a defined JSON payload, so<<decdata>> is a predictable object — and you can pull individual fields with <<decdata.fieldName>> (for example, <<decdata.msg>>).
The following payloads show what <<decdata>> contains for each system-generated event.
Data warning threshold reached — _DATAWARNING_
Data warning threshold reached — _DATAWARNING_
Sent when a SIM crosses a data warning threshold.
Data limit reached and SIM paused — _DATALIMIT_
Data limit reached and SIM paused — _DATALIMIT_
Sent when a SIM reaches its data limit and is paused.
First IMEI recognized — _IMEI_FIRST_
First IMEI recognized — _IMEI_FIRST_
Sent the first time an IMEI is detected for a SIM.
IMEI change — _IMEI_CHANGE_
IMEI change — _IMEI_CHANGE_
Sent when the IMEI for a SIM changes between sessions. When the TAC prefix also changes, the event additionally carries the
_IMEI_TAC_CHANGE_ tag.SMS delivered — _SMS_DT_DELIVERED_
SMS delivered — _SMS_DT_DELIVERED_
Sent when an SMS is delivered to a SIM. This payload is plain text, not JSON, so wrap it in quotes when using it in a JSON body:
"<<decdata>>".Conductor configuration change — _EUICC_CONFIGURE_SIM_
Conductor configuration change — _EUICC_CONFIGURE_SIM_
Sent as Conductor applies an eSIM profile configuration change. The
configuration_plan array lists one entry per action, each with its own status (such as PLANNED, PENDING, COMPLETE, or ERROR).Example: Reference specific fields from a system event
Because system payloads are structured, reference the fields you need instead of sending the whole object. Send a readable summary by email:- Recipients –
ops@example.com - Subject –
Usage warning for <<device.name>> - Message –
<<decdata.msg>> (device <<decdata.deviceid>>)
- URL –
https://example.com/webhook - Body
usage_bytes is a number, so it is unquoted, while the string fields are wrapped in quotes.