.. _number-inventory-alerting:

Number inventory alerting
------------------------------

.. tip:: 

   :ref:`use-action-search-to-navigate-automate`




Overview 
..........


Alerts can be configured to be sent if a specific internal number inventory
threshold is reached - for example, if less than ten percent of numbers are available.
This alert then allows for proactive management of the inventory.

Optionally, you can enable email so that a summary of the inventory status is
emailed each day when the schedule runs. 

There are two key hierarchy elements to the setup:

* Hierarchy the alerting is enabled for - since this is managed through Global Settings,
  it can be enabled at the required hierarchy level(s) based on your needs and it will be
  enabled for all hierarchy levels below that.  For instance, if you wanted this enabled
  for all sites, you could enable it at say the customer level. All the sites would then
  be enabled. Alternatively, if you only wanted this enabled for some sites, you can
  enable the global setting at those sites only.
* It also includes the concept of an aggregation level - this determines how the calculation
  for available percentage is executed. For instance, if you set aggregation to the customer
  level, determining if the threshold is exceed is determined by looking at all the
  inventories at the customer and below. However, if you set it to site, then the threshold
  calculation is run for each site and the alert will indicate any site(s) that exceed the
  threshold.  

Therefore, you can determine the best setup based on your specific needs and how you are
using the inventory. If you generally use a more a site-based inventory (due to geographical
numbers, local breakout, etc) then site aggregation is likely your best option. On the other
hand, if your setup is more of a shared number pool environment, then customer level is
likely a better aggregation choice.

Use cases would be:

* An administrator wishes to determine if any *sites* within the organization are running low on numbers.
  Each site has their own dedicated pool of numbers. So the administrator configures alerting at the
  Customer level with an **Alert Aggregate Level** of "Site" in the **Global Settings**.

* An administrator has a single pool of numbers, shared shared across locations in the organization.
  So the administrator configures an **Alert Aggregate Level** of "Customer".

In the event that a Provider would want to monitor any customer that is running low on numbers,
they would configure the alert at Provider level and set the **Alert Aggregate Level** to "Customer".




Configure number inventory alerting 
.....................................

1. In the Global Settings, on the Number Inventory Alerting tab, 
   set **Enable Alert on Available Numbers** to **Yes**, and configure also: 

   * Select a hierarchy level at which the *aggregate* of available numbers should be calculated.
   * Select or fill out a percentage available of the total numbers at which point alerts will be raised.
   * Enable an Email Group to be notified and select it. 
     
     Email content templates can be configured. 

     .. raw:: html
     
        See Number Inventory Alerting Email Template Variables <a href="concepts-email.html">Email Setup</a>.
     
     .. raw:: latex
     
        See Number Inventory Alerting Email Template Variables section under Email Setup in the Core Feature Guide.

   * Ignore hierarchies with no numbers.

2. If required, modify scheduled time for alerts. 

   When alerts are enabled, a schedule called ``InternalNumberInventoryAlert`` is created that, by default
   runs daily at the time ``00:00:00`` and raises an alert if the availability threshold in the global settings 
   is exceeded. This scheduled time can be modified. See *Create or Update a Schedule* in the Core Feature Guide.

3. View raised alert messages, which display via the **Messages** toolbar icon, or via 
   the **Alerts** page.

   .. raw:: html

      See Number Inventory Alerts under <a href="concepts-alerts.html">Alert Types</a>.

   .. raw:: latex

      See Number Inventory Alerts under Alert Types in the Core Feature Guide.




.. rubric:: Related topics 

* 
   .. raw:: html

      See the Number Inventory Alerting tab in <a href="concepts-global-settings.html">Global Settings</a>

   .. raw:: latex

      See the Number Inventory Alerting tab description for Global Settings in the Core Feature Guide.