eSIM operations
The eUICC, the profile, and the operation are in the event’s detail object.
These events are in pre-release and available only to certain Workspaces. To ask about access, contact emnify Support.
How eSIM operation events work
An eSIM operation is a request that you start in the emnify Portal or through the emnify REST API:
- Link and unlink (IDs
90and91): a SIM operation to link an eSIM profile to an EID or to unlink it. - eUICC operations (IDs
92to97): an operation on an IoT eUICC (SGP.32) that runs through the emnify eIM.
The platform generates a request event for each operation, and an outcome event after the SM-DP+ or the eIM runs it. Both have the event type of the operation:
Check the event source to tell a request event from an outcome event. A link or an unlink of several SIMs produces a request event and an outcome event for each SIM.
On an IoT eUICC (SGP.32), one operation can show events from two sources.
For example, a profile download can show a Download eSIM profile event (ID 93) from the eIM and an eSIM profile downloaded event (ID 83) from the SM-DP+.
The platform shows both events and doesn’t merge them.
The sim property identifies the SIM of the profile.
An event that names no profile, or a profile that the platform has no SIM for, has no SIM.
The endpoint property identifies the device when the SIM is assigned to one.
The timestamp of a request event is the time emnify accepted the request.
The timestamp of an outcome event is the time the platform received the outcome.
Link and unlink events
The event types Link eSIM profile and Unlink eSIM profile report a SIM operation for one SIM. For the operations themselves, see Assign EIDs to eSIM profiles.
The request event has the severity Info (ID 0), and its alert property is false.
Its user property identifies who started the operation.
The outcome event contains no user property, because the SM-DP+ reports the outcome.
The outcome event of a successful link or unlink has the severity Info (ID 0).
The outcome event of a failed one has the severity Critical (ID 2), alert set to true, and the error in its detail object.
Link and unlink event description
The description names the profile by its ICCID and the eUICC by its EID.
A request event starts with Requested to:
- Link:
Requested to link eSIM profile with ICCID 89883030001234567894 to EID 89049032001234567890123456789057. - Unlink:
Requested to unlink eSIM profile with ICCID 89883030001234567894 from EID 89049032001234567890123456789057.
An outcome event gives the result:
- Success:
eSIM profile with ICCID 89883030001234567894 linked to EID 89049032001234567890123456789057.For an unlink, the text ends withunlinked from EID 89049032001234567890123456789057. - Failure:
Failed to link eSIM profile with ICCID 89883030001234567894 to EID 89049032001234567890123456789057: <reason>.For an unlink, it starts withFailed to unlinkand names the EID withfrom.
The reason is the message of the error in the detail object.
When the event has no EID, the description leaves it out.
Link eSIM profile
You started a link with the Link by SIM or the Link by Product action.
One event type covers both actions, and action in the detail object shows which one ran.
When the request names a discovery service, the detail object contains it.
On success, the profile is bound to the EID. Its status is Released (Ready to download in the Portal), and the device with that EID can download it. If the request named a discovery service, emnify also published the profile to that service.
After a failure, the error in the detail object tells you why.
If emnify couldn’t publish the profile to the discovery service, the EID isn’t linked and the profile returns to Available.
For what each reason means, see If publication fails.
Unlink eSIM profile
You started an unlink with the Unlink SIM action. An unlink event names no discovery service.
On success, the EID is no longer bound to the profile. The profile returns to Available, so you can link it to the correct EID. If you published the profile to a discovery service, the unlink also withdraws it from that service. Together, the link and unlink events record each EID change and the user who started it.
After a failure, the error in the detail object tells you why.
An unlink works only until a device downloads the profile.
After the download, nobody can unlink the EID, so order a new profile for the device.
Link and unlink detail object
The detail object of a link or unlink event contains the following properties:
The sim_operation object contains the following properties:
The platform leaves out a property that has no value.
eUICC operation events
The event types 92 to 97 report an operation that you scheduled on an IoT eUICC.
The request event has the severity Info (ID 0), and its alert property is false.
Its user property identifies who scheduled the operation.
The outcome event contains no user property, because the eIM reports the outcome.
If the eIM rejects an operation when emnify schedules it, you get only the request event, with no outcome event.
The operation shows Failed in the API, and its error gives the reason, such as not_finished_operations_exist.
One event type covers every outcome of an operation.
The severity and the alert property of the outcome event tell you the outcome:
For example, a failed download is a Download eSIM profile event with the severity Critical. Check the severity or the outcome before you act on the event type.
An operation expires when the eUICC doesn’t run it before the validity period ends, most often because the eUICC didn’t poll the eIM. By default, the eUICC polls the eIM at every device restart and every 24 hours. Check that the device is online. Then schedule the operation again.
eUICC operation event description
The description names the profile by its ICCID and the eUICC by its EID.
A request event starts with Requested to:
- Profile operation:
Requested to enable eSIM profile with ICCID 89883030001234567894 on EID 89049032001234567890123456789057. - Audit:
Requested to audit eUICC with EID 89049032001234567890123456789057. - Fallback attribute:
Requested to set eSIM fallback attribute for profile with ICCID 89883030001234567894 on EID 89049032001234567890123456789057.
An outcome event gives the result:
- Success:
eSIM profile with ICCID 89883030001234567894 enabled on EID 89049032001234567890123456789057. - Warning: the success sentence, followed by
Warning: <reason>. - Failure:
Failed to enable eSIM profile with ICCID 89883030001234567894 on EID 89049032001234567890123456789057: <reason>.
The outcome event of an audit names only the eUICC, as in eUICC with EID 89049032001234567890123456789057 audited.
The outcome event of a fallback attribute operation names eSIM fallback attribute for profile with ICCID 89883030001234567894.
When the platform doesn’t know the ICCID of the profile, the description leaves it out.
The reason comes from the eIM: its error message, or its error reason when it sends no message.
An operation that expires without a reason from the eIM has the reason the operation expired.
Audit eUICC
Reports the operation action Audit eUICC (ID 1).
An audit covers the whole eUICC, so the event names no profile, no SIM, and no device.
To find the eUICC, use euicc.eid in the detail object.
On success, the profiles in the Portal and the API match the eUICC after the platform next syncs it.
After a fallback, the Portal can show the previous profile as active until an audit succeeds and the platform syncs the eUICC.
Download eSIM profile
Reports the operation action Download profile (ID 2).
The event names the profile only after the platform knows its ICCID.
On success, the profile is installed on the eUICC. For a profile from another connectivity provider, the event can contain only the ICCID and the status. The Portal and the API show its provider and profile name after the platform syncs the eUICC with the eIM. The platform syncs an eUICC once a day, and when you open it in the Portal or read it through the API.
After a failure, the error in the detail object gives the reason from the eIM.
Common causes:
- The activation code is wrong. Check it with the connectivity provider.
- Some providers block their consumer profiles on an IoT eUICC. Ask the provider for an IoT profile.
- The SM-DP+ works only in indirect mode.
If a download expires and the device was online the whole time, the SM-DP+ address in the activation code might not exist. See Validity period.
Enable eSIM profile
Reports the operation action Enable profile (ID 3).
On success, the eUICC switched to this profile.
The profile that was active before stays installed, but it’s inactive.
Wait for the outcome event with outcome SUCCESS or WARNING before you delete that profile, because the eUICC can’t delete the active profile.
Set eSIM fallback attribute
Reports the operation action Set fallback attribute (ID 4).
On success, this profile is the fallback profile of the eUICC. The profile that held the fallback attribute before no longer holds it.
The eUICC rejects the operation in two cases:
- The profile doesn’t allow fallback. Choose a profile with
fallback_allowedset totrue. - The current fallback profile is active. Enable a different profile first. Then schedule the operation again.
Delete eSIM profile
Reports the operation action Delete profile (ID 5).
On success, the eUICC deleted the profile.
After the deletion, only the same eUICC can download an emnify profile again.
For an emnify profile, wait for the outcome event with outcome SUCCESS or WARNING before you delete the SIM.
Deleting the SIM doesn’t delete the profile from the eUICC.
See Delete a profile.
If the profile is active, enable a different profile first. Then schedule the delete again.
Unset eSIM fallback attribute
Reports the operation action Unset fallback attribute (ID 6).
When the event names a profile, it’s the profile that held the fallback attribute.
On success, the eUICC has no fallback profile. From then on, a profile that loses coverage stays offline until coverage returns.
The eUICC rejects the operation when the fallback profile is active. Enable a different profile first. Then schedule the operation again.
eUICC operation detail object
The detail object of an eUICC operation event contains the following properties:
The operation object contains the following properties:
The platform leaves out a property that has no value.