TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


billing:billing_rules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
billing:billing_rules [2026/08/19 02:09] – [How Rules Are Selected] Scott Cunliffebilling:billing_rules [2026/08/19 02:29] (current) – [Pricing] Scott Cunliffe
Line 5: Line 5:
 Rules are stored in a billing definition file, normally with the ''.ttsdef'' extension. Each rule filters a set of operational records, calculates a billable quantity, and writes an XML ''<item>'' for QuickBooks. Rules are stored in a billing definition file, normally with the ''.ttsdef'' extension. Each rule filters a set of operational records, calculates a billable quantity, and writes an XML ''<item>'' for QuickBooks.
  
-<WRAP important> 
-Always run ''TMSS10LogStatsProcess -l'' and compare the displayed signatures with the rules before deploying a new definition. The installed utility is the authoritative source for the version in use. 
-</WRAP> 
  
 ===== How Rules Are Selected ===== ===== How Rules Are Selected =====
Line 45: Line 42:
 The supplied definitions demonstrate these common filter patterns: The supplied definitions demonstrate these common filter patterns:
  
-^ Filter ^ Meaning ^ +^ Filter                   ^ Meaning                                         
-| ''"*"'' | Match any value. | +| ''"*"''                  | Match any value.                                
-| ''"US07"'' | Match the exact value ''US07''. | +| ''"US01"''               | Match the exact value ''US01''                
-| ''"Tape*"'' | Match values beginning with ''Tape''. | +| ''"Tape*"''              | Match values beginning with ''Tape''          
-| ''"B*"'' | Match values beginning with ''B''. | +| ''"B*"''                 | Match values beginning with ''B''             
-| ''"*(LT|DL|LTO)"'' | Match one of the grouped Media-ID values. | +| ''"*(LT|DLT|LTO)"''      | Match one of the grouped Media-ID values.       
-| ''"*(COV|RVLT|OFFS)"'' | Match one of the grouped Repository-ID values. | +| ''"*(LIBR|RACK|OFFS)"''  | Match one of the grouped Repository-ID values.  
-| ''"!(HOLD)"'' | Match any value except ''HOLD''. | +| ''"!(HOLD)"''            | Match any value except ''HOLD''               
-| ''"!(A001|A002)"'' | Match any value except the listed values. |+| ''"!(US02|US03)"''       | Match any value except the listed values.       |
  
 <WRAP warning> <WRAP warning>
Line 130: Line 127:
 </code> </code>
  
-The following rule bills US07 LTO storage in ''OFFS'' at 2 cents per tape-day:+The following rule bills US01 LTO storage in ''OFFS'' at 2 cents per tape-day:
  
 <code> <code>
-AddStorageChargeItem("US07_CUSTOM", "US07", "LTO", "OFFS",+AddStorageChargeItem("US01_CUSTOM", "US01", "LTO", "OFFS",
                      0, 0, 0, 0, 0,                      0, 0, 0, 0, 0,
-                     "$CUSTOMER2", "US07_LTO_STORAGE",+                     "$CUSTOMER2", "US01_LTO_STORAGE",
                      "LTO tape storage at New York OFFS",                      "LTO tape storage at New York OFFS",
                      2, 0);                      2, 0);
Line 141: Line 138:
  
 ^ Position ^ Value ^ Explanation ^ ^ Position ^ Value ^ Explanation ^
-| Package | ''US07_CUSTOM'' | Only the package assigned to US07 can match. | +| Package | ''US01_CUSTOM'' | Only the package assigned to US01 can match. | 
-| Customer | ''US07'' | Prevents another Customer in the package from matching. |+| Customer | ''US01'' | Prevents another Customer in the package from matching. |
 | Media | ''LTO'' | Only LTO records are used. | | Media | ''LTO'' | Only LTO records are used. |
 | Repository | ''OFFS'' | Only storage in the offsite repository is billed. | | Repository | ''OFFS'' | Only storage in the offsite repository is billed. |
Line 148: Line 145:
 | Model | ''0'' | Sums daily counts to produce tape-days. | | Model | ''0'' | Sums daily counts to produce tape-days. |
 | Output Customer | ''$CUSTOMER2'' | Uses the QuickBooks Customer name from the Customer map. | | Output Customer | ''$CUSTOMER2'' | Uses the QuickBooks Customer name from the Customer map. |
-| Item Code | ''US07_LTO_STORAGE'' | QuickBooks Item reference. |+| Item Code | ''US01_LTO_STORAGE'' | QuickBooks Item reference. |
 | Cost | ''2'' | Two cents per unit. | | Cost | ''2'' | Two cents per unit. |
 | Continue | ''0'' | Matching storage data is spent and cannot be billed again by a later storage rule. | | Continue | ''0'' | Matching storage data is spent and cannot be billed again by a later storage rule. |
Line 181: Line 178:
  
 <code> <code>
-AddMovementChargeItem("US07_CUSTOM", "US07", "LTO", "OFFS", "CUST",+AddMovementChargeItem("US01_CUSTOM", "US01", "LTO", "OFFS", "CUST",
                       0, 0, 0, 0, 0,                       0, 0, 0, 0, 0,
-                      "$CUSTOMER2", "US07_LTO_DELIVERY",+                      "$CUSTOMER2", "US01_LTO_DELIVERY",
                       "LTO tape delivery from OFFS to CUST",                       "LTO tape delivery from OFFS to CUST",
                       5, 0);                       5, 0);
Line 193: Line 190:
  
 <code> <code>
-AddMovementChargeItem("US07_CUSTOM", "US07", "LTO", "CUST", "OFFS",+AddMovementChargeItem("US01_CUSTOM", "US01", "LTO", "CUST", "OFFS",
                       0, 0, 0, 0, 0,                       0, 0, 0, 0, 0,
-                      "$CUSTOMER2", "US07_LTO_PICKUP",+                      "$CUSTOMER2", "US01_LTO_PICKUP",
                       "LTO tape pickup from CUST to OFFS",                       "LTO tape pickup from CUST to OFFS",
                       3, 0);                       3, 0);
Line 290: Line 287:
  
 <code> <code>
-AddAppendFile("No_Package", "US07", "..\etc\billing\US07_Monthly.txt");+AddAppendFile("No_Package", "US01", "..\etc\billing\US01_Monthly.txt");
 </code> </code>
  
 Append files may be used for fixed fees, recurring charges, credits, or Customer-specific contract items. Append files may be used for fixed fees, recurring charges, credits, or Customer-specific contract items.
  
-<WRAP warning> 
-Append-file content is written directly into the processor output. Keep every append file under version control and validate the resulting XML before import. 
-</WRAP> 
  
 ===== Output Variables ===== ===== Output Variables =====
Line 308: Line 302:
  
 <file - customer.ttmap> <file - customer.ttmap>
-US07 New York Data Center+US01 New York Data Center
 </file> </file>
  
-For this Customer, ''$CUSTOMER'' becomes ''US07'' and ''$CUSTOMER2'' becomes ''New York Data Center''.+For this Customer, ''$CUSTOMER'' becomes ''US01'' and ''$CUSTOMER2'' becomes ''New York Data Center''.
  
 ===== Pricing ===== ===== Pricing =====
Line 327: Line 321:
 When cost is zero, the QuickBooks Interface omits the ''Rate'' element. QuickBooks may then use the default rate configured for the referenced Item. When cost is zero, the QuickBooks Interface omits the ''Rate'' element. QuickBooks may then use the default rate configured for the referenced Item.
  
-<WRAP warning>+ 
 +<WRAP tip>
 Do not assume that a zero cost makes an item free. Use no matching rule for free activity, or verify the intended pricing behavior in a QuickBooks test company. Do not assume that a zero cost makes an item free. Use no matching rule for free activity, or verify the intended pricing behavior in a QuickBooks test company.
 </WRAP> </WRAP>
Line 347: Line 342:
 <code> <code>
 # Specific free rule, but Continue is enabled # Specific free rule, but Continue is enabled
-AddMovementChargeItem("*", "US07", "LTO", "OFFS", "OFFS",+AddMovementChargeItem("*", "US01", "LTO", "OFFS", "OFFS",
                       0, 0, 0, 0, 0,                       0, 0, 0, 0, 0,
                       "$CUSTOMER2", "INTERNAL_MOVE", " ", 0, 1);                       "$CUSTOMER2", "INTERNAL_MOVE", " ", 0, 1);
Line 377: Line 372:
 Before approving a definition: Before approving a definition:
  
-  * Run ''TMSS10LogStatsProcess -l'' and confirm every signature. 
   * Confirm the package map assigns the Customer to the expected package.   * Confirm the package map assigns the Customer to the expected package.
   * Confirm Customer, Media-ID, and Repository-ID values match TapeTrack exactly.   * Confirm Customer, Media-ID, and Repository-ID values match TapeTrack exactly.
Line 410: Line 404:
   * [[object:customer|Customer Object]]   * [[object:customer|Customer Object]]
  
 +
 +{{tag> billing}}
  
billing/billing_rules.1787105381.txt.gz · Last modified: 2026/08/19 02:09 by Scott Cunliffe