Installing and configuring the tax integration interface

To install and configure the tax integration interface, you need to register the new commands provided by the tax integration kit to the database.

For a store to use the new command provided by the tax integration kit for tax calculation, you need to register the new commands, ApplyCalculationUsageCmd and TaxCalculationUsageTIKCmd, to the WebSphere Commerce database, by updating the CALMETHOD and STENCALUSG tables, which you do by following these steps:

  1. Insert a new entry for ApplyCalculationUsageCmd in the CALMETHOD table.
    Column Values
    CALMETHOD_ID The key, a unique ID that is assigned to the entry.
    STOREENT_ID -1 or the store_ID
    CALUSAGE_ID -3
    TASKNAME com.ibm.commerce.isv.kit.tax.ApplyCalculationUsageTIKCmd
    DESCRIPTION This is a description of the sales tax method of the ISV.
    SUBCLASS 12
    NAME ApplyCalculationUsageTIK

    Use the following sample SQL statements as your guide:

    DELETE FROM calmethod WHERE TASKNAME = 
      'com.ibm.commerce.isv.kit.tax.ApplyCalculationUsageTIKCmd'
      AND STOREENT_ID = store_ID AND CALUSAGE_ID = -3
    
    INSERT INTO CALMETHOD (CALMETHOD_ID, STOREENT_ID, CALUSAGE_ID, TASKNAME, 
      DESCRIPTION, SUBCLASS, NAME) VALUES ((select coalesce((min(calmethod_id)-1),1)
      from calmethod), store_ID , -3
      'com.ibm.commerce.isv.kit.tax.ApplyCalculationUsageTIKCmd', 'default
      method for calculation taxes using Taxware', 12, 'ApplyCalculationUsageTIK')
    
  2. Insert a new entry for TaxCalculationUsageTIKCmd in the CALMETHOD table.
    Column Values
    CALMETHOD_ID The key, a unique ID that is assigned to the entry.
    STOREENT_ID -1 or the store_ID
    CALUSAGE_ID -3
    TASKNAME com.ibm.commerce.isv.kit.tax.TaxCalculationUsageTIKCmd
    DESCRIPTION This is a description of the sales tax method of the ISV.
    SUBCLASS 14
    NAME TaxCalculationUsageTIK

    Use the following sample SQL statements as your guide:

    DELETE FROM calmethod WHERE TASKNAME = 
      'com.ibm.commerce.isv.kit.tax.TaxCalculationUsageTIKCmd' AND
      STOREENT_ID = store_ID AND CALUSAGE_ID = -3
    
    INSERT INTO CALMETHOD (CALMETHOD_ID, STOREENT_ID, CALUSAGE_ID, TASKNAME, 
      DESCRIPTION, SUBCLASS, NAME) VALUES ((select coalesce((min(calmethod_id)-1),1)
      from calmethod), store_ID, -3, 
      'com.ibm.commerce.isv.kit.tax.TaxCalculationUsageTIKCmd', 'default
      method for setting audit flag using Taxware', 14, 'TaxCalculationUsageTIK')
    
  3. Update the STENCALUSG table with the new CALMETHOD ID (obtained from above) for the store:
    update STENCALUSG set CALMETHOD_ID_APP = CALMETHOD_ID where CALUSAGE_ID = -3 and STOREENT_ID = store_ID

    Use the following sample SQL statements as your guide:

    UPDATE STENCALUSG SET (CALMETHOD_ID_APP, CALMETHOD_ID_FIN) = 
      ((SELECT CALMETHOD_ID FROM CALMETHOD WHERE TASKNAME =
      'com.ibm.commerce.isv.kit.tax.ApplyCalculationUsageTIKCmd' AND 
      STOREENT_ID = store_ID AND CALUSAGE_ID = -3), 
      (SELECT CALMETHOD_ID FROM CALMETHOD WHERE TASKNAME =
      'com.ibm.commerce.isv.kit.tax.TaxCalculationUsageTIKCmd' AND STOREENT_ID = store_ID
      AND CALUSAGE_ID = -3)) WHERE CALUSAGE_ID = -3 and STOREENT_ID = store_ID
    
  4. If the CMDREG contains an entry with this interface name, then remove the entry: com.ibm.commerce.taxation.commands.ApplyOrderTaxesCmd

The tax software vendor also would require you to register the TaxOrderCmd and TaxOrderItemCmd commands in the CMDREG table. Refer to the tax software vendor's documentation for details.

Use the following sample SQL statements as your guide:

DELETE FROM cmdreg WHERE storeent_id = store_ID
  AND interfacename = 'com.ibm.commerce.isv.kit.tax.TaxOrderCmd' AND 
  classname = 'com.taxware.utl.TaxwareOrderCmdImpl'

INSERT INTO cmdreg (storeent_id, interfacename, description, classname, 
  properties, target) VALUES (store_ID,
  'com.ibm.commerce.isv.kit.tax.TaxOrderCmd', 
  'Taxware Tax Integration Kit implementation', 
  'com.taxware.utl.TaxwareOrderCmdImpl', null, 'Local')

DELETE FROM cmdreg WHERE storeent_id = store_ID 
  AND interfacename = 'com.ibm.commerce.isv.kit.tax.TaxOrderItemCmd' AND 
  classname = 'com.taxware.utl.TaxwareOrderItemCmdImpl'

INSERT INTO cmdreg (storeent_id, interfacename, description, classname, 
  properties, target) VALUES (store_ID, 
 'com.ibm.commerce.isv.kit.tax.TaxOrderItemCmd', 
 'Taxaware Tax Integration Kit implementation', 
 'com.taxware.utl.TaxwareOrderItemCmdImpl', null, 'Local')

Note: Use 0 (site) or store_ID.