Jump to: navigation, search

Create a Custom Billing Adapter

The License Reporting Manager (LRM) plug-in for GAX provides a report interface to display license usage information that is collected by LRM. However, you might want to use your own custom reporting solution to display licensing information that is collected by the LRM Server.

You can use the Web Services API that is exposed by the LRM Server to obtain the information that is collected by LRM.

GET data from LRM

When the LRM Application is running, it can accept HTTP GET requests and return an LRM report.

The URL that is exposed by the LRM server has the following format:

http://<server>:<port>/lrm/seats?name1=value1&name2=value2...

Where <server> is where the LRM application is running and <port> is the socket that is being opened by the LRM application to listen for HTTP requests. All the request parameters that control which records are returned in an LRM report can be presented as HTTP Request URI parameters (for example, name1=value1 in the URL above). The following HTTP Request-URI parameters are supported:

Name Description Valid Values
type Specifies the type of report.

If type is system, then tenant, agentgroup, and placegroup are ignored. If type is one of tenant, agentgroup, or placegroup, then unmatched parameters within the set are ignored.

This parameter is required.

  • system
  • tenant
  • agentgroup
  • placegroup
start Specifies the starting timestamp.

This parameter is required.

Specifies the timestamp in the format of:
yyyy-mm-ddThh:mm:ss.mmmZ

For example:
2010-09-01T00:00:00.000Z

end Specifies the ending timestamp.

This parameter is required.

Timestamp in the format of:
yyyy-mm-ddThh:mm:ss.mmmZ

For example:
2010-09-01T00:00:00.000Z

granularity Specifies the granularity for each record; that is the duration represented by each record: 10minute, hour, day, week, or month.

This parameter is required.

  • 10minute
  • hour
  • day
  • weekly
  • month
firstDayOfWeek Specifies how a week is is calculated for reports where granularity=week.

This parameter is required if granularity=week.

  • sunday
  • monday
pageSize Specifies the maximum number of records in a single page of a report. Reports are paginated based on the pageSize parameter, and the page that is returned in a report is specified by using the pageNumber parameter.

This parameter is required.

integer
pageNumber Works with pageSize to control which records are returned.

This parameter is required.

integer
tenant Specifies which tenant’s license usage data are in the report. If this value is not specified and the type parameter is set to tenant, then data for all the tenants is returned. comma-separated list of tenant IDs
sellableitem Specifies which sellable items are in the report. comma-separated list of sellable item IDs
agentgroup Specifies which agent groups are in the report. comma-separated list of agent group IDs.
placegroup Specifies which place groups are in the report. comma-separated list of place group IDs
bundle Specifies which bundles are in the report. comma-separated list of bundle IDs
At least, one sellable item or bundle can be specified. If neither a sellable item nor a bundle is specified, then data for all the sellable items and bundles is returned.

LRM reports

The report is returned in the HTTP response body in JSON format (see RFC 4627). The report is a single JSON object that has the following properties:

Name Description
total The total number of records in the report.
start The start timestamp of the report. Note that the start and end timestamps might be different from the parameter that is specified by the HTTP Request URI parameter in the case of weekly or monthly reports, so that the start and end timestamps line up with the week and month boundaries.
end The end timestamp of the report.
pageNumber The page number from the set of records.
tenants The set of tenants known in the LRM system.
records An array of records that contains the data for this report. The logical meaning for each entry of the array is described above.

Note: Within each record of the records array:

  • If the request type is tenant, then only tenantid and tenantname attributes are included in the report.
  • If the request type is agentgroup then only agentgroupid and agentgroupname attributes are included in the report.
  • If the request type is placegroup then only placegroupid and placegroupname attributes are included in the report.
  • If the request type is system then none of these attributes are included in the report.

Data Description

This section describes the logical meaning of the data that is presented by LRM.

A unit of record in the LRM data contains information about the usage of a single sellable item at a single unit of time. Each record contains the following information:

Name Description
report_period The starting time of the License Usage information for this record.
sellableitemid The Sellable Item ID of the Sellable Item for which this record applies. If the sellableitemid is 10000 or greater, then this is a record for a bundle.
sellableitemname The name of the sellable item for this record.
tenantid The Genesys Management Framework DBID for the tenant that this record is for. If this is a record for system-wide data, then the tenantid is set to 0.
tenantname The name of the tenant. If this is a record for system-wide data, then the tenantname is set to the value null.
agentgroupid The Genesys Management Framework DBID for the agent group for this record.
agentgroupname The name of the agent group.
placegroupid The Genesys Management Framework DBID for the place group for this record.
placegroupname The name of the tenant.
si_amount Records the concurrent peak usage for this time period, for this sellable item, for this tenant.
timestamp The timestamp at which the concurrent peak usage has occurred.
enabled_seat_count Contains the enabled seat count that is calculated for this time period, for this sellable item, for this tenant.
provlimit The provision limit, as configured by customer, applicable to the day in which the record occurred. For system-wide reports, this comes from the Entitlement File that is uploaded by the System Administrator. For tenant reports, this comes from the Provisioned Count screen as entered by the System Administrator. This not available for agentgroup and placegroup reports.
provdatetimestamp The day when the provision limit first came into effect. This not available for agentgroup and placegroup reports.
gap Indicates whether a data source gap (from the T-Server and Interaction Server to the ICON) has been detected while calculating the concurrent peak usage

An LRM report contains a sequence of these records that are retrieved from the LRM Server based on some query criteria that is provided by the request.

HTTP Request Example

An example of an HTTP request is as follows:

http://135.17.176.48:8801/lrm/seats?type=tenant&start=2008-05-07T00:00:00.000Z&end=2012-05-17T00:00:00.000Z&granularity=day&pageSize=1000&pageNumber=1&tenant-id=1&sellableitem=1

Report Example

An example of the report is as follows:

{
    "total": 14,
    "end": "2012-05-17T00:00:00.000Z",
    "start": "2008-05-07T00:00:00.000Z",
    "pageNumber": 1,
    "tenants": {
        "550": "Tenant_sg04_03_INBD",
        "1": "Environment",
        "551": "Tenant_sg04_04_OTBD",
        "548": "547"
    }
    "records": [{
        "timestamp": "2009-01-01T14:56:51.000Z",
        "tenantid": 1,
        "tenantname": "Environment",
        "agentgroupid": 12,
        "agentgroupname": "kathyteam"
        "placegroupid": 24,
        "placegroupname": "newplace"
        "report_period": 200901010000,
        "si_amount": 1,
        "gap": false,
        "enabled_seat_count": 3,
        "provdatetimestamp": "2009-01-01T00:00:00.000Z",
        "sellableitemid": 1,
        "provlimit": 100,
        "sellableitemname": "Genesys Inbound Voice",
    }, {
        "timestamp": "2009-01-02T14:56:51.000Z",
        "tenantid": 1,
        "tenantname": "Environment",
        "agentgroupid": 12,
        "agentgroupname": "kathyteam"
        "placegroupid": 24,
        "placegroupname": "newplace"
        "report_period": 200901020000,
        "si_amount": 2,
        "gap": false,
        "enabled_seat_count": 3,
        "provdatetimestamp": "2009-01-01T00:00:00.000Z",
        "sellableitemid": 1,
        "provlimit": 100,
        "sellableitemname": "Genesys Inbound Voice",
    }],
}

This page was last edited on April 30, 2014, at 16:10.
Comments or questions about this documentation? Contact us for support!