Before You Begin
Access to your API integration logs
Ability to review Lightning Step inquiry and client records
Examples of affected patient records available
Symptom / Error
You receive the following error when Lightning Step processes inquiry records:
Reference Not Found: No query results for model [App\Models\Client] [ID]
This error occurs randomly across different facilities, suggesting a systematic issue with Lightning Step's client_id assignment process.
Cause
Lightning Step is incorrectly assigning client_id values to inquiry records. In Lightning Step's data model:
Inquiry records should have
client_id = 0orNULLwhen first createdThe
client_idis populated only after the inquiry converts to a clientWhen Lightning Step incorrectly sets
client_idto the inquiry ID, it causes query failures
Solution
Step 1 — Verify Your API Payload
Confirm your Dazos API payload does not include client_id or episode_id fields. A correct payload should look like this:
json
{ "inquiry_id": "5820", "fname": "John", "lname": "Doe", "dob": "1990-01-01", "gender": "Male", "location": "Your Facility Name", "location_id": "20", "ice.callerfname": "Jane", "ice.callerlname": "Smith" }Step 2 — Review Lightning Step Response
Check the Lightning Step response to see if episode_id is being returned correctly:
json
{ "data": "{\"episode_id\":5451,\"payor_id\":4216}", "status": "success" }Step 3 — Contact Lightning Step Support
Provide Lightning Step with the raw API payload you're sending
Request clarification on how
client_idvalues are being assigned internallyAsk Lightning Step to review their inquiry-to-client conversion process
Request enhanced error feedback to help diagnose the assignment logic
Step 4 — Escalate if Needed
If initial support doesn't resolve the issue, request escalation to Tier 2 support
Reference the Lightning Step API documentation for technical context
Provide specific patient examples where errors occurred
Verification / Expected Result
Once resolved, inquiries created through the Dazos API should:
Have
client_id = 0orNULLwhen first createdLoad properly in Lightning Step without query errors
Convert to client records correctly when appropriate
Troubleshooting / Common Errors
Error: "No query results for model [App\Models\Client] [ID]"
Lightning Step is assigning the inquiry ID as the
client_idContact Lightning Step support to review their internal mapping logic
Error occurring randomly across different facilities:
Indicates a systematic issue with Lightning Step's
client_idassignment process, not a specific data problem
Escalation
Contact Dazos Support if:
Lightning Step support cannot resolve the
client_idassignment issueErrors persist after Lightning Step reviews their internal mapping logic
You need assistance providing API payload examples for Lightning Step's investigation
💡 Tip: Regularly monitor API integration logs for new error patterns and document specific patient examples when errors occur to speed up troubleshooting.
Related Resources
Contact Lightning Step Support for payload verification
Review your API integration logs for payload structure confirmation