Populate the account mapping table for billing
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' )
- Get the ID and name of the Abiquo VDCs or enterprises. API references:
- From the billing_mapping_type table, use the idMappingType for one of
- Enterprise, with a value of 1
- VDC, with a value of 2
- Use SQL to configure the account mapping table
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');
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.
mysql> select * from kinton.billing_account_mapping; +----------+---------------+----------------------+-----------------------+ | idAbiquo | idMappingType | billingAttributeName | billingAttributeValue | +----------+---------------+----------------------+-----------------------+ | 1 | 1 | ENTERPRISE | Abiquo | | 2 | 1 | ENTERPRISE | TVSC | +----------+---------------+----------------------+-----------------------+ 2 rows in set (0.00 sec)
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-2022, Abiquo Holdings SL. All rights reserved