When you have set up pricing for your Product Plans, attached these to end customer Accounts, and created any required Prepayments/Commitments for Accounts, you can generate some test Bills for these Accounts. To do this, you'll need to feed some sample usage data into m3ter before you generate test Bills. You can exploit a very useful feature built into the Console, which allows you to submit test usage data into m3ter:
For a specific Account.
For those Meter data collection fields which are the basis for charging the Account.
You can then generate a sample Bill for the Account and check to see that your usage-based pricing set up is charging correctly before you deploy to production.
To do this, you need to have the following to hand:
The Code of the Account for which you want to check billing.
The Meters whose Data Fields are the Target Fields for the Aggregations which you used to configure the Pricing for the Plan you’ve attached to the Account.
This topic explains how to submit test usage data for an Account.
Tip: Submit Test Usage Data from an Account page? Alternatively, you can follow similar steps to those explained here to submit usage data for a specific Account directly from the Account page. See Submitting Usage Data for an Account.
To submit usage data:
1. Select Usage>Meters. The Meters page opens.
2. In the Product drop-down, select the Product the Meter is linked to. The Meters configured for the selected Product are listed.
3. In the list, locate the Meter whose Data Fields were Target Fields for the Aggregation used for pricing the Plan you've attached to the Account.
4. Select the NAME hotlink text of this Meter. The Meter details page opens.
5. On the Submit usage data panel you can submit usage data for the Meter:
Using the default Simple UI format:
A measurement UID is entered automatically.
A Timestamp date/time is entered for the current date and time. You can adjust this and enter a date/time value that is in the past for your submission - see the section below for more details.
The Code string for the Meter is entered - this is the required parameter for a Submit Measurements API call to the Ingest API.
You can select the Account and then enter Values for those Meter Data Fields for which you want to submit usage data for charging the Account.
Enter a Value for each of the Meter Data fields as required for the usage data submission. In this example, the selected Meter has a single MEASURE numeric Data Field:
Alternatively, you can switch to Advanced, where you can edit the raw JSON for the usage data submission:
Important! The Submit Measurements call to the Ingest API requires the Account Code string for the
"account" request parameter. On the Simple format you'll select by the Account Name, but when you switch to the Advanced format, you'll see that it's the Account Code that is being used.
6. Select Submit usage. If the submission succeeds, you will see a confirmation message that it was accepted at the bottom of the panel:
Important! For JSON well-formedness, do not have a trailing comma after the last Data Field parameter entry. If you do, then your Submit usage call will be rejected as invalid.
7. If you want to send a second set of usage data for the same Meter, first navigate away from the page and then re-open the same Meter details page. You will see that there is a new measurements
“uid” inserted for Submit usage.
Tip: Repeated Test Submissions? If you had simply selected Submit usage a second time, you would have submitted under the same measurement
"uid" and, although an
“accepted” message will be returned again, the system interprets this as the same data and ignores it.
8. Re-enter the same as at step 5 for the Account Code, and a second set of measures for the Meter Data Fields parameters.
9. Select Submit usage again to submit a second set of usage data.
Tip: Account consumes several Products? If the Account for which you want to test Billing consumes more that one of your Products, you can repeat these steps for each of the Meters used as the basis for pricing each of the Product Plans attached to the Account.
When you are setting things up to Submit usage data, the Timestamp field is automatically populated with the current date/time. You can edit this field and enter your own past date/time value for the usage data submission:
The data item is ingested immediately into m3ter.
The date/time value you enter determines billing for the submitted usage.
The date/time value you enter for the submission is used for the usage data item in the Data Explorer - when you query for usage data, the date/time value you've entered for the submission is shown for Meter Data Fields and is the value that can be filtered on. If the Meter also has Derived Fields whose value is derivative on the Meter Data Fields, the custom date/time value you enter for the submission is applied to any such Derived Fields also.
Adjusting the Timestamp to use date/time values in the past for submitted usage data is useful if you need to make corrections for billing retrospectively against an Account - you can submit positive or negative usage data amounts to correct and reconcile earlier billing anomalies.
Important! If you edit the Timestamp value, you must enter a date/time that is in the past. If you try to submit usage date for a future date/time, the submission will be rejected and you'll receive an error message.