Charging Data Structure

The N2 Logic Node has many built-in data values, mostly used to provide helper functions for various other actions. However, these references may be used by your custom libraries or other functionality as well.

ccs.wallet.state

The NCC charging subsystems only recognises certain states for subscriber wallets, regardless of the billing engine used. These states are represented by single-letter characters, but name mappings are included for presentation and ease of use.

ccs = {
    wallet = {
        state = {
            ['A'] = { NAME = 'Active', CODE = 'A' },
            ['P'] = { NAME = 'Pre-use', CODE = 'P' },
            ['T'] = { NAME = 'Terminated', CODE = 'T' },
            ['F'] = { NAME = 'Frozen', CODE = 'F' },
            ['S'] = { NAME = 'Suspended', CODE = 'S' },
            ['D'] = { NAME = 'Dormant', CODE = 'D' }
        }
    }
}

ccs.periodic_charge

Periodic charges have several enumerated values to track their details. These values are used heavily by the periodic charge functions.

ccs.periodic_charge.state

Any subscriber may be subscribed or not subscribed to any given periodic charge, depending on the subscriber's circumstances, business rules, etc. Each state is represented by a certain value on the subscriber's periodic charge balance. These individual balances/states are further grouped into various classes.

Refer to the NCC Prepaid Charging User Guide for more details.

ccs = {
    periodic_charge = {
        state = {
            [0] = { NAME = 'Unavailable', ID = 0, CLASS = 'Unavailable' },
            [1] = { NAME = 'Terminated', ID = 1, CLASS = 'Terminated' },
            [2] = { NAME = 'Unsubscribed', ID = 2, CLASS = 'Unsubscribed' },
            [3] = { NAME = 'Pre-Charge 0', ID = 3, CLASS = 'Active' },
            [4] = { NAME = 'Pre-Charge 1', ID = 4, CLASS = 'Active' },
            [5] = { NAME = 'Pre-Charge 2', ID = 5, CLASS = 'Active' },
            [6] = { NAME = 'Pre-Charge 3', ID = 6, CLASS = 'Active' },
            [7] = { NAME = 'Grace 0', ID = 7, CLASS = 'Grace' },
            [8] = { NAME = 'Grace 1', ID = 8, CLASS = 'Grace' },
            [9] = { NAME = 'Grace 2', ID = 9, CLASS = 'Grace' }
        }
    }
}

ccs.periodic_charge.period

Periodic charges all have a configured period, somewhat unsurprisingly. These periods are defined on the periodic charge itself and represented by an enumerated value.

ccs = {
    periodic_charge = {
        period = {
            [0] = { NAME = 'Daily', ID = 0 },
            [1] = { NAME = 'Weekly', ID = 1 },
            [2] = { NAME = 'Monthly', ID = 2 },
            [3] = { NAME = 'Quarterly', ID = 3 },
            [4] = { NAME = 'Half-Yearly', ID = 4 },
            [5] = { NAME = 'Annually', ID = 5 },
            [6] = { NAME = 'Custom', ID = 6 }
        }
    }
}

ccs.periodic_charge.action

When performing actions such as subscription or unsubscription, the required action is signalled to the NCC VWS via a specific balance value, separate from the periodic charge state values. These action values are not intended for everyday usage and should be used with caution.

ccs = {
    periodic_charge = {
        action = {
            [101] = { NAME = 'Terminate', ID = 101 },
            [102] = { NAME = 'Unsubscribe', ID = 102 },
            [103] = { NAME = 'Subscribe', ID = 103 },
            [104] = { NAME = 'Grace', ID = 104 },
            [150] = { NAME = 'Charge Alignment', ID = 150 },
            [999] = { NAME = 'Transfer', ID = 999 }
        }
    }
}

Note that the value for 'Transfer' is specific to the Logic Node and is not understood by the NCC VWS. This value is internally translated when using the periodic charge functions.

ccs.action.id

All interaction from the service logic layer of NCC to a billing engine uses an NCC mechanism known as chassis actions. The availability of these actions depends on the capabilities of the billing domain in use, as set up in the NCC Domains screens. You are able to query these capabilities to determine what limitations you have, if any, within the Logic Node and the control plan.

ccs = {
    action = {
        id = {
            serviceCapability = { NAME = 'serviceCapability', ID = 0x0000000000000000 },
            directTimeCharge = { NAME = 'directTimeCharge', ID = 0x0000000000000001 },
            initialTimeReservation = { NAME = 'initialTimeReservation', ID = 0x0000000000000002 },
            extendTimeReservation = { NAME = 'extendTimeReservation', ID = 0x0000000000000004 },    
            confirmTimeReservation = { NAME = 'confirmTimeReservation', ID = 0x0000000000000008 },
            directNamedEvent = { NAME = 'directNamedEvent', ID = 0x0000000000000010 },  
            namedEventReservation = { NAME = 'namedEventReservation', ID = 0x0000000000000020 },    
            confirmNamedEventReservation = { NAME = 'confirmNamedEventReservation', 
                ID = 0x0000000000000040 },  
            revokeNamedEventReservation = { NAME = 'revokeNamedEventReservation', 
                ID = 0x0000000000000080 },
            getWallet = { NAME = 'getWallet', ID = 0x0000000000000100 },
            setWallet = { NAME = 'setWallet', ID = 0x0000000000000200 },
            walletUpdate = { NAME = 'walletUpdate', ID = 0x0000000000000400 },
            walletInfo = { NAME = 'walletInfo', ID = 0x0000000000000800 },
            badPIN = { NAME = 'badPIN', ID = 0x0000000000001000 },
            getChargeDetails = { NAME = 'getChargeDetails', ID = 0x0000000000002000 },
            createEDR = { NAME = 'createEDR', ID = 0x0000000000004000 },
            setDiscount = { NAME = 'setDiscount', ID = 0x0000000000008000 },
            cascadeOverride = { NAME = 'cascadeOverride', ID = 0x0000000000010000 },
            tariffPlanOverride = { NAME = 'tariffPlanOverride', ID = 0x0000000000020000 },
            getCUGDetails = { NAME = 'getCUGDetails', ID = 0x0000000000040000 },
            setupCall = { NAME = 'setupCall', ID = 0x0000000000080000 },
            continueCall = { NAME = 'continueCall', ID = 0x0000000000100000 },
            finaliseCall = { NAME = 'finaliseCall', ID = 0x0000000000200000 },
            voucherAlternateSubscriberDetails = { NAME = 'voucherAlternateSubscriberDetails',
                ID = 0x0000000000400000 },
            voucherRecharge = { NAME = 'voucherRecharge', ID = 0x0000000000800000 },
            voucherBadPIN = { NAME = 'voucherBadPIN', ID = 0x0000000001000000 },
            voucherConfirm = { NAME = 'voucherConfirm', ID = 0x0000000002000000 },
            voucherRedeem = { NAME = 'voucherRedeem', ID = 0x0000000004000000 },
            voucherRevoke = { NAME = 'voucherRevoke', ID = 0x0000000008000000 },
            walletRecharge = { NAME = 'walletRecharge', ID = 0x0000000010000000 },
            voucherCreateEDR = { NAME = 'voucherCreateEDR', ID = 0x0000000020000000 },
            getCreditCardDetails = { NAME = 'getCreditCardDetails', ID = 0x0000000040000000 },
            getServiceDetails = { NAME = 'getServiceDetails', ID = 0x0000000080000000 },
            getSubscriberDetails = { NAME = 'getSubscriberDetails', ID = 0x0000000100000000 },
            declinedBillingCause = { NAME = 'declinedBillingCause', ID = 0x0000000200000000 },
            addEDRField = { NAME = 'addEDRField', ID = 0x0000000400000000 },
            alternateWalletDetails = { NAME = 'alternateWalletDetails', ID = 0x0000000800000000 },
            voucherInfo = { NAME = 'voucherInfo', ID = 0x0000001000000000 },
            revokeTimeReservation = { NAME = 'revokeTimeReservation', ID = 0x0000002000000000 },
            getNamedEventRates = { NAME = 'getNamedEventRates', ID = 0x0000004000000000 },
            alternateSubscriberDetails = { NAME = 'alternateSubscriberDetails', 
                ID = 0x0000008000000000 },
            compareSubscriberPINDetails = { NAME = 'compareSubscriberPINDetails', 
                ID = 0x0000010000000000 },
            voucherTypeRecharge = { NAME = 'voucherTypeRecharge', ID = 0x0000020000000000 },
            voucherTypeConfirm = { NAME = 'voucherTypeConfirm', ID = 0x0000040000000000 },
            voucherTypeRedeem = { NAME = 'voucherTypeRedeem', ID = 0x0000080000000000 },
            voucherTypeWalletRecharge = { NAME = 'voucherTypeWalletRecharge', 
                ID = 0x0000100000000000 },
            voucherWalletInfo = { NAME = 'voucherWalletInfo', ID = 0x0000200000000000 },
            getCreditTransferDetails = { NAME = 'getCreditTransferDetails', 
                ID = 0x0000400000000000 },
            presenceQuery = { NAME = 'presenceQuery', ID = 0x0000800000000000 },
            presenceSetting = { NAME = 'presenceSetting', ID = 0x0001000000000000 },
            getChargedDuration = { NAME = 'getChargedDuration', ID = 0x0002000000000000 },
            extendedWalletUpdate = { NAME = 'extendedWalletUpdate', ID = 0x0004000000000000 },
            extendedWalletInfo = { NAME = 'extendedWalletInfo', ID = 0x0008000000000000 },
            midcallTariffPlanRules = { NAME = 'midcallTariffPlanRules', ID = 0x0010000000000000 },
            voucherWalletRecharge = { NAME = 'voucherWalletRecharge', ID = 0x0020000000000000 },
            walletTrackerInfo = { NAME = 'walletTrackerInfo', ID = 0x0040000000000000 },
            walletDelegation = { NAME = 'walletDelegation', ID = 0x0080000000000000 },
            voucherWalletDelegation = { NAME = 'voucherWalletDelegation', ID = 0x0100000000000000 },
            voucherBalanceFilter = { NAME = 'voucherBalanceFilter', ID = 0x0200000000000000 },
            getRates = { NAME = 'getRates', ID = 0x0400000000000000 },
            getTariffPlan = { NAME = 'getTariffPlan', ID = 0x0800000000000000 },
            getCreditTransferAnnouncements = { NAME = 'getCreditTransferAnnouncements', 
                ID = 0x1000000000000000 },
            serviceAddEDRField = { NAME = 'serviceAddEDRField', ID = 0x2000000000000000 },
            createSubscriber = { NAME = 'createSubscriber', ID = 0x4000000000000000 },
            deleteSubscriber = { NAME = 'deleteSubscriber', ID = 0x8000000000000000 },
            unknown = { NAME = 'unknown', ID = 0x9999999999999999 }
        }
    }
}