Populate the account mapping table for billing

The account mapping table is part of the Abiquo billing integration.
The new Abiquo on premise billing feature does not require you to maintain account mapping in the database.
Billing is by customer enterprise and not by VDC

Before you run the billing integration, in the Abiquo database, create a mapping from the Abiquo Enterprise or Virtual datacenter IDs to the Customer IDs in your billing system. To do this, add entries in the account mapping table.

Add one row to the table for every enterprise or virtual datacenter to bill for.

A row in the Account Mapping Table contains the following information:

  • The Abiquo Enterprise ID or Virtual Datacenter ID

  • The mapping type

  • The billing system attribute name (e.g. 'ACCOUNT_NUMBER')

  • The attribute value, i.e. the value associated with the attribute name (e.g. 'MyCorporation' )

 

  1. Get the ID and name of the Abiquo VDCs or enterprises. API references:

    1. https://wiki.abiquo.com/api/latest/VirtualDatacentersResource.html#list-virtual-datacenters

    2. https://wiki.abiquo.com/api/latest/EnterprisesResource.html#list-enterprise-identifiers-and-names
      Example cURL command to retrieve all VDCs

      curl --verbose -X GET 'http://10.10.10.10/api/cloud/virtualdatacenters' \ -H "Accept: application/vnd.abiquo.virtualdatacenters+json;version=4.7" \ -u admin:xabiquo | pjson

       

    On your target database server, ensure that you create a database schema to hold the billing data, and a user account to access it. The following MySQL SQL can be used to help you do that:

     

  2. From the billing_mapping_type table, use the idMappingType for one of 

    1. Enterprise, with a value of 1

    2. VDC, with a value of 2

  3. Use SQL to configure the account mapping table

    1. Example: to map a VDC with ID 29 to an account with an Account Number of 'MyCorporation', you could use this MySQL

      INSERT INTO kinton.billing_account_mapping (idAbiquo, idMappingType, billingAttributeName, billingAttributeValue) VALUES (29, 2, 'ACCOUNT_NUMBER', 'MyCorporation');

       

    2. Example: to add all Enterprises with the billing attribute name ENTERPRISE.

      INSERT INTO kinton.billing_account_mapping (idAbiquo, idMappingType, billingAttributeName, billingAttributeValue) (SELECT idEnterprise, 1, 'ENTERPRISE', e.name FROM kinton.enterprise e);

       

Check the billing account mappings are set by retrieving the table data.

 

Some billing systems may require more than one attribute. You can store these attributes in different lines in the billing_account_mapping table. All the attributes you define in this table will be supplied to the billing connector.

You must set up a separate process to correctly maintain the mappings from Abiquo to billing

 

Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved