Entity mapping
Metronome can be the heart of your entire billing system, combining multiple integrations, from CRM to invoicing to reporting. These third-party systems may have their own additional integrations, such as automated tax calculations.
Entity mapping allows you to configure your integrations so they work better together. For example, you can pass additional data on your Stripe invoices to trigger Stripe's tax calculation integrations.
Entity mapping is supported for Stripe integrations.
How entity mapping works
Entity mapping uses custom fields to identify additional data to be sent to an integration. Each integration expects specifically named data:
Stripe
- Anrok: pass a Stripe product ID to
InvoiceItem.price.product
- Avalara: pass a
tax_code
value toInvoiceItems
- TaxJar: pass a
product_tax_code
to Products or Charges
1. Define and populate the custom fields
Using the above values, create the necessary custom fields in your account. You can do this using the Metronome app or API. See custom fields for explicit instructions.
For example, to configure the Stripe TaxJar integration, a product price needs to be passed to Stripe's invoiceitem.price
field. Create a custom field on Product named stripe_taxjar_invoiceitem_price
.
2. Populate the custom fields
After creating the necessary custom fields on your Metronome entities, add the appropriate values for your instances. For example, assign the correct price to an individual Product's stripe_taxjar_invoiceitem_price
field.
3. Map entities in the Metronome app
Next use the Metronome app to configure the entity mapping for the integration. To continue with the Stripe TaxJar example:
- Click General settings.
- On the resulting page, click the Edit mapping for the Stripe integration.
- In the resulting model, select
invoiceitem.price
for the Stripe Entityproduct
for Stripe KeyProduct
for the Metronome Entitystripe_taxjar_invoiceitem_price
for the Metronome Key
- Click Save.
With the entities mapped, the next time you process an invoice with Stripe, the custom field data is passed along. When Stripe receives that field, the TaxJar integration is triggered, dynamically adding correct tax calculations to your invoice.