# Account level alerts

**URL:** <https://forums.losant.com/t/account-level-alerts/1100>\
**Category:** Feature Request\
**Created:** [August 28, 2018, 12:30am UTC](https://forums.losant.com/t/account-level-alerts/1100 "2018-08-28T00:30:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Penney](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Christopher\_Penney](https://forums.losant.com/u/Christopher_Penney)\
**Post date:** [August 28, 2018, 12:30am UTC](https://forums.losant.com/t/account-level-alerts/1100/1 "2018-08-28T00:30:03Z")

</div>

Is there a way to set some alerts on the number of payloads or payloads per hour/minute?  
We had a fleet of devices reset to send a payload every second and quickly racked up thousands of unintentional payloads in a short period of time.  
Can this be done with some kind of workflow?

If not, can I suggest account level alerts for this sort of thing? Might be nice to have alerts anyway for other things like billing, integration messages, etc etc to identify and correct.

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [September 4, 2018, 3:23pm UTC](https://forums.losant.com/t/account-level-alerts/1100/2 "2018-09-04T15:23:25Z")

</div>

It’s a good suggestion. I’ll type it up as a feature.

Thinking we send an alert if …

- You come within 10% of your monthly payload limit
- You exceed your monthly payload limit
- Your payloads generated over a 72-hour period would be enough to put you over your monthly limit if continued on that pace

---

<div class="post-metadata">

**Author:** ![Christopher\_Penney](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Christopher\_Penney](https://forums.losant.com/u/Christopher_Penney)\
**Post date:** [September 4, 2018, 3:34pm UTC](https://forums.losant.com/t/account-level-alerts/1100/3 "2018-09-04T15:34:23Z")

</div>

Yeah exactly… Maybe even customizable payload limit alert. User can set 10%, 15% whatever…

---

<div class="post-metadata">

**Author:** ![John\_Hart](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@John\_Hart](https://forums.losant.com/u/John_Hart)\
**Post date:** [January 25, 2025, 9:55pm UTC](https://forums.losant.com/t/account-level-alerts/1100/4 "2025-01-25T21:55:46Z")

</div>

Has there been any activity on this request? I made a mistake on one of my flows and now I’m running without monitoring until next month.

**I know it isn’t Losant’s fault** , but it would be nice if I knew I was running up against the wall as I could have fixed the issue before it became a problem.

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [January 27, 2025, 2:53pm UTC](https://forums.losant.com/t/account-level-alerts/1100/5 "2025-01-27T14:53:39Z")

</div>

There actually has, [pretty recently](https://www.losant.com/blog/platform-update-device-endpoint-authorization-beckhoff-trigger-enhancements-instance-usage-notifications) - but only for organizations. And based on your description it sounds like your application may be in a free sandbox account. The usage notifications are only sent to organizations.

That said, I will file a ticket about getting this feature enabled for sandbox accounts as well.

You could write a workflow that would alert you that you are approaching your sandbox’s payload limit - though every time the workflow runs, that itself would count as a billable payload. Something like the following …

1. Timer Trigger (say, once a day).
2. A pair of [Date/Time Nodes](https://docs.losant.com/workflows/logic/date-time/) in sequence to get the start and end of the current month, in Epoch milliseconds format.
3. HTTP Node that hits the [Me: Payload Counts API endpoint](https://docs.losant.com/rest-api/me/#payload-counts).
  - The `start` and `end` for the call were retrieved using the Date/Time Nodes.
  - `resolution` would be `86400000`, which returns you per-day counts.
  - You would need to create a [User API Token](https://docs.losant.com/user-accounts/user-tokens/) to authenticate this request. You’d want to limit it to only the Me: Payload Counts call mentioned above, and you should also store it in an [HTTP Service Credential](https://docs.losant.com/applications/credentials/#http).

4. A [Function Node](https://docs.losant.com/workflows/logic/function/) to iterate over the response’s properties and sum the values.
5. A [Conditional Node](https://docs.losant.com/workflows/logic/conditional/) to compare the payload sum to your account limit. For example, say you want to send an alert when the usage reaches 90% of the limit, the expression would be something like `({{working.payloadSum}} / {{limit}}) >= 0.9`.
  - The `true` path would lead to an SMS Node or an Email Node or however you want to receive the alert.
  - The `false` path goes nowhere.

You may also want to add some logic to prevent the workflow from sending the alert every day you are over the limit, which you could accomplish by setting a flag and checking it at the top of your workflow using the [Storage: Get Value](https://docs.losant.com/workflows/data/get-value/) and [Storage: Set Value](https://docs.losant.com/workflows/data/store-value/) Nodes. Separately you’d want to reset those at the start of the next month, which you could do with a separate Timer Trigger running once a month in the same flow.

---

<div class="post-metadata">

**Author:** ![John\_Hart](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@John\_Hart](https://forums.losant.com/u/John_Hart)\
**Post date:** [January 27, 2025, 4:42pm UTC](https://forums.losant.com/t/account-level-alerts/1100/6 "2025-01-27T16:42:13Z")

</div>

I can work with this - thank you as always Dylan!
