Skip to main content

CCH SureTax Connector app

Zuora

CCH SureTax Connector app

Prerequisites  

Install the app

Follow the instructions in Install an App to install the app. Specific to the Tax app: 

  • Run mode - Select the tax vendor you want to use.
  • Tax - Select the desired credentials to the selected tax vendor. If no desired credential can be found, click New to create the credentials for the new Tax instance.
    • Username and Password - The credentials for your tax vendor account. 
    • Security Token - The security token for your tax vendor account. If you have specified the username and password for your tax vendor account, this field is not required.
    • URL - The endpoint of your tax vendor account. Check this resource on CCH SureTax for information.

Configure the app

1. Configure templates

The Dynamic Request Template is the body of the request where Zuora populates invoice information that can be configured based on your needs. Templates are dynamically rendered using the Liquid Template Language and are provided in the Text/XML or Application/JSON format.

Perform the following steps to configure a dynamic request template:

  1. Launch the created Tax instance and click the TEMPLATE CONFIGURATION tab. 
  2. Select the tax engine for which you want to configure templates from the Tax Engine dropdown list.
  3. Select the tab for the template (Standard or taxVoid) you want to configure.

    Zuora offers two templates: the Standard template and the taxVoid template, with only the Standard template being mandatory. Configuration options for tax systems vary, and templates should be tailored to required information. They can include additional fields beyond those in the request. Zuora provides default Standard templates in SOAP and REST formats. Both SOAP API and REST API are supported. For failed payments requiring a rollback of the Subscribe call and invoice deletion, a taxVoid template is necessary to void the invoice and associated tax records from the tax vendor's system. Refer to your tax vendor's API documentation or contact support for further details on field formatting.

SureTax SOAP taxVoid template

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
  <soapenv:Header/>
  <soapenv:Body>
    <tem:CancelSoapRequest>
      <tem:requestCancel>
        <tem:ClientNumber>xxxxxxx</tem:ClientNumber>
        <tem:ValidationKey>xxxxxxx</tem:ValidationKey>
        <tem:TransId>{{document["transactionId"]}}</tem:TransId>
      </tem:requestCancel>
    </tem:CancelSoapRequest>
  </soapenv:Body>
</soapenv:Envelope>

SureTax REST taxVoid template 

{
  "requestCancel": {
    "ClientNumber": "xxxxxx",
    "ValidationKey": "xxxxxxxx",
    "TransId": "{{document["transactionId"]}}"
  }
}
 

SureTax REST standard template

{
  "request": {
    "BusinessUnit": "ZUORA",
    "ClientNumber": "xxxxxxx",
    "ValidationKey": "xxxxxxx",
    "DataYear": "{{ tax_date | date: "%Y" }}",
    "DataMonth": "{{ tax_date | date: "%m" }}",
    "CmplDataYear": "{{ today | date: "%Y" }}",
    "CmplDataMonth": "{{ today | date: "%m" }}",
    "ClientTracking": "{{ document["invoiceNumber"] }}",
    "ResponseType": "12345",
    "ResponseGroup": "13",
    "ReturnFileCode": "{% if document["preview_mode"] %}T{% else %}0{% endif %}",
    "MasterTransId": "0",
    "STAN": "{{ document["invoiceNumber"] }}",
    "ItemList": [
      {% for document_item in document_items %}
      {
        "LineNumber": {{ forloop.index }},
        "CustomerNumber": "{{ customer["accountNumber"] }}",
        "InvoiceNumber": "{{ document["invoiceNumber"] }}",
        "TransDate": "{{ today }}",
        "Revenue": "{{ item_amount }}",
        "TaxIncludedCode": "{{ document_item["taxMode"] }}",
        "Units": "{{ document_item["quantity"] }}",
        "UnitType": "{{ item_tax_unit }}",
        "TaxSitusRule": "05",
        "TransTypeCode": "990101",
        "SalesTypeCode": "R",
        "RegulatoryCode": "54",
        "CurrencyCode": "{{ document["currency"] }}",
        "BillingAddress": {
          "PrimaryAddressLine": "{{ customer["address1"] }}",
          "SecondaryAddressLine": "{{ customer["address2"] }}",
          "County": "{{ customer["county"] }}",
          "City": "{{ customer["city"] }}",
          "State": "{{ customer["state"] }}",
          {% if customer["zipCode"] contains '-' %}
          "PostalCode": "{{ customer["zipCode"] | slice: 0, 5 }}",
          "Plus4": "{{ customer["zipCode"] | slice: -4, 4 }}",
          {% else %}
          "PostalCode": "{{ customer["zipCode"] | slice: 0, 5 }}",
          "Plus4": "",
          {% endif %}
          "Country": "{{ customer["country"] }}",
          "VerifyAddress": 0
        }
      }
      {% if forloop.last == false %}
      ,
      {% endif %}
      {% assign invoice_total = invoice_total | plus: item_amount %}
      {% endfor %}
    ],
    "TotalRevenue": "{{ invoice_total }}"
  }
} 

SureTax SOAP standard template 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:SoapRequest>
         <tem:request>
            <tem:ClientNumber>xxxxxxx</tem:ClientNumber>
            <tem:BusinessUnit>Billing</tem:BusinessUnit>
            <tem:ValidationKey>xxxxxxx</tem:ValidationKey>
            <tem:DataYear>{{ document["invoiceDate"] | date: "%Y" }}</tem:DataYear>
            <tem:DataMonth>{{ document["invoiceDate"] | date: "%m" }}</tem:DataMonth>
            <tem:CmplDataYear>{{ today | date: "%Y" }}</tem:CmplDataYear>
            <tem:CmplDataMonth>{{ today | date: "%m" }}</tem:CmplDataMonth>
            <tem:ClientTracking>{{ document["invoiceNumber"] }}</tem:ClientTracking>
            <tem:ResponseType>D2</tem:ResponseType>
            <tem:ReturnFileCode>{% if document["preview_mode"] %}T{% else %}0{% endif %}</tem:ReturnFileCode>
            <tem:MasterTransId>0</tem:MasterTransId>
            <tem:BillingAddress>
               <tem:PrimaryAddressLine>{{customer["address1"]}}</tem:PrimaryAddressLine>
               <tem:SecondaryAddressLine>{{customer["address2"]}}</tem:SecondaryAddressLine>
               <tem:County>{{customer["county"]}}</tem:County>
               <tem:City>{{customer["city"]}}</tem:City>
               <tem:State>{{customer["state"]}}</tem:State>
               {% if customer["zipCode"] contains '-' %}
               <tem:PostalCode>{{customer["zipCode"] | slice: 0, 5}}</tem:PostalCode>
               <tem:Plus4>{{customer["zipCode"] | slice: -4, 4}}</tem:Plus4>
               {% else %}
               <tem:PostalCode>{{customer["zipCode"] | slice: 0, 5}}</tem:PostalCode>
               <tem:Plus4></tem:Plus4>
               {% endif %}
               <tem:Country>{{customer["country"]}}</tem:Country>
               <tem:VerifyAddress>false</tem:VerifyAddress>
            </tem:BillingAddress>
            <tem:ShipToAddress>
               <tem:PrimaryAddressLine>{{customer["address1"]}}</tem:PrimaryAddressLine>
               <tem:SecondaryAddressLine>{{customer["address2"]}}</tem:SecondaryAddressLine>
               <tem:County>{{customer["county"]}}</tem:County>
               <tem:City>{{customer["city"]}}</tem:City>
               <tem:State>{{customer["state"]}}</tem:State>
               {% if customer["zipCode"] contains '-' %}
               <tem:PostalCode>{{customer["zipCode"] | slice: 0, 5}}</tem:PostalCode>
               <tem:Plus4>{{customer["zipCode"] | slice: -4, 4}}</tem:Plus4>
               {% else %}
               <tem:PostalCode>{{customer["zipCode"] | slice: 0, 5}}</tem:PostalCode>
               <tem:Plus4></tem:Plus4>
               {% endif %}
               <tem:Country>{{customer["country"]}}</tem:Country>
               <tem:VerifyAddress>false</tem:VerifyAddress>
            </tem:ShipToAddress>
            <tem:ItemList>
               {% for document_item in document_items %}
               <tem:Item>
                  <tem:LineNumber>{{ forloop.index }}</tem:LineNumber>
                  <tem:InvoiceNumber>{{ document["invoiceNumber"] }}</tem:InvoiceNumber>
                  <tem:CustomerNumber>{{ customer["accountNumber"] }}</tem:CustomerNumber>
                  <tem:TransDate>{{ today }}</tem:TransDate>
                  <tem:Revenue>{{ document_item["totalAmount"]}}</tem:Revenue>
                  <tem:TaxIncludedCode>{{ document_item["taxMode"] }}</tem:TaxIncludedCode>
                  <tem:Units>{{ document_item["quantity"] }}</tem:Units>
                  <tem:TaxSitusRule>22</tem:TaxSitusRule>
                  <tem:TransTypeCode>{{document_item["taxCode"]}}</tem:TransTypeCode>
                  <tem:SalesTypeCode>B</tem:SalesTypeCode>
                  <tem:RegulatoryCode>99</tem:RegulatoryCode>
                  <tem:ShipFromPOB>false</tem:ShipFromPOB>
                  <tem:MailOrder>false</tem:MailOrder>
                  <tem:CommonCarrier>false</tem:CommonCarrier>
                  <tem:CurrencyCode>{{ document["currency"] }}</tem:CurrencyCode>
                  <tem:BillingAddress>
                     <tem:PrimaryAddressLine>{{customer["address1"]}}</tem:PrimaryAddressLine>
                     <tem:SecondaryAddressLine>{{customer["address2"]}}</tem:SecondaryAddressLine>
                     <tem:County>{{customer["county"]}}</tem:County>
                     <tem:City>{{customer["city"]}}</tem:City>
                     <tem:State>{{customer["state"]}}</tem:State>
                     {% if customer["zipCode"] contains '-' %}
                     <tem:PostalCode>{{customer["zipCode"] | slice: 0, 5}}</tem:PostalCode>
                     <tem:Plus4>{{customer["zipCode"] | slice
  1. Add a new template or modify the default template in the text box.
    To view all available fields and corresponding values that can be used in the template:
    • Click Show Liquid Examples.
    • Select the desired field in the Example Field dropdown list, the corresponding value you can copy and paste in the template is displayed under Example Value. The fields in the following objects are available for selection. See Context object for rendering tax app templates for more information.
      • customer
      • seller
      • document
      • document_item
  2. When you complete the configuration, click configure_icon.png and then select Preview Template to preview the configured template. If you want to start over, you can click configure_icon.png and select Revert Template to Default.
  3. Click Save Both Template below the text box to save the template configurations.

Notes on building the templates:

  • If you includelineNumber in the standard template, it should be a sequential number starting from 1. As a best practice, it is recommended not to use this field in the template.
  • The taxVoid template currently only supports theid, transactionId, taxCompanyCode and invoiceNumber fields on the document object

2. Configure engine settings

After configuring the template, take the following steps to configure engine settings:

  1. Click the ENGINE SETTINGS tab.
  2. Click edit_icon.png for the tax engine that you want to configure. The tax engine details window is displayed.
  3. In the Headers tab, select the value forContent-Typein the Value dropdown list. You can click Add Header to add additional headers that will be added to the tax requests that are sent to your tax vendor. 
  4. Click the System Configuration tab and complete the system configuration. 
    • Select an authentication type in the Authentication Type dropdown list. Consult your tax vendor for further information regarding your specific authentication type and credentials. 
    • Select an option from the taxVoid Call Handling dropdown list:
      • Pass Through - Allows the call to process without any issue, but tax will not be processed.
      • Block - Does not allow the call to process and will generate an error message.
      • Enable - Allows the call to pass and will either process tax or generate an error message.
        Note: If you select Enable from the list, contact Zuora Global Support to perform specific taxVoid configurations.
    • Optionally, you can select Skip Taxation on External Failure. When this option is selected, taxation will be skipped in the case of external failures such as network issues or error responses from the vendor side.
  5. Complete the information in the Seller Information tab. The information that is required to be completed varies depending on the selected tax engine requirements. Check with your tax engine vendor for details. 
  6. Click UPDATE to save the configuration for each tab.

Configure rate plans

After the tax app is installed and configured, take the following tasks before using the configured tax instance:

1. Set up Connect Tax Engine

To set up a Connect Tax Engine:

  1. In your Zuora tenant, click your username at the top right and navigate to Settings > Billing.
  2. Click Setup Tax Engine and Tax Date.
  3. Select Connect Tax Engine from the list, and click Set up new tax engine. You can create a maximum of 10 Connect Tax Engines.
  4. In the Basic Information area on the Setup Tax Engine page, specify the basic information for the new tax engine:
    • Name: Name the Connect Tax Engine you would like to use in Zuora. For example, Avalara Brazil, India Local Tax, Avalara Telco, etc.
    • Connect Token: Enter the unique 32-character API Token of the Tax app. To obtain your API Token:
      1. Access the app through Setup Tax Engine and Tax Date under Billing settings.
      2. Navigate to the APP INFORMATION tab, the API token is listed near the top of the tab. 
  5. In the Custom Fields sent to the Open Tax Connector area, select all the custom fields that you want to use in the tax request for tax calculation. Failure to select them will result in blank values being used in the corresponding Liquid objects. See Manage Custom fields for more information.
    Note: The maximum number of custom fields you can select varies depending on your Zuora edition or Zuora modules. For more information, see Zuora Editions and Zuora Modules.
  6. Click Save to save the configurations.
  7. In the Company Information area, add at least one Company Code to activate a tax code.

After completing the previous steps, you can click back to the Tax Engine list to view the Connect Tax Engine you just created. 

  • If you want to remove an existing Connect Tax Engine referred to by a tax code, you must first remove the tax code before removing the Connect Tax Engine. 
  • When setting up a new tax engine, you will encounter the old user interface (UI). However, to access advanced settings such as Tax Void Call Handling, Custom Fields, Seller Information, request templates, preview a rendered request, and much more, you must utilize the new UI. This new UI is accessible only when editing an existing tax engine that you have created. Ensure to use the Edit function to access the new UI for configuring advanced settings and making modifications to your tax engine setup.

Edit existing Connect Tax Engine

It is highly recommended that you utilize the New Tax UI for editing, as it provides a convenient way to modify all Connect Tax Engine settings in a centralized location. The old UI can still be used to modify important details such as name, connect token, and custom fields sent to the Connect Tax App. But you’ll have to access the Connect UI to modify credentials and configure the templates.

When editing an existing Connect Tax Engine, access the advanced settings available exclusively in the new UI. To modify a previously created tax engine, follow these steps:

  1. In your Zuora tenant, navigate to Settings > Billing by clicking your username at the top right.
  2. Click Setup Tax Engine and Tax Date.
  3. From the Tax Engines list, click Edit next to the tax engine you want to modify.
  4. The tax engine details will open with the new UI containing the Engine Name, Vendor, Environment, and Authentication details that you created.
  5. You can now create advanced settings as listed here:

Field

Description

Engine Name

The name of the engine you wish to use. 

Vendor

The name of the third-party vendor.

Environment

The environment where the tax engine will be applied.

Authentication Type

For Basic Auth, your tax vendor account credentials are your username and password.

If Avalara Brazil is selected as the vendor, OAuth 2.0 is the default authentication type. Enter the client ID and client secret from your tax vendor. Refer to Avalara Brazil's documentation for authentication setup.

Advanced Settings

Tax Void Call Handling

The option to determine whether the external Vendor must be voided. The available options are:

  • PassThrough - No call will be made to the vendor; however, the Invoice  Cancel Post will be successful (as it says Pass Through)

  • Enable - A call will be made to the vendor.

  • Block -  No call will be made to the vendor, and it will return blocked (i.e., Invoice Cancel Post wouldn't be successful).

Netread Timeout

The duration of time is minutes before the timeout occurs.

Request Headers

The option to add additional headers to your tax requests.  While custom headers may not be frequently necessary, they prove beneficial in situations where authentication is required through firewalls or in other specific scenarios.

Field Mappings

The option to retrieve data from the tax engine response and store it on the Taxation Item object. For more information on Flexible Field Mapping, see Flexible Tax Mapping.

Custom Fields

The option to select existing custom fields for the tax engine.

Company and Seller Information

The option to add company code, name, and address.

  1. In the Request Template section, configure the template as required. Click Use Default Template to use the preconfigured template. The Request Template, in Text/XML or Application/JSON format, is where Zuora populates invoice information based on your configuration.
  2. Click Save after updating the settings to ensure the changes are saved.

2. Set up taxation codes

To set up a tax code that uses the Connect Tax Engine:

  1. Click your username at the top right and navigate to Settings > Billing.
  2. Click Setup Taxation Codes.
  3. Click add new tax code.
  4. In the Basic Information area, complete the tax code details:
  • Tax Code Name: Enter the name of the tax code to be selected in the product catalog when discerning which Connect Tax Engine the charges will use to calculate tax.
  • Use Multiple Connect Tax Engines: Select this checkbox if you want to use multiple Connect Tax Engines.
    Selected Not selected
    Tax Engines: Fill in the Mapping Formula tab with mapping rules which define how to select different Connect Tax Engines to handle tax calculation for various customer accounts. Refer to the Example tab to copy and customize pre-defined mapping formulas. See Tax Engine Mapping Formula for more information. Tax Engine: Select the name that you have specified for the Connect Tax Engine.
    External Company Code: Select the company code created when setting up the Connect Tax Engine.
  • Active: This is No by default. You will activate it later.
  • Description (Optional): Describe the tax code and the tax app that will be used for future reference.
  1. Click save.
  2. Click Activate to ensure the tax code is present in the product catalog.

3. Activate tax code in product rate plans

To activate the tax code in your product rate plans:

  1. From the left-hand navigation of the Zuora UI, click Product Catalog.
  2. Click the name of the product where you want to change its rate plan.
  3. Select an existing rate plan or create a new rate plan to use the tax code. See the following articles for more information:
  1. Hover over the title and click Edit to edit the rate plan. 
  2. Complete the details in the Taxation section of the selected rate plan:
  • Taxable: Select this check box to enable the rate plan to be taxable.
  • Tax Mode: Select the desired tax mode:
    • Tax Exclusive: Tax is excluded from the charges.
    • Tax Inclusive: Tax is included in the charges.
  • Tax Code - Select the desired tax code in the dropdown list.
  1. Click save.

Test the app

After the CCH SureTax Connector app is configured, perform the following steps to test the app:

  1. Log in to your Zuora tenant, navigate to Marketplace > CCH SureTax in the left-hand column navigation menu.
  2. Create a test product in your product catalog. See Create a Product in Product Catalog for more information on creating a product. 
  3. Create a subscription on an account with only the test product. See Create Subscriptions for more information.
  4. Define billing rules. Navigate to Settings > Billing > Define Billing Rules > edit in your Zuora tenant. 
  5. Create a bill run for the test account and generate an invoice. See Creating Bill Runs for more information.
  6. Post the invoice. If the tax value is displayed on your invoice, your template was configured correctly and can be used for future bill runs. If you don't see any tax displayed on the invoice, troubleshoot and test your configurations using CURL requests. For more information see, System Health for tax log monitoring.