.. _nbi-appendix-a:

-----------------------------------------------
Appendix A: Trigger Events and Tracking Table
-----------------------------------------------


Billing Trigger Events (VOSS Automate Transaction Log)
=======================================================

The VOSS Automate Transaction is monitored by NBI (polled every five
seconds) for bill affecting events. This section describes the *Events* deemed as
bill affecting, and which cause NBI to raise a billing payload.

In the case where such an event creates a payload that is identical to
the one sent previously for that subscriber (i.e. a service parameter
has been changed against a subscriber but this parameter is not included
in the payload), then the payload is marked as *SameAsPrevious* in the
message tracking log.

:: 

   "actions": [
        "Create Subscriber",
        "Update Subscriber",
        "Delete Subscriber",
        "Create Cucm User",
        "Update Cucm User",
        "Delete Cucm User",
        "Create Cucm Phone",
        "Update Cucm Phone",
        "Delete Cucm Phone",
        "Create Cucm Line",
        "Update Cucm Line",
        "Delete Cucm Line",
        "Create Cuc User",
        "Update Cuc User",
        "Delete Cuc User",
        "Update Bde Bulk",
        "Create Quick Subscriber View",
        "Create User Extended Dat",
        "Delete User Extended",
        "Create Hierarchy Node",
        "Update Hierarchy Node",
        "Delete Hierarchy Node",
        "Create Hierarchy Delete",
        "Create User Phone Move Users View"
    ]


Tracking Table
=================

The *Tracking Table* contains a history of all billable events and the
payloads associated with them.

================  ===================================================
Payload Status    The current state of the changed entity. See the   
                  list of possible states below.

Entity Type       Only needed if the entity type is not always 
                  Subscriber

PKID              VOSS Automate Subscriber PKID

Payload           Contains the JSON format event payload data.

ID                A sequential number. A unique identifier for the 
                  tracking table.

Transaction ID    The VOSS Automate Transaction ID.

User ID           The user who initiated the transaction on 
                  VOSS Automate.

Operation         Create, Update or Delete

Customer          Customer name (of the changed Subscriber)

Site              Site location name (of the changed Location)

Time              Last updated timestamp

Order ID          The order into which this change was included 
                  (set on callback from).
================  ===================================================


Payload Status
===============

Billing Payloads are marked with one of the following status fields:

.. tabularcolumns:: |p{5cm}|p{10cm}|

+--------------------------------------+-------------------------------------------------------------+
| Field                                | Description                                                 |
+======================================+=============================================================+
| Received                             | A subscriber change on VOSS Automate has been detected      |
|                                      | (Change Record) and NBI is in the process of creating a     |
|                                      | Tracking Table record. This is a transient state.           |
+--------------------------------------+-------------------------------------------------------------+
| Ready                                | The Tracking Table Record is populated with all the         |
|                                      | required information and the billing payload is ready for   |
|                                      | sending northbound.                                         |
+--------------------------------------+-------------------------------------------------------------+
| UserInProgress                       | The billing payload has been created, sent northbound and   |
|                                      | an acknowledgement has been received (200 Ok) – now waiting |
|                                      | for an order status update / Call Back.                     |
+--------------------------------------+-------------------------------------------------------------+
| SendFailed / Resent                  | The sending of the billing payload northbound has failed –  |
|                                      | this is most likely due to a network connectivity or        |
|                                      | credential error (certificates). The option is available    |
|                                      | for an Administrator to resend a message in this state from | 
|                                      | the GUI - during this process the message is temporarily    |
|                                      | marked as *Resent*.                                         |
+--------------------------------------+-------------------------------------------------------------+
| ValidationFailed                     | The format or content of the payload is not valid (basic    | 
|                                      | payload validation). This is most likely a set-up           |
|                                      | configuration issue that will need escalation to resolve.   |
+--------------------------------------+-------------------------------------------------------------+
| UserProcessed                        | The Call Back has been received from the northbound system  |
|                                      | with a successful status ("Success"). This indicates that   |
|                                      | the billing process is complete.                            |
+--------------------------------------+-------------------------------------------------------------+
| UserFailed                           | The Call Back has been received from the northbound         |
|                                      | system – the operation has not been successful and a status | 
|                                      | report has been included in *State Update Message*.         |
|                                      |                                                             |
|                                      | The latter is a report from the northbound system to        | 
|                                      | indicate the reason for the failure and further             |
|                                      | investigation is required.                                  |
+--------------------------------------+-------------------------------------------------------------+
| SameAsPrevious                       | The billing payload was created but not sent to the         | 
|                                      | northbound system. This is because the contents of the      | 
|                                      | billing payload have not changed from the previous payload  | 
|                                      | sent for this subscriber.                                   | 
+--------------------------------------+-------------------------------------------------------------+
| UserInProgressMob / UserProcessedMob | Intermediate states where the upstream system is            | 
|                                      | undertaking secondary provisioning activities (such as      | 
|                                      | mobile provisioning) – see Integration and Upstream         |
|                                      | Provisioning section.                                       |
+--------------------------------------+-------------------------------------------------------------+



