Subscribe to email events
Users can subscribe to Event Service and get notifications regarding their email delivery status. To consume events, users have to follow the events-consumer onboarding process.
To know more about Event Service refer to Trimble Event Service Developer Guide.
Event Name: Transactional Email Delivery Status
The following list is the different types of events:
- Delivered - The email was delivered to the recipient.
- Failed - The recipient did not receive the email. Refer to a list of Common SMTP Errors for more information.
Example “delivered” event type
[ { "id": "107", "specversion": "1.0", "type": "delivered", "time": "2022-11-09T07:10:50.52Z", "source": "be62520d-f3fe-47e5-b9b0-efc7ed862f2d", "subject": "Identity User Account Creation", "datacontenttype": "application/json", "dataschema": "https://cloud.stage.api.trimblecloud.com/events/registry/1.0/schematype/data/namespaces/com.trimble.cloud.transactional.email/events/transactional.email.delivery.status/v1.0", "data": "{\"recipient\":\"example@domain.com\",\"sender\":\"Trimble Identity <no-reply@account.trimble.com>\",\"message_subject\":\"Trimble Account Creation Notification\",\"message_id\":\"202008@account.trimble.com\",\"event_id\":\"hZPyw...\",\"event_type\":\"delivered\",\"timestamp\":1597346777.889714,\"user_variables\":{\"template_name\":\"Identity_Account_Creation\",\"template_id\":\"83f9e25b83c786a6fafc85eff13ddf6e\"},\"delivery_status\":{\"attempt_number\":1,\"message\":\"OK\",\"code\":250}}" }]Example “failed” event type
[ { "id": "72b95fce-959a-4ac9-cvfg-45565fbf7991", "specversion": "1.0", "type": "failed", "time": "2022-11-29 08:27:19.667335", "source": "3506f39f-3083-440b-b823-0bda71248d29", "subject": "Trimble Invitation - Sign in", "datacontenttype": "application/json", "dataschema": "https://cloud.stage.api.trimblecloud.com/events/registry/1.0/schematype/data/namespaces/com.trimble.cloud.transactional.email/events/transactional.email.delivery.status/v1.0", "data": "{\"recipient\": \"wm-dev-user1@trimbleautomation.com\", \"sender\": \"Trimble Identity <no-reply@account.stage.utilities.trimblecloud.com>\", \"message_subject\": \"Trimble Invitation - Sign in\", \"message_id\": \"20221129082654.99490d3f5a3ef1b5@account.stage.utilities.trimblecloud.com\", \"event_id\": \"uid1AI4pSzCCKkdQ9VaxWw\", \"event_type\": \"failed\", \"timestamp\": 1669710434.381859, \"user_variables\": {\"template_name\": \"invite_service_existing_user\", \"template_id\": \"1b8a179b-8f55-4641-a4d4-a56e45a6cfc5\"}, \"app_id\": \"3506f39f-3083-440b-b823-0bda71248d29\", \"delivery_status\": {\"code\": 498, \"description\": \"\", \"session-seconds\": 0.0, \"enhanced-code\": \"\", \"attempt-no\": 1, \"message\": \"No MX for trimbleautomation.com\"}, \"failure_type\": \"permanent\", \"failure_reason\": \"generic\"}" }]Example “other” event type
[ { "id": "7e95f6af-9c8f-abcd-ba1f-2de1ef185c35", "specversion": "1.0", "type": "other", "time": "2022-11-29 08:32:40.018275", "source": "5fyhjyu-9c8f-abcd-ba1f-456788", "subject": "", "datacontenttype": "application/json", "dataschema": "https://cloud.stage.api.trimblecloud.com/events/registry/1.0/schematype/data/namespaces/com.trimble.cloud.transactional.email/events/transactional.email.delivery.status/v1.0", "data": "{\"recipient\": \"karthik_sm+stg_441@trimble.com.test-google-a.com\", \"sender\": \"\", \"message_subject\": \"\", \"message_id\": \"20221129055852.6c102f45488fe1ee@account.stage.utilities.trimblecloud.com\", \"event_id\": \"rmuej8ETSmyumrHk4w6-RA\", \"event_type\": \"other\", \"timestamp\": 1669710756.6941798, \"user_variables\": {\"template_name\": \"verification_code_v2\", \"template_id\": \"7e95f6af-9c8f-abcd-ba1f-2de1ef185c35\"}, \"app_id\": \"5fyhjyu-9c8f-abcd-ba1f-456788\"}" }]