Criminal Search .Net REST Documentation

Pre-Employ to provide the following Required Data:

  • UserName

  • Password

Consumer to Provide IP Range(s) to be white-listed

Oauth URLTest: http://sidespreemploy.arcsdev.com/Token.ashx

Authentication

The following are the steps for the username-password authentication flow.

  1. The consumer uses the end-user’s username and password to request an access token (session ID.)

  2. After the request is verified, .Net page sends a response to the client.

After a consumer has an access token, they can use the access token to access Salesforce Search data on the end-user’s behalf.


Request Access Token

The consumer can use the end user's username and password to request an access token, which can be used as a session ID.
The consumer should make an out-of-band POST request to the token endpoint, with the following parameters:

  • username—End-user username.

  • password—End-user password.


The following is an example of the body of the out-of-band POST: username=testuser%40salesforce.com&password=mySFpassword

Send Response

After the request is verified, .Net page sends a response to the client. The following parameters are in the body of the response:

  • access_token—.Net session ID that can be used with the Web services API.


The following is an example of response: "access_token":"Dvedk4IZ"
We need to add this token in request header with the name of Authorization when retrieving or updating searches via given below URL.

Retrieving Searches to Process

The following is the URL to retrieve searches to process: Pre-Employ will provide consumer with VendorID to replace [VendorID] below

GetBackgroundSearchestoProcess

Test: http://sidespreemploy.arcsdev.com/BackgroundSearchesProcess.ashx?sVendorID=[VendorID]

BackgroundSearchCriminalUpdate

Test: http://sidespreemploy.arcsdev.com/BackgroundSearchCriminalUpdate.ashx

Notes: 1) All XML format are same as previous integration and given in CriminalSearchIntegration_rev_120140408.docx
We only need to change the Salesforce URL to .net web service URL as given above.

2) .Net web Service also save the request, response and error data (if any error occurred) in SQL database.
Attached .Net Example:
1.) BGSProcessDotNetRESTPrdExample
2.) BGSUpdateDotNetRESTPrdExample

Sample Response XML

SOAP Response:

<?xml version="1.0" encoding="UTF-8"?>

<BackgroundSearchestoProcess>

<records>

<row>

<NameToSearchFirst>JOHN</NameToSearchFirst>

<NameToSearchMiddle>M</NameToSearchMiddle>

<NameToSearchLast>SIMPSON</NameToSearchLast>

<DateOfBirth>5/6/1942</DateOfBirth>

<SSN>123456787</SSN>

<SubjectAddress>1234 Long St.</SubjectAddress>

<SubjectCity>Minden</SubjectCity>

<SubjectState>Nevada</SubjectState>

<SubjectZipCode>89423</SubjectZipCode>

<SearchTypeName>County Criminal</SearchTypeName>

<County>Douglas, NV</County>

<State>Nevada</State>

<TimeFrame>[Vendor Specific Value]</TimeFrame>

<NotesToResearcher>[2014-3-12 16:7] - middle initial D or M</NotesToResearcher>

<SearchID>a1D80000004vlhPEAQ</SearchID>

</row>

<row>

<NameToSearchFirst>MICHELLE</NameToSearchFirst>

<NameToSearchMiddle/>

<NameToSearchLast>BLAIR</NameToSearchLast>

<DateOfBirth>8/28/1982</DateOfBirth>

<SSN>678-90-1234</SSN>

<SubjectAddress>99 Bridge St No. 10</SubjectAddress>

<SubjectCity>Beaver</SubjectCity>

<SubjectState>Pennsylvania</SubjectState>

<SubjectZipCode>15009</SubjectZipCode>

<SearchTypeName>County Criminal</SearchTypeName>

<County>Monongalia, WV</County>

<State>West Virginia</State>

<TimeFrame>[Vendor Specific Value]</TimeFrame>

<NotesToResearcher/>

<SearchID>a1D80000004vxmWEAQ</SearchID>

</row>

<row>

</records>

<message>Success</message>

</BackgroundSearchestoProcess>



Criminal Search Results Posting

Posting results is a 2-part function and will be called 2 X’s for every search received from Pre-Employ
    1. Researcher Acceptance (To Acknowledge that the search is being processed
    2. Results Update (Search is complete and results available)

Both posts call the same Salesforce Apex Class ‘BackgroundSearchCriminalUpdate’ and will use the same URL: BackgroundSearchCriminalUpdate

Test: https://cs71.salesforce.com/services/apexrest/BackgroundSearchCriminalUpdate/[VendorID]


Researcher Acceptance

4 Nodes:

  • Status

  • SearchID

  • SearchType

  • ResearcherName



Sample XML for Researcher Acceptance

<?xml version="1.0" encoding="UTF-8"?>

<request>

<BGSCriminalUpdate>

<row>

<Status>Received</Status>

<SearchID>a1D80000004XHWmEAO</SearchID>

<SearchType>County Criminal</SearchType>

<ResearcherName>[VENDOR NAME] </ResearcherName>

</row>

<row>

<Status>Received</Status>

<SearchID>a1D80000004XHZxEAO</SearchID>

<SearchType>County Criminal</SearchType>

<ResearcherName>[VENDOR NAME] </ResearcherName>

</row>

<row>

<Status>Received</Status>

<SearchID>a1D80000004XHaHEAW</SearchID>

<SearchType>County Criminal</SearchType>

<ResearcherName>[VENDOR NAME] </ResearcherName>

</row>

<row>

<Status>Received</Status>

<SearchID>a1D80000004XHaKEAW</SearchID>

<SearchType>County Criminal</SearchType>

<ResearcherName>[VENDOR NAME] </ResearcherName>

</row>

</BGSCriminalUpdate>

</request>



Sample XML for Results Posting

Sample XML to post Results for Clear Searches (0 Criminal Records Found):

<?xml version="1.0" encoding="UTF-8"?>

<request>

<BGSCriminalUpdate>

<row>

<Status>COMPLETE</Status>

<SearchID>14v1ohmEAA</SearchID>

<SearchType>County Criminal</SearchType>

<ResearcherName>[Vendor Name]</ResearcherName>

<TransactionID>994930</TransactionID>

<CaseRecordCount>0</CaseRecordCount>

</row>

<row>

<Status>COMPLETE</Status>

<SearchID>a1D80000004voO3EAI</SearchID>

<SearchType>County Criminal</SearchType>

<ResearcherName>[Vendor Name]</ResearcherName>

<TransactionID>993684</TransactionID>

<CaseRecordCount>0</CaseRecordCount>

</row>

</BGSCriminalUpdate> </request>



Sample XML to post Results for “HIT” Searches:

<?xml version="1.0" encoding="UTF-8"?>

<request>

<BGSCriminalUpdate><row><Status>COMPLETE</Status>

<SearchID>a1D80000004vGOCEA2</SearchID>

<SearchType>County Criminal</SearchType>

<ResearcherName>[VendorName]</ResearcherName>

<TransactionID>949056</TransactionID>

<CaseRecordCount>1</CaseRecordCount><CaseDetails>

<CaseNumber>123456789</CaseNumber><LocationOfRecord>SUSSEX, DE - COMMON PLEAS COURT</LocationOfRecord><OffenseDate>2013-02-24</OffenseDate>

<DispositionDate>2013-03-07</DispositionDate>

<HighestChargeLevel>MISDEMEANOR</HighestChargeLevel>

<CriminalCharges>1. CONSPIRACY 3RD DEGREE (MISDEMEANOR) 2. CONSPIRACY 3RD DEGREE (MISDEMEANOR) 3. CONSPIRACY 3RD DEGREE (MISDEMEANOR) 4. CONSPIRACY 3RD DEGREE (MISDEMEANOR) 5. CONSPIRACY 3RD DEGREE (MISDEMEANOR) 6. HUNTING OR SHOOTING FROM VEHICLE (MISDEMEANOR) 7. HUNTING OR SHOOTING FROM VEHICLE (MISDEMEANOR) </CriminalCharges>

<OverallDisposition>1. PROBATION BEFORE JUDGMENT2. Nolle Pros.3. Nolle Pros.4. Nolle Pros.5. Nolle Pros.6. Nolle Pros.</OverallDisposition>

<CriminalSentence>1. Probation: 1 YEAR COSTS </CriminalSentence>

NO FINAL DISPOSITION LISTED

<CaseCommentsandIdentifiers>***OFFENSE COMMENTS****1. NO FINAL DISPOSITION LISTED **************Name on File: Kyle Trice Date of Birth: 05/01/1994 </CaseCommentsandIdentifiers>

</CaseDetails>

</row>

</BGSCriminalUpdate>

</request>



bgcsearchcriminalupdate to Pre-Employ Mapping

http://preemploy.arcsdev.com/document/bgcsearchcriminalupdate-preemploy_integrationfield_map.xls