Bayou Customer Lifecycle
Every integration follows the same path: you create a customer, the customer authenticates with their utility via Bayou, Bayou discovers their data, and then Bayou shares that data and keeps the data fresh. Each state is indicated by a webhook or API field, as described here:
| Lifecycle stage | Webhook indicator | REST API Indicator | What you do next |
|---|---|---|---|
| Customer created | n/a | You created the customer via post to /api/v2/customers | Onboard the customer, via onboarding link or embedded form. |
| Customer authenticated | customer_has_filled_credentials | Customer object has_filled_credentials field is true | Nothing yet — wait for data. |
| A bill was discovered | new_bill (parsed) / new_unparsed_bill | Bills are immediately retrievable via api/v2/customers/[customer_id]/bills | Optionally ingest each bill as it arrives. Depending on your unlocking configuration, you may need to unlock bills before using them. |
| Initial bill discovery finished | bills_ready | Customer object'sbills_are_ready field is true | Ingest the bills directly in the bills_ready payload, or GET /customers/{id}/bills. Depending on your unlocking configuration, you may need to unlock bills before using them. |
| Initial interval discovery finished | intervals_ready | Customer object'sintervals_are_ready field is true | GET /customers/{id}/intervals if you utilitize intervals. |
| A bill changed | updated_bill | n/a | Re-process that bill as needed. |
| New interval data | n/a | New intervals will be available at /customers/{id}/intervals | Poll GET /customers/{id}/intervals (at most daily) if you need updated interval data. |
| Connection broke | customer_must_reauthenticate | Customer object'sis_currently_authenticated field is false | Regenerate the onboarding link/token and re-prompt the customer. See re-authentication. |
Updated about 3 hours ago
