Common workflows and example requests
Use these workflows and example requests to build, debug, reconcile, investigate issues, recover stuck meters, and test safely with meter copies.
Build, run, and reconcile a new meter
- Define the meter with meter_guidance, validate_meter, and create_meter.
- Run it in debug mode with run_meter, then check progress with get_run_status and get_run_summary.
- Review failures with audit_trail_entries (ERROR), and create an export job for larger sets.
Investigate missing usage
- Use list_run_history with a date filter to find the relevant runs.
- Use get_run_summary to see the error counts for each operator.
- Use audit_trail_entries with the ERROR export type to see failed records and their error codes.
- Use get_operator_summary to see which operator consumed the most time, grouped by processor.
- Use query_event_store to run SQL against the intermediate event store.
Recover a stuck meter
- Check the status with get_run_status. Runs stuck in RUNNING, STOPPING, or INITIALIZING may need intervention.
- Request a graceful stop with stop_meter_run, using the run ID.
- Check the status again. If the run is still stuck after the graceful stop, you may choose a force stop, knowing the risks described earlier.
- Review the run history and ERROR audit records to determine what happened.
Test safely with a copy
- Duplicate the meter with duplicate_meter.
- Run the copy in debug mode with run_meter.
- Stop the test run with stop_meter_run.
Debug runs do not affect production billing paths.
Example requests
| Category | Example request |
|---|---|
| Create | Create a streaming meter that reads events from Kafka, enriches subscription data, and sends output to Zuora Billing. |
| Operate | Run meter Customer Usage in debug mode. |
| Monitor | Is the Usage Pipeline meter still running? |
| Troubleshoot | Why did yesterday's usage pipeline fail? |
| Audit | Export every failed record from yesterday. |
| Investigate | Find all events where accountId = A000123 during the last 24 hours. |
How responses are presented
- The agent begins with a one-sentence answer, such as the status, count, or conclusion.
- Meters, runs, and errors appear in compact tables rather than raw data dumps.
- Key terms are defined the first time they come up: meter, run, session, operator, and audit ERROR.
- Findings include supporting evidence such as the meter ID, session ID, error code, operator name, and timestamp.
- Before any write action, the agent states the action, its impact, and asks for approval.
Error records
When the agent presents ERROR audit records, it explains each field in plain language:
| Field | Meaning |
|---|---|
| errorCode | The classification of the failure, such as an enrichment lookup miss |
| processorId or operator name | The processing stage where the failure happened |
| Sample payload fields | The identity or value that was missing or invalid |
| sessionId | The run that produced the error |