UsageEventCounter

Version: 1.33

Create usageEventCounters in the Gotransverse GUI as you need them. Gotransverse provides the following kinds of Counters:

  • UsageChargeCounter

  • UsageEventCounter

  • UsageRuleCounter

If needed, refer to the following related topics:

  • AddCounterToService

  • UpdateOpenCounters

  • CounterStatus

  • CounterType

Further Gotransverse API information for this entity of UsageEventCounter:

Parameters

When you query Counters, the following table provides information about the values returned for UsageEventCounters from the query:

Elements
Element Name Query
Key
Element
Type
Field
Length
Required
to Create
Description

queryScope

QueryScope

- -

N

The depth of the query results, whether
they are SHALLOW or DEEP.
See QueryScope for details.

eid

Y

Long

System
Generated

System
Generated

System generated unique identity number
assigned to the Counter.

Choose one:
-servicePeriodCounterResetCriteria
-agreementCounterResetCriteria

Choose one:
-ServicePeriodCounterResetCriteria
-AgreementCounterResetCriteria

- -

The type of Counter Reset. See:
-ServicePeriodCounterResetCriteria OR
-AgreementCounterResetCriteria

name

Y

String

255

Y

The unique name of the Counter

description

String

255

N

Optional. You may enter a description
of the Counter
and the reason for the Counter.

fromDate

Y

DateTime

See
Data Types page
for dateTime
formats

Y

The DateTime the Counter started.

thruDate

Y

DateTime

See
Data Types page
for dateTime
formats

The DateTime the Counter ends.

status

Y

CounterStatus

Select one:
-DRAFT
-ACTIVE
-SUSPENDED

Y

See CounterStatus for details.

type

Y

CounterType

Select one:
-USAGE_EVENT
-USAGE_CHARGE
-USAGE_RULE

Y

The type of Counter. See CounterType for details.

entityRelationType

Y
(part of
pair)

CounterEntityRelationType

Enter:
-SERVICE

Y

The type of Counter Entity Relation.
See CounterEntityRelationType.

event

Int

As needed

Y

The current event amount.

threshold

Decimal

As needed

N

The threshold event for when the
Counter starts counting Usage Events.

Entity Counters

The entity Counters enables you to see multiple pages of the entity UsageEventCounter (and UsageChargeCounter, and UsageRuleCounter).

Element Name Element
Type
Field
Length
Description

pageNumber

Integer

as needed

Shows the current page number.

pageSize

Integer

as needed

Shows the page size.

totalElements

Long

as needed

Shows the total number of items found.

elementCount

Integer

as needed

Shows the current count of the item
in the number of items that were found.

totalPages

Integer

as needed

Shows the total number of pages.

Select one:
-usageChargeCounter
-usageEventCounter
-usageRuleCounter

Choose:
UsageChargeCounter OR
UsageEventCounter OR
UsageRuleCounter

- -

Shows the list of
- usageChargeCounter OR
- usageEventCounter OR
- usageRuleCounter.

Information for the related entity of Counters:

  • Entity Counters

How to Query for a Usage Event Counter

Usage Event Counters cannot be queried as a group, but instead query for Counters which include Usage Event Counters.

Query Key Information for SOAP and REST

Querying to see Counters needs to include either at least a single parameter or at least a required pair of parameters. If you do not know the values for the parameters, query separately to learn the values.

Query Key Parameters

Counters
Query
Key
Value Definition

eid

Long

The unique eid number for the Counter.

name

String

The unique name of the Counter.

serviceEid

Long

The unique Service
eid number related to the Counter.

type

The type of Counter (Usage Event,
Usage Charge, Usage Rule).
See CounterType.

status

The status of the Counter.
See CounterStatus.
DRAFT, ACTIVE, SUSPENDED.

fromDate

DateTime

The DateTime the Counter started.

thruDate

DateTime

The DateTime the Counter ends.

  • 2nd Req Query Key — entityRelationType — The CounterEntityRelationType. At this time: "SERVICE"

Query to Use

For a single parameter, use the following query.

For a Single Parameter
Query Query for Parameter Name and Value Returns

SimpleDataQuery

Counter

<parameter name><parameter value>

List of your Counters, including Usage Charge Counters, for that parameter name and value.

For a required parameter pair, use the following query.

For a Required Parameter Pair
Query to Use Query for Parameter Names and Values Returns

SimpleDataQuery

Counter

<parameter name><parameter value>
&<parameter name><parameter value>

List of your Counters for that pair of parameters and their values.

SOAP Example Query

In the following example SOAP query, the parameter of Eid was used. The Counter's EID value (in this example "7"), was learned through a previous query on Counter. ServiceEid (value "80334") has the required pair of entityRelationType (value "SERVICE") and if you use one, you would need to use the other.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:ser="http://www.tractbilling.com/billing/1_31/service"xmlns:dom="http://www.tractbilling.com/billing/1_31/domain">
    <soapenv:Header/>
    <soapenv:Body>
        <ser:query>
            <ser:queryRequest>
                <dom:simpleDataQuery>
                    <dom:type>Counter</dom:type>
                    <dom:parameter parameter="eid" parameterValue="7"/>
                    <!-- <dom:parameter parameter="serviceEid" parameterValue="80334"/>-->
                    <!-- serviceEid and entityRelationType are both required -->
                    <!-- <dom:parameter parameter="entityRelationType" parameterValue="SERVICE"/>-->
                </dom:simpleDataQuery>
            </ser:queryRequest>
        </ser:query>
    </soapenv:Body>
</soapenv:Envelope>

REST Mount Point and Parameters

Query
GET https://my.tractbilling.com/t/s/r/1.33/counters/<eid>

GET https://my.tractbilling.com/t/s/r/1.33/counters?eid=<eid>
GET https://my.tractbilling.com/t/s/r/1.33/counters?name=<name>
GET https://my.tractbilling.com/t/s/r/1.33/counters?serviceEid=<serviceEid>&entityRelationType=<entityRelationType>
GET https://my.tractbilling.com/t/s/r/1.33/counters?type=<type>
GET https://my.tractbilling.com/t/s/r/1.33/counters?status=<status>
GET https://my.tractbilling.com/t/s/r/1.33/counters?fromDate=<fromDate>
GET https://my.tractbilling.com/t/s/r/1.33/counters?thruDate=<thruDate>

Update (see UpdateOpenCounters)
PUT https://my.tractbilling.com/t/s/r/1.33/counters/usageCharge/<eid>
PUT https://my.tractbilling.com/t/s/r/1.33/counters/usageEvent/<eid>
PUT https://my.tractbilling.com/t/s/r/1.33/counters/usageRule/<eid>

REST Example Query

The following example shows a query of a Counter for serviceEid and entityRelationType in REST.

Query
GET https://my.tractbilling.com/t/s/r/1.33/counters?serviceEid=85049&entityRelationType=SERVICE