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:07] – [File Creation] Scott Cunliffe | billing:ttstats [2026/08/19 02:00] (current) – Scott Cunliffe | ||
|---|---|---|---|
| Line 35: | Line 35: | ||
| ===== File Location ===== | ===== File Location ===== | ||
| - | TTSTATS files can be stored in any directory accessible to the account running the billing process. | + | TTSTATS files can be stored in any directory accessible to the account running the billing process. |
| - | + | ||
| - | For ease of administration, | + | |
| Example Windows location: | Example Windows location: | ||
| Line 66: | 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 107: | Line 87: | ||
| * The statistics processed by the Billing Rules. | * The statistics processed by the Billing Rules. | ||
| - | <WRAP note> | + | Record Types are: |
| - | A TTSTATS file contains activity statistics, not final invoice lines. The final descriptions, | + | |
| - | </ | + | |
| - | ===== Relationship | + | * '' |
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| - | The TTSTATS | + | <file text US01.ttstats> |
| + | CUS01 | ||
| + | ILTO 20260816000446000015 | ||
| + | SLTO LIBR20260816000425000015 | ||
| + | HLTO LIBR20260816000000000015 | ||
| + | MLTO OFFSLIBR20260816000003000010 | ||
| + | SLTO OFFS20260816000018000015 | ||
| + | HLTO OFFS20260816000277000015 | ||
| + | SLTO SCRA20260816000003000015 | ||
| + | HLTO SCRA20260816000000000015 | ||
| + | MLTO LIBRSCRA20260816000000000010 | ||
| + | ILTO 20260817000446000016 | ||
| + | SLTO LIBR20260817000425000016 | ||
| + | HLTO LIBR20260817000000000016 | ||
| + | MLTO OFFSLIBR20260817000000000011 | ||
| + | SLTO OFFS20260817000018000016 | ||
| + | HLTO OFFS20260817000277000016 | ||
| + | SLTO SCRA20260817000003000016 | ||
| + | HLTO SCRA20260817000000000016 | ||
| + | MLTO LIBRSCRA20260817000000000011 | ||
| + | ILTO 00000000000446000017 | ||
| + | SLTO LIBR00000000007300000017 | ||
| + | HLTO LIBR00000000000000000017 | ||
| + | MLTO OFFSLIBR00000000000016000012 | ||
| + | SLTO OFFS00000000000236000017 | ||
| + | HLTO OFFS00000000000277000017 | ||
| + | SLTO SCRA00000000000046000017 | ||
| + | HLTO SCRA00000000000000000017 | ||
| + | MLTO LIBRSCRA00000000000001000012 | ||
| + | </ | ||
| - | ^ File or Component ^ Purpose ^ | + | Breakdown of record data: **ILTO 20260816000446000015** |
| - | | '' | + | |
| - | | 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: | + | **I** Inventory **LTO** Media type **20260816** |
| - | < | + | Breakdown of record data: **MLTO LIBRSCRA20260816000003000010** |
| - | TTSTATS: | + | |
| - | 11 qualifying LTO volumes stored for one day | + | |
| - | Customer Description Map: | + | **M** Movement **LTO** Media type **LIBR** To repository **OFFS** From repository **** Date **000003** Movement count **000010** Movement record count |
| - | US01 New York Data Center | + | |
| - | Package Map: | + | <WRAP note> |
| - | US01 STANDARD | + | A TTSTATS file contains activity statistics, not final invoice lines. The final descriptions, |
| - | + | </WRAP> | |
| - | 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 | + | |
| - | </code> | + | |
| - | + | ||
| - | ===== 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 250: | Line 159: | ||
| - Review the Journal activity. | - Review the Journal activity. | ||
| - Correct the source data or extraction settings where appropriate. | - Correct the source data or extraction settings where appropriate. | ||
| - | - Run '' | + | - Run [[cli:TMSS10LogStatsExtractDB]] again. |
| - Replace the incorrect extract with the newly generated file. | - Replace the incorrect extract with the newly generated file. | ||
| - Reprocess the billing XML. | - Reprocess the billing XML. | ||
| Line 264: | Line 173: | ||
| Check that: | Check that: | ||
| - | * '' | + | * [[cli:TMSS10LogStatsExtractDB]] completed successfully. |
| * The Customer had Journal activity during the selected date range. | * The Customer had Journal activity during the selected date range. | ||
| * The output directory exists. | * The output directory exists. | ||
| Line 283: | Line 192: | ||
| 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 311: | Line 212: | ||
| | 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 344: | Line 226: | ||
| * 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 362: | Line 238: | ||
| * TapeTrack administrators. | * TapeTrack administrators. | ||
| * Authorized billing staff. | * Authorized billing staff. | ||
| - | * The service account running | + | * The service account running |
| - | * The service account running | + | * The service account running |
| The file should not be publicly accessible or stored in an unsecured shared directory. | The file should not be publicly accessible or stored in an unsecured shared directory. | ||
| Line 374: | Line 250: | ||
| * [[billing: | * [[billing: | ||
| * [[billing: | * [[billing: | ||
| - | * [[billing:tapetrack_xslt|TapeTrack XML Stylesheet]] | + | * [[billing:stylesheet|TapeTrack XML Stylesheet]] |
| * [[billing: | * [[billing: | ||
| * [[billing: | * [[billing: | ||
billing/ttstats.1787022427.txt.gz · Last modified: 2026/08/18 03:07 by Scott Cunliffe
