{"agent":"claude","input":"Chase invoices more than 30 days overdue by phone. Business: {business}, accounts number {accounts_number}, time zone {time_zone}.\n\n1. With the QuickBooks connection, query SELECT * FROM Invoice WHERE Balance > '0', paging until done. Keep invoices whose DueDate is more than 30 days before today. Group them by CustomerRef.\n2. For each customer, read the Customer record: DisplayName, PrimaryPhone and Notes. Call only customers whose Notes contain the line 'Payment calls: yes' and who have a PrimaryPhone. List every other customer as skipped with the reason.\n3. For each customer to call, start one LumisReach job with start_ai_phone_call: to_numbers [PrimaryPhone], goal 'Find out when the overdue balance of {total} on the invoices listed will be paid, and note any reason or dispute', instructions 'You are the AI assistant for {business}, calling the accounts contact at {customer}. The overdue invoices are: {invoice list with DocNumber, TxnDate, DueDate and Balance}. Be polite and brief. Ask when payment will be made. Offer to email the invoices again. Never take card or bank details, never threaten, never agree a discount or a payment plan; say someone from accounts will call back about anything else. If they ask not to be called, apologise and end the call.', opening_message 'Hello, this is the AI assistant for {business}, calling about some overdue invoices. Am I speaking with accounts at {customer}?', retry_attempts 1, max_call_duration_seconds 300, voicemail_enabled true, voicemail_message 'This is the AI assistant for {business} about overdue invoices on your account. Please call accounts at {accounts_number}.'\n4. Poll get_quick_action_status for each job until its target is no longer pending or in_progress. For answered calls, read the call record, with its transcript, using get_call on last_call_id.\n5. Write calls.csv with one row per customer: customer, invoices (DocNumbers), total overdue, oldest days overdue, outcome (promised, disputed, asked for invoices, voicemail, no answer, failed, opted out, skipped), promised_date, what_they_said (their own words, at most 40 words), next_step. Read only in QuickBooks: change, note and record nothing there. Call no number that is not a customer's PrimaryPhone.","connections":["quickbooks","lumisreach"]}