Write the expected result first
Before you open developer tools, describe the expected result in one sentence.Prove the browser installation
For@bilyai/js, turn on lifecycle diagnostics temporarily:
- The page contains exactly one Bily script.
- Its full URL matches Bily > Settings > Apps > More settings > Install tracking, including query parameters.
- The browser requests that URL once.
ready()resolves in client-mounted browser code.- The application reaches the intended
track()call once. - The event appears with the expected name and safe payload in the selected Bily store.
ready() proves the browser runtime can accept queued calls. It does not acknowledge an event or prove ingestion.
Prove each page view once
Test this sequence:
If a direct load produces two events, check for both installation paths and remove the manual page-view call from the initial mount.
Compare the payload with the plan
Compare the observed payload with your event plan—not only the TypeScript type.- Is the event name spelled and capitalized exactly?
- Did it fire only after the outcome succeeded?
- Are IDs stable and from the intended environment?
- Are numbers finite and in the expected unit?
- Are product quantity and order totals correct?
- Is the customer context permitted for this event?
- Are secrets, raw errors, and unreviewed form values absent?
order.total when it is authoritative. Otherwise, the SDK calculates the total from order.products.
Read each SDK signal correctly
The default queue holds 100 calls and can be configured from 1 to 1,000. The default load timeout is 15 seconds and can be configured from 1,000 to 60,000 milliseconds.
Start API validation with discovery
Discover your scope before you call a store-specific endpoint:GET /contextwithoutorganizationIdfor an ordinary store-scoped key- An exact
organizations[].stores[].urlfrom the response - A read-only store endpoint using that returned store URL
organizationId query only when the authenticated identity can access multiple organizations and the workload intentionally selects one.
Save x-request-id from every response.
Before you retry a write, use a read to prove whether the first request took effect.
Separate MCP discovery from execution
Follow this sequence:- Confirm the endpoint is exactly
https://api.bily.ai/mcp. - Confirm the client completed Bily Connect or uses one valid fallback key.
- Call
searchwith the outcome, store URL when relevant, and a limit from 1 to 20. - Inspect the returned helper, schema, risk guidance, and verification step.
- Review the complete async function before approving
execute. - Verify any write with the recommended read.
execute function can contain several helper calls. It has no direct outbound network access and can run for at most 20 seconds.
Make a support report actionable
Provide:- environment and selected Bily store;
- SDK or client version;
- exact safe event or operation name;
- expected and observed result;
- minimal reproduction steps;
- timestamp and Bily request ID when available;
- browser or client error text with customer data removed.