Choose a testing path
You select the path with the
codt-ohs-auto-scheduling order data type when you call POST /case/create.
These paths describe how the sandbox simulator behaves in the staging environment. Each case follows one path, so use separate cases to test each one.
How the default path is selected
When smart scheduling is enabled for your account,ohsAutoScheduling defaults to true for any case where your create case request doesn’t include a value. KarmaCheck enables smart scheduling when you want to test authorization packet generation and delivery.
Because of this default, every OHS or drug order that omits the value follows the authorization packet path. To simulate results instead, include codt-ohs-auto-scheduling with a value of false on the order.
Include
codt-ohs-auto-scheduling explicitly on every OHS and drug order that you create in the sandbox. This way, each test case follows the path that you intend, no matter how your account is configured.Simulate results
To simulate results, setohsAutoScheduling to false in the order data:
111-22-3333: Returns a favorable result. For example, drug screenings returnclear.333-22-1111: Returns a result that requires review (consider).
Simulate authorization packets
To simulate authorization packets, setohsAutoScheduling to true in the order data:
pending-status-clinic-auth-created and pending-status-clinic-auth-sent pending statuses. See Case data statuses for details.
Results aren’t simulated for a case that follows this path, so use the simulated results path when you want to test completed screenings.
Create a case for either path
The following request orders a package that contains OHS and drug screenings using the customer-provided PII flow. To switch between the two paths, change the value ofohsAutoScheduling.
Replace the placeholder values:
AUTHENTICATION_TOKEN: Your authentication tokenPACKAGE_ID: The ID of a package that contains OHS or drug screeningsEMAIL: The candidate’s email address. See Test each path for tips on choosing addresses.PHONE: The candidate’s phone number in the format shown, for example+15555550100GIVEN_NAME: The candidate’s first nameFAMILY_NAME: The candidate’s last name
codt-ohs-auto-schedulingselects the testing path. This example simulates results. Changefalsetotrueto simulate authorization packets.codt-ohs-scheduling-addressis the address used to find nearby clinics. It’s required for OHS and drug screenings. See Health screening scheduling address for details.codt-drug-reason-for-testis optional. See Drug reason for test.excludeServiceslists the ID of each service that you want to skip. Use it to skip services that the package would normally run automatically. The services in this example are only samples, so replace them with the IDs of the services in your own package. Excluding the services that you aren’t testing keeps the case focused on the screenings that you care about.- Find service IDs in the Services reference. The IDs also appear as
serviceIdin the response ofGET /package/id/{packageId}/services. - Not every service can be excluded. Legal authorizations and SSN Trace are required by other services in the order. For example, SSN Trace is required when you order a County, State, or Federal Criminal Search. Check the restrictions in the Create case description before you exclude anything.
- Find service IDs in the Services reference. The IDs also appear as
- Your package may require additional order data for the services that it contains. See Provide order data for all supported types.
Test each path
Create one case for each path so that you can compare the two side by side:- Create a case with
ohsAutoSchedulingset tofalse, and use SSN111-22-3333to simulate favorable results. - Create a second case with
ohsAutoSchedulingset totrueto simulate authorization packet generation and delivery. - Use a different candidate email address for each case. If an email address already belongs to a case in your group, the request returns a
409 Conflictresponse unless you includeorderOverride. See Status codes and errors for details.
Next steps
- Review Testing considerations for test SSNs and the full list of simulated services.
- See Provide order data for every order data type that you can send when you create a case.
- Learn how services progress through their statuses in Service lifecycle.