Alert Low Balance

Alert Low Balance SearchSearch
Author Message
Luis Claudio
New member
Username: Agentelu

Post Number: 11
Registered: 11-2018
Posted on Sunday, April 26, 2020 - 06:32 pm:   

Hello,
could someone tell me how to set a balance alert on the user in nowsms. I want to send an email whenever a user's balance is zero or a specific amount. Thanks.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 6141
Registered: 08-2008
Posted on Monday, April 27, 2020 - 05:51 pm:   

Hi,

I wish I had a better answer for this, but it is limited.

You can receive an email alert when a user's credit balance is zero. On the "Service" page in the configuration program, there is a "Manage Alerts" button where you can configure some system alerts to be forwarded via email. A quota alert when a user's balance reaches 0 is currently considered a "warning" alert. The text of the e-mail will say:

Account XXXXXXX: credit limit exceeded.

However, this is not the only warning alert. Warnings about any messages rejected by the upstream SMSC also trigger a "warning" alert. If you have user accounts that send messages to invalid numbers, these alerts can be overwhelming.

As an alternative, you can poll available credits using an HTTP request. The API is described here:

https://www.nowsms.com/doc/advanced-configuration-settings/provisioning-sms-and- mmsc-user-accounts-via-http

Here's an example:

http://ip:port/provision?User=aaaaaaa&Password=bbbbbb&type=sms&adminaction=credi tcheck&name=cccccc

User/Password is the credentials for an "SMS Users" account with admin access. "name" is the account to be checked.

The response is plain text, like this:

OK
Credits=65



--
Des
NowSMS Support
Luis Claudio
New member
Username: Agentelu

Post Number: 13
Registered: 11-2018
Posted on Monday, April 27, 2020 - 06:23 pm:   

Thanks for the answer.

from what I understand, I'm going to receive all 0 balance alerts in my email, right?
Luis Claudio
New member
Username: Agentelu

Post Number: 14
Registered: 11-2018
Posted on Monday, April 27, 2020 - 07:13 pm:   

I parameterized the alert and received the test email. I made a simulation with a user so that his account would be reset and I did not receive the email. do I have to activate anything else? In the event log I didn't see the account warning record with balance 0. Thanks
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 6143
Registered: 08-2008
Posted on Monday, April 27, 2020 - 07:34 pm:   

I'm sorry. I was mistaken about the e-mail alert for this situation. It was a planned feature for the most recent update that did not get implemented properly. I should have tried it myself. (I did try the HTTP polling requests, and those do work.)

I'm going to check with our engineering team to ask why the e-mail alert is not being triggered.

--
Des
NowSMS Support
Luis Claudio
New member
Username: Agentelu

Post Number: 15
Registered: 11-2018
Posted on Tuesday, April 28, 2020 - 02:40 pm:   

I am already receiving emails, I am receiving emails for all alerts generated by the system, but it seems that emails with low balance information do not enter, or the system is not generating alerts for accounts with balance 0
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 6144
Registered: 08-2008
Posted on Wednesday, April 29, 2020 - 04:55 pm:   

Yes, I understand.

This alert was a planned feature for the most recent update that did not get implemented properly.

Are you running a NowSMS 2020 version? If so, I can post a patch that enables this alert in the next 24-48 hours.

---
Des
NowSMS Support
Luis Claudio
New member
Username: Agentelu

Post Number: 16
Registered: 11-2018
Posted on Wednesday, April 29, 2020 - 08:56 pm:   

No, The version I'm using is 2016.03.28