Create a job
create_jobSchedules a job for a customer, resolves the date and time from the message, and creates the customer record if new.
Instructions
Schedule/create a new job for a customer. Pull the date and time from anywhere in the user's message, including pasted or forwarded text (e.g. 'scheduled for Wednesday the 24th at 9am'). Resolve relative dates like 'next monday' or 'the 24th' using the DATE REFERENCE in your instructions. Only ask for a date/time when none appears anywhere in the message — never re-ask for one the user already provided. If the customer is new (doesn't exist yet), pass their contact details here — do NOT call create_customer separately. This tool handles creating the customer AND the job in one step. When user says 'create customer X and schedule a job', use ONLY this tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Date for the job. Accepts absolute or relative forms ('tomorrow', 'next monday', 'the 24th', 'feb 15th') — resolve relative dates using the DATE REFERENCE. Pull it from forwarded or pasted text too, not just direct instructions. | |
| time | Yes | Time for the job (e.g., '2pm', '9am', '14:00'). Pull it from forwarded or pasted text too, not just direct instructions. | |
| No | New customer's email (only when creating a job for a new customer) | ||
| notes | No | General job description or notes. Use this when the user describes the job in general terms without specifying billable line items (e.g., 'check on the leak in the kitchen', 'annual maintenance visit'). Do NOT use both notes and lineItems — pick one based on user intent. | |
| phone | No | New customer's phone number (only when creating a job for a new customer) | |
| source | No | How this customer heard about the business (e.g. 'Instagram', 'Referral word of mouth', 'Google Search'). It is saved on the customer, so it is only needed for a new customer with no source on file; the job cannot be created without it in that case. Never ask a returning customer for it. Must match one of the account's existing job sources — see `jobSources` from get_business_context, or call get_reference_data with types=job_sources. If the name does not match, the tool replies with the valid list so you can retry. | |
| address | No | Service address where the job will be performed. Always pass this when the user provides an address, whether the customer is new or existing. | |
| lineItems | No | Billable services/products for this job. Include one entry for EVERY billable part of the work the user described, not just the main one: a mount plus wire concealment plus a bracket is three entries. Build them from the account's price catalog and pass catalogItemId on each. Do NOT use for general job descriptions — use notes instead. | |
| serviceType | No | Type of service to be performed | |
| customerName | Yes | Name of the customer | |
| durationMinutes | No | How long the appointment should last, in minutes (e.g. 180 for 3 hours, 90 for an hour and a half). Set this only when the user says how long the job will take, including when they give an end time ('9am to noon' is 180). Omit it and the account's default job duration is used. | |
| createNewCustomer | No | Set to true ONLY after this tool has asked whether an existing customer was meant, and the user answered that they want a new customer instead. It tells the tool to stop offering the existing near-matches and create the customer under the name in customerName. Never set it on a first attempt. |