billing:ttstats
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| billing:ttstats [2026/08/18 03:01] – [Customer TTSTATS File] Scott Cunliffe | billing:ttstats [2026/08/18 03:34] (current) – old revision restored (2026/08/18 03:18) Scott Cunliffe | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| The file is created by [[cli: | The file is created by [[cli: | ||
| - | The TTSTATS file provides the operational quantities used to calculate billing items, including storage and movement activity. | + | The TTSTATS file provides the operational quantities used to calculate billing items, including storage and movement activity. |
| - | + | ||
| - | It does not contain the complete billing configuration. Customer descriptions, | + | |
| ===== Purpose ===== | ===== Purpose ===== | ||
| - | The Customer TTSTATS file transfers customer activity from the TapeTrack Journal into the billing calculation process. | + | The Customer TTSTATS file transfers customer activity from the TapeTrack Journal into the billing calculation process. Each Customer-ID has its own ttstats file, containing statistics for all activity within the set date range. |
| - | The file can be used to: | ||
| - | * Contain statistics extracted for one TapeTrack Customer. | ||
| - | * Limit activity to a selected billing date range. | ||
| - | * Supply quantities to the Billing Rules. | ||
| - | * Separate the Journal extraction stage from the billing calculation stage. | ||
| - | * Allow billing data to be reviewed before charges are generated. | ||
| - | * Provide a repeatable input for testing billing configuration changes. | ||
| - | * Support the creation of billing XML for QuickBooks Desktop. | ||
| - | The billing relationship is: | ||
| - | |||
| - | Journal → TMSS10LogStatsExtractDB → Customer-ID.ttstats → TMSS10LogStatsProcess → Billing XML | ||
| ===== File Creation ===== | ===== File Creation ===== | ||
| - | The Customer TTSTATS file is created by '' | + | The Customer TTSTATS file is created by [[cli:TMSS10LogStatsExtractDB]]. This utility reads the TapeTrack Journal database and creates an extract file for each Customer containing activity within the selected date range. |
| - | + | ||
| - | This utility reads the TapeTrack Journal database and creates an extract file for each Customer containing activity within the selected date range. | + | |
| For example, an extraction containing the following Customers may create: | For example, an extraction containing the following Customers may create: | ||
| Line 44: | Line 29: | ||
| | '' | | '' | ||
| - | <WRAP important> | + | |
| TTSTATS files should be generated from the Journal for the correct billing period. Reusing a file from another period may result in missing, duplicated or incorrect charges. | TTSTATS files should be generated from the Journal for the correct billing period. Reusing a file from another period may result in missing, duplicated or incorrect charges. | ||
| - | </ | ||
| - | ===== File Location ===== | ||
| - | TTSTATS files can be stored in any directory accessible to the account running the billing process. | + | ===== File Location ===== |
| - | For ease of administration, | + | TTSTATS files can be stored in any directory accessible to the account running the billing process. |
| Example Windows location: | Example Windows location: | ||
| Line 81: | Line 64: | ||
| The location of the TTSTATS file is supplied to '' | The location of the TTSTATS file is supplied to '' | ||
| - | ===== File Naming ===== | ||
| - | It is recommended that each TTSTATS filename contains the corresponding TapeTrack Customer-ID. | ||
| - | |||
| - | The general filename format is: | ||
| - | |||
| - | Customer-ID.ttstats | ||
| - | |||
| - | Example: | ||
| - | |||
| - | US01.ttstats | ||
| - | |||
| - | The filename may also include the billing period if files need to be retained in the same directory. | ||
| - | |||
| - | Example: | ||
| - | |||
| - | US01_2026-07.ttstats | ||
| - | |||
| - | Using the Customer-ID and billing period in the filename helps prevent the wrong statistics file from being processed. | ||
| ===== File Contents ===== | ===== File Contents ===== | ||
| Line 126: | Line 91: | ||
| </ | </ | ||
| - | ===== Relationship to Billing Configuration ===== | ||
| - | The TTSTATS file supplies the activity and quantities. Other billing files determine how that activity is identified, priced and displayed. | ||
| - | ^ File or Component ^ Purpose ^ | ||
| - | | '' | ||
| - | | Customer Description Map | Maps the Customer-ID to a readable Customer or location description. | | ||
| - | | Package Map | Selects the billing package assigned to the Customer. | | ||
| - | | Billing Rules | Defines which statistics are billable and applies rates, rounding and calculations. | | ||
| - | | '' | ||
| - | | XMLQuickBooks Mapping | Maps approved TapeTrack billing values to QuickBooks customers and items. | | ||
| - | |||
| - | For example: | ||
| - | |||
| - | < | ||
| - | TTSTATS: | ||
| - | 11 qualifying LTO volumes stored for one day | ||
| - | |||
| - | Customer Description Map: | ||
| - | US01 New York Data Center | ||
| - | |||
| - | Package Map: | ||
| - | US01 STANDARD | ||
| - | |||
| - | Billing Rules: | ||
| - | Round storage quantity up to the next 10 | ||
| - | Charge $0.01 per volume per day | ||
| - | |||
| - | Result: | ||
| - | 20 billed volumes × $0.01 = $0.20 | ||
| - | </ | ||
| - | |||
| - | ===== Processing the File ===== | ||
| - | |||
| - | Use the '' | ||
| - | |||
| - | Example: | ||
| - | |||
| - | TMSS10LogStatsProcess -i US01.ttstats -M customer_map.txt -P package_map.txt -c default.ttsdef -X tapetrack.xslt > Billing_US01.xml | ||
| - | |||
| - | Where: | ||
| - | |||
| - | ^ Argument ^ Value ^ Description ^ | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | Standard output | '' | ||
| - | |||
| - | If the files are stored in different directories, | ||
| - | |||
| - | Example: | ||
| - | |||
| - | TMSS10LogStatsProcess ^ | ||
| - | -i " | ||
| - | -M " | ||
| - | -P " | ||
| - | -c " | ||
| - | -X " | ||
| - | > " | ||
| - | |||
| - | ===== Processing Result ===== | ||
| - | |||
| - | '' | ||
| - | |||
| - | The resulting XML may contain: | ||
| - | |||
| - | <code xml> | ||
| - | <?xml version=" | ||
| - | <? | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | In this example: | ||
| - | |||
| - | ^ Value ^ Source ^ | ||
| - | | Customer activity and quantity | '' | ||
| - | | Customer description | Customer Description Map | | ||
| - | | Billing package | Package Map | | ||
| - | | Item code, description and rate | Billing Rules | | ||
| - | | XML presentation | '' | ||
| - | |||
| - | ===== Validation ===== | ||
| - | |||
| - | The TTSTATS file should be validated before production billing is generated. | ||
| - | |||
| - | Check that: | ||
| - | |||
| - | * The filename identifies the correct Customer. | ||
| - | * The file was created for the correct billing period. | ||
| - | * The extraction start and end dates are correct. | ||
| - | * The file is not empty. | ||
| - | * The file was created successfully by '' | ||
| - | * The Customer-ID matches the Customer Description Map. | ||
| - | * The Customer-ID matches the Package Map. | ||
| - | * Expected billing activity is present. | ||
| - | * The file has not already been invoiced. | ||
| - | * The billing service account can read the file. | ||
| - | * The generated billing XML contains reasonable quantities. | ||
| - | |||
| - | A billing control record should identify: | ||
| - | |||
| - | ^ Control ^ Example ^ | ||
| - | | Customer-ID | '' | ||
| - | | Billing period | '' | ||
| - | | TTSTATS filename | '' | ||
| - | | Extraction date | '' | ||
| - | | Billing XML filename | '' | ||
| - | | Processing status | Approved | | ||
| - | | QuickBooks invoice | Invoice number or import reference | | ||
| ===== File Handling ===== | ===== File Handling ===== | ||
| Line 298: | Line 145: | ||
| An empty file may be valid when the Customer had no relevant activity. It should be investigated before being excluded from billing. | An empty file may be valid when the Customer had no relevant activity. It should be investigated before being excluded from billing. | ||
| - | ==== Incorrect Customer Is Processed ==== | ||
| - | Check that: | ||
| - | |||
| - | * The correct TTSTATS file was supplied using the '' | ||
| - | * The filename corresponds to the Customer-ID contained in the file. | ||
| - | * The correct Customer Description Map was used. | ||
| - | * The correct Package Map was used. | ||
| - | * A file from another billing period or environment was not selected. | ||
| ==== Billing Quantities Are Incorrect ==== | ==== Billing Quantities Are Incorrect ==== | ||
| Line 326: | Line 165: | ||
| | 11 | Round up to the next 10 | 20 | | | 11 | Round up to the next 10 | 20 | | ||
| - | ==== No Billing XML Is Produced ==== | ||
| - | |||
| - | Check that: | ||
| - | |||
| - | * The '' | ||
| - | * The process account has permission to read the file. | ||
| - | * The Customer exists in the Customer Description Map. | ||
| - | * The Customer exists in the Package Map. | ||
| - | * The assigned package exists in the Billing Rules. | ||
| - | * The statistics match at least one Billing Rule. | ||
| - | * '' | ||
| - | |||
| - | Redirect diagnostic messages to an error file. | ||
| - | |||
| - | Windows example: | ||
| - | |||
| - | TMSS10LogStatsProcess -i US01.ttstats -M customer_map.txt -P package_map.txt -c default.ttsdef > Billing_US01.xml 2> Billing_US01_error.txt | ||
| - | |||
| - | Review '' | ||
| ==== Charges Are Duplicated ==== | ==== Charges Are Duplicated ==== | ||
| Line 359: | Line 179: | ||
| * Generate a new TTSTATS file for every billing period. | * Generate a new TTSTATS file for every billing period. | ||
| - | * Use the Customer-ID and billing period in the filename. | ||
| - | * Store each billing period in a separate directory. | ||
| * Do not manually edit generated TTSTATS files. | * Do not manually edit generated TTSTATS files. | ||
| - | * Record the extraction start and end dates. | ||
| - | * Review extraction logs before processing billing. | ||
| - | * Prevent the same file from being processed twice. | ||
| - | * Retain the TTSTATS file with its billing XML and invoice reference. | ||
| * Restrict write access to authorized billing administrators. | * Restrict write access to authorized billing administrators. | ||
| - | * Archive completed billing files as read-only records. | + | * Archive completed billing files as read-only records |
| ===== Security ===== | ===== Security ===== | ||
| Line 389: | Line 203: | ||
| * [[billing: | * [[billing: | ||
| * [[billing: | * [[billing: | ||
| - | * [[billing:tapetrack_xslt|TapeTrack XML Stylesheet]] | + | * [[billing:stylesheet|TapeTrack XML Stylesheet]] |
| * [[billing: | * [[billing: | ||
| * [[billing: | * [[billing: | ||
billing/ttstats.1787022115.txt.gz · Last modified: 2026/08/18 03:01 by Scott Cunliffe
