Skip to content

Test and Publish

Billing rules should be tested before they affect live ingestion. The normal order is:

  1. Run an interactive rule test against a draft or published rule set.
  2. Publish the reviewed rule so production APIs can use it.
  3. Run the test again against the published rule, then submit a simulated real event when you want to verify ingestion and account billing.

A rule set keeps the same rule ID across edits. Editing creates the next draft version. Publishing moves the current version pointer to that draft, and rollback moves the current pointer back to an earlier published version. Historical published versions remain read-only.

Rule version lifecycleRule version lifecycleCreate rulestable rule_idv1 draftedit and testPublish v1set currentCurrent v1live ingestionContinue editingcreate v2 draftv2 draftnot active yetPublish v2same rule_idCurrent v2new events record v2Delete draft v2return to current v1Create v3 draftcopy from currentPublish v3current = v3Rollback to v2 or v1published onlyCurrent v2 / v1v3 stays historyPublish or rollbackruntime reads currentRule editor version viewRule editor version viewDraft v4edit / delete / publishCurrent v2read-only / create draftPublished v3read-only / rollback / copyPublished v1read-only / rollback / copy

Delete a draft when you want to discard unpublished changes. If v2 is still a draft and the current version is v1, deleting the draft returns the editor to v1 without changing live ingestion. Rollback is different: it changes the current version immediately, so use it only after selecting a previously published version.

Open Rules and select Rule test.

Use this test before publishing. It runs your sample raw event against the selected extractor and optional pricing rule set, but it does not write production usage data or debit accounts.

  1. Select an extractor rule set. This can be a draft while you are still editing.
  2. Optionally select a pricing rule set.
  3. Paste a raw event JSON sample.
  4. Select Run test.

The result shows:

  • extracted subject and dimensions;
  • generated charge items;
  • rated amounts when pricing is available;
  • unmatched items when fallback pricing did not match.

Adjust the draft and run the test again until the extracted subject, dimensions, charge items, and amounts match what you expect.

Open Rules.

Publishing promotes a tested draft into the active project rule set selection path. Production ingestion and rating use published rule sets, not arbitrary drafts, so unfinished edits cannot accidentally change customer billing. The published version also gives audit, replay, account billing, and support workflows a stable rule version to reference later.

  1. Find the extractor or pricing rule set.
  2. Select Details.
  3. Review the rule set ID, status, version, effective time, and configuration.
  4. Select Publish.

Only draft rule sets can be published. Published rule sets remain auditable. If you no longer want a published rule set active, archive it from the details sheet.

After publishing, return to Rule test, select the published rule set, and run the same sample again. The Portal can then show a simulated real-reporting action.

Use this action to submit the sample event into the current project’s production ingestion path. The Portal adds an idempotency key for the test request. This is useful when you want to verify the same path used by the production API, including subject routing, account resolution, wallet debit behavior, and usage explorer visibility.

After submitting:

  1. Open Usage explorer.
  2. Use a recent time window.
  3. Select Show usage or turn on Live.
  4. Confirm the event and charge items appear after queue processing completes.
  5. If the subject is routed to an account and realtime debit is enabled, verify the account and wallet results in the Portal.

Leave pricing empty when you only want to verify extraction.

Select a pricing rule set when:

  • extractor charge items do not have attached pricing;
  • you need to verify fallback matching;
  • you want to test metric-specific pricing rules before publishing them.