Loading
Prepare for Email to Become the Default Login ExperienceRead More
Extend Your Revenue Standard Tax Engine

Extend Your Revenue Standard Tax Engine

Apply tax rates based on custom attributes, such as product category, customer attributes, or exemption criteria, without writing Apex code. Use a custom metadata type to map billing transaction fields to a cloned Revenue Standard Tax Entries decision table, and persist matched values on invoice and credit memo tax lines.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Unlimited, and Developer Editions with the Revenue Cloud Advanced license or the Revenue Cloud Billing license
User Permissions Needed
To create a custom metadata type and custom fields: Tax Admin permission set
To change the decision table: Rule Engine Designer permission set
Note
Note The Standard User profile includes the View Developer Name system permission. Users need this permission to use the Revenue Standard Tax Engine. When you clone the Standard User profile, keep View Developer Name on the cloned profile, or add it to a permission set assigned to the user.

Configure Custom Metadata Types

Create a custom metadata type that maps billing transaction fields to decision table columns for the Revenue Standard Tax Engine.

Before you begin, create the custom fields on the Tax Rate object that you want to use as matching criteria or as outputs on tax lines. Also create any custom fields you need on invoice line tax and credit memo line tax. See Create a Custom Field.

  1. Create a custom metadata type.
  2. Click New in the Custom Fields section of the created custom metadata and create these fields exactly as shown here.
    Field Label API Name Field Type Description
    Entity Field Name Entity_Field_Name__c Metadata Relationship (Field Definition) The field on that object whose value is used when calculating tax.
    Entity Name Entity_Name__c Metadata Relationship (Entity Definition) The billing object that this mapping applies to. This field controls Entity Field Name.
    Request/Response Request_Response__c Picklist. Add these values: Request, Response. The Request value used as a decision table input. The Response value used to store the matched value on the tax line.
    Tax Field Name Tax_Field_Name__c Text The name that links the billing field to the decision table column.
    Tax Rate Entity Name Tax_Rate_Entity_Name__c Metadata Relationship (Entity Definition) The Tax Rate entity used in the mapping. This field controls Tax Rate Input Field Name and Tax Rate Output Field Name.
    Tax Rate Input Field Name Tax_Rate_Input_Field_Name__c Metadata Relationship (Field Definition) The Tax Rate field used as a decision table input when matching a tax rate.
    Tax Rate Output Field Name Tax_Rate_Output_Field_Name__c Metadata Relationship (Field Definition) The Tax Rate field used as a decision table output. Fill this field when Request/Response is Response.
  3. Save the changes. Here’s how a configured custom metadata type appears.
    Custom metadata type with tax rate mapping fields
  4. To define records, click Manage [Your Custom Metadata Type Label].
  5. To add your custom field mappings, click New.
  6. For each field mapping, provide the entity name, entity field name, tax field name, request/response, tax rate entity name, and tax rate input or output field values.
  7. Save the changes. Here’s how a configured tax mapping appears.
    Tax rate field mapping record

Clone the Decision Table

Clone the Revenue Standard Tax Entries decision table and add the custom columns that you use to match tax rates.

  1. From the App Launcher, find and select Lookup Tables.
  2. Open Revenue Standard Tax Entries.
  3. From the Show menu, click Clone, enter a name and API name, and save.
  4. Add custom input or output columns from the Tax Rate object to the cloned decision table.
  5. Configure the required setting and operator for each custom input column. See Create a Decision Table and How Null Values Work in Decision Tables.
  6. Activate and refresh the cloned decision table. See Activate a Decision Table and Refresh a Decision Table.

After you configure the custom metadata type and activate the cloned decision table, associate both with a tax engine. Set Type to Revenue Standard Tax Engine, enter the Custom Metadata Type API Name, and select the Decision Table. See Create a Tax Engine.

Note
Note After you add or change a tax rate, refresh the cloned decision table so Billing uses the latest rates. See Refresh a Decision Table.
 
Loading
Salesforce Help | Article