Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Pcounter

    Product Information

    Category Other
    Sub-category Print Credits
    Website http://pcounter.com/
    Product version 3.x+ (SQL based)
    Documentation http://pcounter.com/index.php?q=support  
    API Documentation  

    About Pcounter

    The first version of Pcounter made available to the world was uploaded to the Novell Forum on Compuserve in 1992.  Much work has been done since then!  Pcounter is currently running at thousands of sites, serving the printer control needs of millions of users.

    ​​​​​Integration Overview

    The campusM integration with Pcounter supports the following functionality:
    • Allow users to view their account balance
    • View recent transactions
    • Use the institution-provided links to find additional information and take actions such as top up credit and more.

     ​​​​​​​​​​​Integration Method

    • API (Recommended method)
    • Database Stored Procedures 

    Prerequisites 

    There are several prerequisites to the campusM integration with Circuit Pcounter:

    API integration method (recommended method)

    Prerequisite Additional Information
    Deploy the Pcounter API layer provided by AIT Only available for Pcounter version 3+. Please contact AIT for more details (https://www.ait.co.uk/contact-us
    Provide the Pcounter server name  
    Provide the Pcounter API site key  
    Allow access to the Pcounter server from the campusM Connect Layer VPN Required to allow Ex Libris to develop and test the created web services

    Provide a minimum of three (3)  test accounts containing comprehensive and typical data, including the following:

    • Valid log in credentials for campusM
    • Active balance
    • Transactions

    The test accounts should allow testing the integration according to the Suggested Testing Guidelines i.e. should support authentication/ log into the app as the test account provided and run complete end-to-end testing of the integration functionality.

    Provide a list of links

    The list should include all the webpages the institution would like to allow the user to link out to. For example:

    • Top-up credit
    • View account
    • Details on website

    Database view integration method

    Prerequisite Additional Information
    Implement the three (3) stored procedures provided below  
    Allow access to the Pcounter database from the campusM Connect Layer VPN Required to allow Ex Libris to develop and test the created web services
    Provide a minimum of three (3) test accounts containing  comprehensive and typical data, including the following:
    • Valid log in credentials for campusM
    • Active balance
    • Transactions
    The test accounts should allow testing the integration according to the Suggested Testing Guidelines i.e. should support authentication/ log into the app as the test account provided and run complete end-to-end testing of the integration functionality
    Provide a list of links The list should include all the webpages the institution would like to allow the user to link out to. For example:
    • Top-up credit
    • View account
    • Details on website

    User Experience

    The Pcounter integration offers two types of tiles (live or static). The tile size and design can be modified according to the institution branding and UX guidelines.

    Property Live Tile Static Tile
    Default Size 1x2 1x1
    Minimum Size 1x2 1x1
    Suggested Design image.png image.png

    Screenshots

    PCounter - Screenshot - 1.png  PCounter - Screenshot - 2.png​​​​​​​ PCounter - Screenshot - 3.png      

    Sample Request and Response

    Sample Room Data Request
    http://<server_name>/pcounter/api/pcountertransaction?count=2
     
    Sample Response
    [
        {
            "AccountBalance": 20,
            "AllowUnlimitedCredit": false,
            "Amount": 20,
            "AutoClientCode": "",
            "ClientCode": "",
            "Comment": "(None)",
            "DateTime": "2017-12-18T14:22:43.67",
            "Document": "Deposit",
            "FreeQuota": 0,
            "GroupName": "",
            "IsColour": false,
            "IsDuplex": false,
            "JobType": "Deposit",
            "LowBalanceLimit": 0,
            "MediaType": "",
            "NumberOfCopies": 0,
            "PaperSize": "",
            "SubCode": "",
            "TotalCost": 20,
            "TotalPages": 0,
            "Username": "johnnysmith"
        },
        {
            "AccountBalance": 0.84,
            "AllowUnlimitedCredit": false,
            "Amount": 0,
            "AutoClientCode": "",
            "ClientCode": "0025",
            "Comment": "",
            "DateTime": "2017-12-18T14:16:57.713",
            "Document": "Scan Job 1796",
            "FreeQuota": 0,
            "GroupName": "",
            "IsColour": false,
            "IsDuplex": false,
            "JobType": "Scan",
            "LowBalanceLimit": 0,
            "MediaType": "",
            "NumberOfCopies": 1,
            "PaperSize": "A4",
            "SubCode": "",
            "TotalCost": 0.05,
            "TotalPages": 1,
            "Username": " johnnysmith "
        }
    ]
    

    Stored Procedures

    Account Balance – Stored Procedure
    CREATE PROCEDURE getPrintBalance @username nvarchar(50)
    AS
    SELECT TOP 1 balance FROM (
    SELECT TOP 1 p.DateTime AS dateTime, p.AccountBalance AS balance
    FROM [XPREnterprise].[dbo].[tblPurchase] AS p
    WHERE p.AccountName = @username
    ORDER BY dateTime DESC
    UNION ALL
    SELECT TOP 1 f.DateTime AS dateTime, f.AccountBalance AS balance
    FROM [XPREnterprise].[dbo].[tblFunding] AS f
    WHERE f.AccountName = @username
    ORDER BY dateTime DESC
    UNION ALL
    SELECT TOP 1 a.DateTime AS dateTime, a.AccountBalance AS balance
    FROM [XPREnterprise].[dbo].[tblAdjustment] AS a
    WHERE a.AccountName = @username
    AND a.Type IN ('Charge', 'Set Balance')
    ORDER BY dateTime DESC
    ) AS allBalance
    ORDER BY dateTime DESC
     
    Credit Limit – Stored Procedure
    CREATE PROCEDURE getPrintCreditLimit @username nvarchar(50)
    AS
    SELECT TOP 1 AccountCreditLimit
    FROM [XPREnterprise].[dbo].[tblAdjustment]
    WHERE AccountName = @username
    AND Type = 'Set Credit Limit'
    ORDER BY DateTime DESC
    
     
    Recent Transactions – Stored Procedure
    CREATE PROCEDURE getPrintTransactions @username nvarchar(50)
    AS
    SELECT TOP 5 * FROM (
    
    SELECT TOP 5 p.DateTime AS dateTime, p.Type AS type, p.Quantity AS quantity, p.Multiplier AS multiplier, p.Amount AS amount,
    p.DeviceCode AS deviceCode, p.DeviceName AS deviceName, p.DeviceDescription AS deviceDescription, p.AccountBalance AS balance,
    NULL AS creditLimit, p.ItemGroupName AS itemGroupName, p.ItemName AS itemName, p.ItemPrice AS itemPrice,
    p.ItemProperty1 AS itemProperty1, p.ItemProperty2 AS itemProperty2, p.ItemProperty3 AS itemProperty3,
    p.ItemProperty4 AS itemProperty4, p.ItemProperty5 AS itemProperty5, p.ItemProperty6 AS itemProperty6
    FROM [XPREnterprise].[dbo].[tblPurchase] AS p
    WHERE p.AccountName = @username
    ORDER BY dateTime DESC
    
    UNION ALL
    SELECT TOP 5 f.DateTime AS dateTime, f.Type AS type, NULL AS quantity, NULL AS multiplier, f.Amount AS amount,
    f.DeviceCode AS deviceCode, f.DeviceName AS deviceName, f.DeviceDescription AS deviceDescription, f.AccountBalance AS balance,
    NULL AS creditLimit, NULL AS itemGroupName, NULL AS itemName, NULL AS itemPrice,
    NULL AS itemProperty1, NULL AS itemProperty2, NULL AS itemProperty3, NULL AS itemProperty4, NULL AS itemProperty5, NULL AS itemProperty6
    FROM [XPREnterprise].[dbo].[tblFunding] AS f
    WHERE f.AccountName = @username
    ORDER BY dateTime DESC
    
    UNION ALL
    SELECT TOP 5 a.DateTime AS dateTime, a.Type AS type, NULL AS quantity, NULL AS multiplier,
    CASE WHEN a.Type = 'Charge' THEN a.Amount ELSE NULL END AS amount,
    a.DeviceCode AS deviceCode, a.DeviceName AS deviceName, a.DeviceDescription AS deviceDescription,
    CASE WHEN a.Type = 'Set Balance' OR a.Type = 'Charge' THEN a.AccountBalance ELSE NULL END AS balance,
    CASE WHEN a.Type = 'Set Credit Limit' THEN a.AccountCreditLimit ELSE NULL END AS creditLimit,
    NULL AS itemGroupName, NULL AS itemName, NULL AS itemPrice,
    NULL AS itemProperty1, NULL AS itemProperty2, NULL AS itemProperty3,
    NULL AS itemProperty4, NULL AS itemProperty5, NULL AS itemProperty6
    FROM [XPREnterprise].[dbo].[tblAdjustment] AS a
    WHERE a.AccountName = @username
    ORDER BY dateTime DESC
    
    ) AS allTransactions ORDER BY dateTime DESC

    Offline Functionality

    Not supported.

    Configuration Options

    Configuration Item Options Default Value
    Display Recent Transactions
    • Yes
    • No
    Yes
    Display Links
    • Yes
    • No
    Yes

     

    Labels

    Screen Label Default Value
    Account Page Title Account Balance
    Account Current Balance Current Balance
    Account Update Date Updated at:
    Transactions Page Title Recent Transactions
    Transactions Details Select a transaction to view details:
    Links Page Title Links

    Suggested Testing Guidelines

    The following acceptance criteria is recommend to be used as part of the testing and approval process:
    • User can access and view their current print credits balance
    • User can view their recent transactions
    • User can click on the institution-provided links and is being redirected to the relevant webpages
    • Was this article helpful?