Skip to content

Add push notification as trigger notification type#5079

Merged
shannonbradshaw merged 3 commits into
mainfrom
claude/add-push-notification-triggers-2026-05-27
May 28, 2026
Merged

Add push notification as trigger notification type#5079
shannonbradshaw merged 3 commits into
mainfrom
claude/add-push-notification-triggers-2026-05-27

Conversation

@shannonbradshaw
Copy link
Copy Markdown
Collaborator

Source changes

  • viamrobotics/app#12147 (0fc9b92): Enable push notification triggers — FeatureEnablePushNotifications fallback changed from false to true, making push notifications GA for all organizations.

Related source commits (previously backlogged, now unblocked):

  • viamrobotics/app#11547: Add push notification type to trigger config
  • viamrobotics/app#11550: Add Firebase push notification sender
  • viamrobotics/app#11555: Wire push notifications into all trigger flows (conditional data, data ingestion, liveness)
  • viamrobotics/app#11778: Add security measures (recipient must be robot owner/operator)

Docs changes

  • docs/reference/triggers.md: Add push to notification type options, add application field description, update all JSON templates and attribute table
  • docs/data/trigger-on-data.md: Update description, intro, and builder-mode instructions to include push notifications
  • docs/monitor/alert.md: Update description, intro, and notification methods list
  • docs/monitor/overview.md: Update alert descriptions to include push notifications
  • docs/monitor/monitor.md: Update offline alert description
  • docs/reference/glossary/trigger.md: Update glossary definition
  • docs/data/overview.md: Update monitoring description
  • docs/vision/object-detection/alert-on-detections.md: Update description, intro, pipeline, and troubleshooting
  • docs/vision/object-detection/act-on-detections.md: Update "What's next" link description
  • docs/vision/classify.md: Update related links
  • docs/cli/reference.md: Update trigger notification type list and add push application note

How I found these

  • Backlog item app-f68a9c6-push-notification-trigger (added 2026-04-19, priority 3) identified the missing push notification type
  • Today's diff of app/data/feature_models.go showed FeatureEnablePushNotifications fallback changed to true
  • Grep for email or webhook, webhook or email, webhooks or email across all docs found 11 affected files

Generated by daily docs change agent


Generated by Claude Code

Push notifications for triggers are now enabled by default
(FeatureEnablePushNotifications fallback changed to true in
app#12147). Update all pages that listed only email and webhook
as notification types to also include push notifications.

https://claude.ai/code/session_01BT9nSkipH19xnHcLDn3U9G
@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit 04f9f3f
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/6a184027ea3efa0008feba6f
😎 Deploy Preview https://deploy-preview-5079--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 46 (🟢 up 1 from production)
Accessibility: 99 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label May 27, 2026
Copy link
Copy Markdown
Member

@clintpurser clintpurser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall it's looking good. thanks for getting this updated.

My main point of feedback is missing documentation around setting up push notifications for a custom app. To send to a custom app they must upload their firebase configuration json file to Viam's backend via the CLI. This probably deserves its own bit of documentation, in the same area that documents setting up custom billing, or setting up a custom auth application in fusion Auth via the CLI, its all kind of under the same umbrella of "building a custom application with viam".

Also users will need to have accepted push notification permissions for the given application in order to receive any push notifications.

approving as not to block. perhaps that other bit of documentation i mentioned could be a follow up.

Comment thread docs/monitor/overview.md Outdated
- **Log levels**: alert when error, warning, or info logs appear on a machine.

You configure the alert frequency to control how often alerts fire, which helps prevent alert fatigue as your fleet grows. Notifications can go to specific email addresses, all machine owners, or a webhook endpoint that integrates with services like PagerDuty, Twilio, or Zapier.
You configure the alert frequency to control how often alerts fire, which helps prevent alert fatigue as your fleet grows. Notifications can go to specific email addresses, all machine owners, a webhook endpoint that integrates with services like PagerDuty, Twilio, or Zapier, or a push notification to the Viam mobile app.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth mentioning it could be to the viam mobile app or your own custom mobile app?

that is to say, its not exclusive to the viam mobile app.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 6168a20. Updated to "the Viam mobile app or your own custom mobile app" here, and generalized to "a mobile app" in the trigger-on-data.md intro.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up in 04f9f3f: dropped "to the Viam mobile app" from the intro line of the same step section in docs/data/trigger-on-data.md (it contradicted the very next step, which already says "Viam mobile or a custom app ID"), and extended the CLI reference entry in docs/cli/reference.md to cover custom app IDs.

Comment thread docs/reference/triggers.md Outdated
| `name` | string | **Required** | The name of the trigger |
| `event` | object | **Required** | The trigger event object, which contains the following fields: <ul><li>`type`: The type of the event to trigger on. Options: <ul><li>`part_data_ingested`: fire when data syncs</li> <li>`conditional_data_ingested`: fire when data that meets a certain condition syncs</li> <li>`part_online`: fire when the part is online</li> <li>`part_offline`: fire when the part is offline</li> <li>`conditional_logs_ingested`: check every hour and fire if logs of the specified log level are present</li></ul></li><li>`data_types`: Required with `type` `part_data_ingested`. An array of data types that trigger the event. Options: `binary`, `tabular`, `file`, `unspecified`. </li><li> `conditional`: Required when `type` is `conditional_data_ingested`. For more information about this field, see [Conditional attributes](/reference/triggers/#conditional-attributes). </li><li> `log_levels`: Required when `type` is `conditional_logs_ingested`. An array of log levels. Options: `error`, `warn`, `info`. </li></ul> |
| `notifications` | object | **Required** | The notifications object, which contains the following fields: <ul><li>`type`: The type of the notification. Options: `webhook`, `email`</li><li>`value`: The URL to send the request to, the email address to notify, or `all_machine_owners` to notify all machine owners.</li><li>`seconds_between_notifications`: The interval between notifications in seconds. This field is ignored for event type `conditional_logs_ingested` where the interval is always one hour.</li></ul> For more information on webhooks, see [Webhook attributes](#webhook-attributes). |
| `notifications` | object | **Required** | The notifications object, which contains the following fields: <ul><li>`type`: The type of the notification. Options: `webhook`, `email`, `push`</li><li>`value`: The URL to send the request to, the email address to notify, or `all_machine_owners` to notify all machine owners.</li><li>`seconds_between_notifications`: The interval between notifications in seconds. This field is ignored for event type `conditional_logs_ingested` where the interval is always one hour.</li><li>`application`: Required when `type` is `push`. The application ID for push notifications. Use `com.viam.viammobile` for the Viam mobile app.</li></ul> For more information on webhooks, see [Webhook attributes](#webhook-attributes). For push notifications, the recipient specified in `value` must be a machine owner or operator. |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not sure if this is the place to mention it. but if users want to send to a certain application ID, they must ensure the firebase credentials are uploaded to Viam through the CLI. there are methods for setting it up there. maybe that ought to be documented elsewhere though.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 6168a20. Added a note here that custom application IDs require uploading Firebase credentials to Viam using the CLI, and that recipients must have accepted push notification permissions. Agreed that the full custom-app push notification setup flow (Firebase config upload, CLI methods) deserves its own docs page — recorded as a follow-up item.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up in 04f9f3f: the table now links the Firebase CLI mention to organizations firebase-config set, and the CLI reference entry for add-trigger does the same. The dedicated end-to-end custom-push-notification setup page is still a follow-up — recording it on code-map/backlog.yaml next.

claude and others added 2 commits May 28, 2026 03:12
- overview.md: mention custom mobile apps alongside Viam mobile
- trigger-on-data.md: generalize to "a mobile app" instead of "the Viam mobile app"
- triggers.md: note custom app ID requires Firebase credentials via CLI,
  and recipients must accept push notification permissions

https://claude.ai/code/session_01BT9nSkipH19xnHcLDn3U9G
- trigger-on-data.md: drop "to the Viam mobile app" from intro line
  that contradicted the immediately-following "Viam mobile or a custom
  app ID" step; rename "Notification frequency" heading to
  "Notification interval" since the section documents the
  seconds_between_notifications JSON field, not the UI "Alert
  frequency" control
- cli/reference.md: extend `application` description to cover custom
  app IDs, link to `organizations firebase-config set`, add recipient
  permissions caveat
- reference/triggers.md: link the table's Firebase mention to
  `/cli/reference/#organizations-firebase-config-set`

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@martha-johnston
Copy link
Copy Markdown
Contributor

looks good! a couple of thoughts

  • for the organization firebase-config set, it could be good to have some more info on the additional fields needed to set the firebase config correctly (org id, app id, firebase json)
  • might also be good to add some docs about UploadDeviceToken for third party apps. any non viam mobile app needs to add code to collect device tokens and then use UploadDeviceToken to store them in mongo associated with the correct user
  • for third party apps, in order for a push notification to be sent to that app, the machine the trigger is on must have a fragment that's owned by the same org that owns the app id (which is tied to the org in organization firebase-config

Copy link
Copy Markdown
Collaborator Author

Thanks for the detailed breakdown @martha-johnston! Recorded all three points as a follow-up backlog item for a dedicated custom-app push notification setup page:

  1. organization firebase-config set fields (org id, app id, firebase JSON)
  2. UploadDeviceToken requirement for non-Viam-mobile apps (collect device tokens → store via API)
  3. Fragment ownership constraint (machine must import a fragment owned by the same org that owns the app ID)

This PR keeps the scope to adding push as a notification type across the existing trigger docs. The full custom-app setup guide will be a separate page.


Generated by Claude Code

@shannonbradshaw shannonbradshaw merged commit 8767b57 into main May 28, 2026
13 checks passed
@shannonbradshaw shannonbradshaw deleted the claude/add-push-notification-triggers-2026-05-27 branch May 28, 2026 14:44
@github-actions
Copy link
Copy Markdown

🔎💬 Inkeep AI search and chat service is syncing content for source 'Viam Docs'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to build This pull request is marked safe to build from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants