# GetClaimContacts - Advanced Notes ## Response Structure Returns an array of `ClaimContactInfo` objects. AdHocFields is where insurance details, adjuster references, policy numbers, and similar custom data live. ## Reading Ad Hoc Fields Ad hoc fields vary by firm and contact type. Each field has a `FieldLabel` and one or more value properties: ```javascript (contact.AdHocFields || []).forEach(f => { // The value can be in any of these - check all const val = (f.BaboContact && f.BaboContact.Name) // contact reference (adjusters, attorneys) || f.TextShortValue // short text (policy numbers, claim numbers) || f.TextLongValue // long text || f.FieldValue // general value || f.DropdownValue // dropdown selection || f.NumberValue // numeric || f.DecimalValue // decimal || ''; if (val) result[f.FieldLabel] = val; }); ``` ## Common Insurance Company Ad Hoc Fields On "Insurance Company" contacts, you'll typically find: - **Adjuster** - `BaboContact` reference to the adjuster person - **Insured** - name of the insured party - **Policy Number** - the insurance policy number - **Claim Number** - the insurance claim number - **Type of Insurance** - coverage type (Liability, UM, MedPay, Excess, etc.) - **Limits** - policy limits - **LOR Requested** / **LOR Sent** - letter of representation dates - **Insurance Note** - additional contact info or notes ## Script Example ```javascript async () => { const contacts = await SecureApi.GetClaimContacts(771360); return contacts .filter(c => c.ContactType.Name === 'Insurance Company') .map(c => { const adhocs = {}; (c.AdHocFields || []).forEach(f => { const val = (f.BaboContact && f.BaboContact.Name) || f.TextShortValue || f.FieldValue || f.DropdownValue || ''; if (val) adhocs[f.FieldLabel] = val; }); return { carrier: c.Contact.Name, ...adhocs }; }); } ```