When orders are created, scheduling contact information often arrives messy. Clients might include extra instructions, role labels, or inconsistently formatted phone numbers in a single field.
To ensure your records stay organized and integrate smoothly with other systems, this process automatically extracts the core contact name, standardizes the phone number, and safely preserves any extra instructions.
How contact names are cleaned
The system looks at the raw scheduling contact field and strips away unnecessary information to isolate the actual person's name.
Here is what gets automatically removed from the contact name field:
Email addresses and phone numbers (these are moved or ignored).
Instruction phrases (e.g., "please schedule with", "reach out to", "coordinate directly with").
Role labels (e.g., "listing agent", "seller", "tenant", "property manager").
Trailing instructions (e.g., "please text", "notify before showing").
Phone extensions (e.g., "ext 104").
Examples of name cleanup
| Raw Input | Cleaned Name | What Happened? |
|---|---|---|
Please schedule directly with the listing agent, Carmelina Hall | Carmelina Hall | Removed instruction and role label. |
John Doe (homeowner) 555-123-4567 | John Doe | Removed role in parentheses and phone number. |
Jane Smith - contact directly | Jane Smith | Removed trailing instruction. |
buyer's agent is Bob | Bob | Removed role and separator. |
Manual Review Flag
If a cleaned name still looks suspicious (e.g., contains numbers, is longer than 6 words, or includes words like "lockbox", "access", or "showing"), the system will automatically flag the entry as needsReview so your team can double-check it.
Phone number normalization
Phone numbers can be submitted in dozens of different formats. The system scans the contact field for any valid US phone number and standardizes it to the preferred format: XXX-XXX-XXXX.
- 1
Extract digits
The system finds any 10- or 11-digit sequence in the text, ignoring spaces, parentheses, and periods.
- 2
Remove country code
If the number starts with a
1(the US country code) and is exactly 11 digits long, the1is removed. - 3
Format and save
The remaining 10 digits are formatted with dashes (e.g.,
925-989-0099). If a valid 10-digit number cannot be found, the phone field is left blank.
Preserving original data
Because clients sometimes leave critical access instructions in the name or phone fields, the system ensures no data is ever lost.
If the system detects extra text (like letters or unusual formatting) in the phone field, or if it had to heavily clean the contact name, it will automatically append the original, unedited text to the Special Instructions field.
flowchart TD
A["Raw Input: 'Call tenant Jane at (555) 123-4567 for gate code'"] --> B{"Process Data"}
B --> C["Clean Name"]
B --> D["Format Phone"]
C --> E["Name: 'Jane'"]
D --> F["Phone: '555-123-4567'"]
B --> G{"Extra text detected?"}
G -- "Yes ('for gate code')" --> H["Append original text to Special Instructions"]
G -- "No" --> I["Done"]Normal formatting doesn't trigger a note.
If a client simply typed (925) 989-0099 and it was changed to 925-989-0099, this is considered normal formatting. The system will not clutter your Special Instructions with a note about it. It only preserves the original text if actual words or letters were detected alongside the phone number.