Files

25 lines
1.2 KiB
Markdown

# ISP / Bandwidth Agreement Lookup Pattern
## Goal
Find a client's Internet connectivity details (speed, ISP, circuit ID, cost) using only the ConnectWise PSA API.
## Steps
1. **Resolve the company** using a broad partial name search:
`GET /company/companies?conditions=name contains "{partial}"`
Inspect results and match by `identifier` (e.g., `ABCOInsurance`).
2. **List ISP configurations** (if any):
`GET /company/configurations?companyId={id}`
Filter by `type.name == "ISP"` or inspect `name` for ISP keywords.
3. **Fetch agreement details**:
`GET /finance/agreements?conditions=company/id={id}`
Filter by `type.name` (e.g., `ISP Bandwidth/Fiber`) to locate the bandwidth contract.
4. **Key fields to surface**:
- Agreement: `name`, `agreementStatus`, `billAmount`, `startDate`, `nextInvoiceDate`
- Config: `name`, `ipAddress`, `modelNumber`, `vendorNotes`
- Notes may contain circuit IDs, port details, or rack locations.
## Example Session (worked example; client details redacted)
- Company ID: `<companyId>`, Identifier: `<ClientIdentifier>`
- Config: `<site>-Comcast Fiber` (ISP type) with circuit notes
- Agreements: `<tier> Internet Fiber` (`$<amount>/mo`) + `municipal/university easement riders` (`$<amount>/mo)`