Background Warehouse - TBW Web Services Specification
Introduction
This document provides information for constructing and sending data to TBW utilizing the HR-XML standard for exchange of information relevant to an Order Request.
TBW currently utilizes HR-XML version 2.5 specifications.
Transmission
This section details the mechanism of transferring HR-XML formatted files to and from TBW as part of the ordering process.
HTTPS POST
TBW Web Service is SOAP-based and will accept HR-XML documents via HTTPS POST to the following URL:
Production:
https://www.tbwonline.com/TBW_WebServices/IntegrationService.asmx
Requests for service should be sent as data in the HTTPS POST (i.e. data = HR-XML request).
Process of placing orders to TBW by “VerificationApiIntegration.exe” are explained as follows,
Fetch the verification records from salesforce on basis of some condition, are as follows,
TBW_Sent__c should be false, Approved_to_Send_to_TBW__c should be true, PreEmploy_Case__c should not be null, Background_Search__c should not be null,
Applicant_First_Name__c should not be null, Applicant_Last_Name__cshould not be null, PreEmploy_Case__r.Government_ID_Number__c should not be null, Owner.
Name should be 'Sent to TBW', Type__c should be one of the 'Employment Verification', 'Degree Verification', 'Reference Verification'
Required fields for placing order verification as per verification type are as follows,
A) Common Fields for all Verification Type
-
Owner (Owner ) should be “Sent to TBW” in Queue
-
Applicant First Name (Applicant_First_Name__c ) should not be blank
-
Applicant Last Name (Applicant_Last_Name__c ) should not be blank
-
Applicant State (Applicant_State__c ) should not be blank
-
Subject City (Subject_City__c ) in Background Check Case should not
be blank
-
Government ID Number (Government_ID_Number__c ) in Background Check
Case should not be blank
1) Degree Verification
-
School (School__c ) should not be blank
-
Contact City (Contact_City__c ) should not be blank
-
Major Minor (Major_Minor__c ) should not be blank
-
Contact State (Contact_State__c ) should not be blank
-
Contact Country (Contact_Country__c ) should not
be blank
-
Degree Earned (Degree_Earned__c ) should not be blank
-
School Start Date (School_Start_Date__c ) should not be blank
-
School End Date (School_End_Date__c ) should not be blank
2) Employment Verification
-
Previous Employer (Previous_Employer__c ) should not be blank
-
Employment Position ( Employment_Position__c ) should not be blank
-
tart Date (Start_Date__c ) should not be blank
-
End Date (End_Date__c ) should not be blank
-
Contact Name (Contact_Name__c ) should not be blank
-
Contact Phone (Contact_Phone__c ) should not be blank
-
Contact Country (Contact_Country__c ) should not be blank
-
Contact State (Contact_State__c ) should not be blank
-
Contact City (Contact_City__c ) should not be blank
3) Reference Verification
=> Any one from below three fields should be filled for Reference Verification
-
Contact Phone (Contact_Phone__c )
-
Contact Phone 2 (Contact_Phone_2__c )
-
Contact Email (Contact_Email__c )
=> Limitations on field length also there, different for diff fields.
Request XML is getting generated by it and going to save into sql DB in table “VerificationApiIntegrationStatusUpdates” .
After that request are placed to TBW portal, we are using the search number as billing code on TBW portal, also the responses of the placed
orders are also getting logged into sql db in the same table. After saving the response EXE is updating that verification record on salesforce.
Fields are getting updated in salesforce after successful placement of order to TBW
TBW_Sent__c as true, TBW_Sent_Date__c, TBW_Status__c as "Submitted to TBW", TBW_last_Update__c, TBW_Notes__c, TBW_orderServiceID__c.
Sample Background Request XML (BackgroundCheck)
<BackgroundCheck xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" userId="1234"
password="vendor_password" account="vendor_account"
xmlns="http://ns.hr-xml.org/2007-04-15">
<BackgroundSearchPackage>
<ReferenceId>
<IdValue name="clientOrderID">16</IdValue>
</ReferenceId>
<PersonalData>
<PersonName>
<GivenName>John</GivenName>
<MiddleName>Quincy</MiddleName>
<FamilyName>Smith</FamilyName>
</PersonName>
<PostalAddress>
<PostalCode>32708</PostalCode>
<Region>FL</Region>
<Municipality>Winter Springs</Municipality>
<DeliveryAddress>
<AddressLine>1306 Town Plaza Court</AddressLine>
</DeliveryAddress>
</PostalAddress>
<ContactMethod>
<Telephone>
<FormattedNumber>7272229197</FormattedNumber>
</Telephone>
<InternetEmailAddress>robert@tbwonline.com</InternetEmailAddress>
</ContactMethod>
<DemographicDetail>
<GovernmentId countryCode="US"
issuingAuthority="SSN">123456789</GovernmentId>
<DateOfBirth>5/21/1987 12:00:00 AM</DateOfBirth>
</DemographicDetail>
</PersonalData>
<Screenings>
<ClientReferences />
<Screening type="education">
<ReferenceId>
<IdValue name="clientOrderServiceID">11</IdValue>
</ReferenceId>
<SearchEducation>
<EducationHistory>
<SchoolOrInstitution>
<SchoolName>Educational Institution</SchoolName>
<LocationSummary>
<Municipality>Your City</Municipality>
<Region>FL</Region>
<CountryCode>USA</CountryCode>
</LocationSummary>
<Degree degreeType="Bachelor of Arts">
<DegreeMajor>
<Name>PolySci</Name>
</DegreeMajor>
</Degree>
<DatesOfAttendance>
<StartDate>
<StringDate>January 2002</StringDate>
</StartDate>
<EndDate>
<StringDate>February 2006</StringDate>
</EndDate>
</DatesOfAttendance>
</SchoolOrInstitution>
</EducationHistory>
</SearchEducation>
</Screening>
<Screening type="employment">
<ReferenceId>
<IdValue name="clientOrderServiceID">12</IdValue>
</ReferenceId>
<SearchEmployment>
<EmploymentHistory>
<EmployerOrg>
<EmployerOrgName>Employment Test</EmployerOrgName>
<PositionHistory>
<Title>Supervisor</Title>
<StartDate>
<StringDate>01/15/2009</StringDate>
</StartDate>
<EndDate>
<StringDate>03/24/2011</StringDate>
</EndDate>
<Compensation>
<EndingCompensation>8.00 / hr</EndingCompensation>
</Compensation>
<Verification>
<ContactInfo>
<PersonName>
<FormattedName>Joe Smith</FormattedName>
</PersonName>
<ContactMethod>
<Telephone>
<FormattedNumber>3598754444</FormattedNumber>
</Telephone>
<PostalAddress type="streetAddress">
<CountryCode>USA</CountryCode>
<PostalCode>10154</PostalCode>
<Region>NE</Region>
<Municipality>Omaha</Municipality>
<DeliveryAddress>
<AddressLine>2222 Test Employer Street</AddressLine>
</DeliveryAddress>
</PostalAddress>
</ContactMethod>
</ContactInfo>
<ReasonForLeaving>My child was sick</ReasonForLeaving>
</Verification>
</PositionHistory>
</EmployerOrg>
</EmploymentHistory>
</SearchEmployment>
</Screening>
</Screenings>
</BackgroundSearchPackage>
</BackgroundCheck>
HR-XML Background Request Response :
HR-XML Background Results Response Processing by the web service “TBWBackgrounWarehouseWs.asmx”
Step 1: This is secured web service, so it is necessary to have the credentials in result XML for authentication.
Step 2: After authentication this result XML is getting saved to sql db in table “VerificationApiIntegrationStatusUpdates” having 'nt_request_from'
field value as “webservice”
Step 3: Getting all the values from result xml by querying on it and going to save these value to salesforce verified fields. Values will be saved
only in particular verification type for which the result is received. Question and answers are also getting saved to salesforce verification.
Step 4: For a single verification, web service getting hit many times by diff. result conversation XMLs having action code according
its status of conversation.
Last XML and second last XML plays important role to have responsibility to complete that search. Second last XML have action code “40” and
action type “complete”, “27” for “Cancel” and also others as the current status at that time. On the basis of that action we are updating the fields in salesforce.
In case of action code “40” we are updating all the fields of salesforce accordingly.
Last XML have the action code 38 which is responsible to close the search. In this case integration updates the value of the field “TBW Complete” as “true”
which gone complete the search.
In case of action codes other than 40 and 38, integration updates only limited fields in salesforce.
The process “Automatic Close from TBW ” triggers when final results are returned from TBW, so far it looks like they do two “final” updates where they say report
complete, one has an action code of 40 which means it's complete, but in their internal review (so we don’t get data) then the final review XML with the data
has code 38. The process of closing the search is not trigger on code 40 to avoid the search being closed out and preventing the update 38 from happening.
Note : If any update comes after search is closed, in that case script doesn't update Salesforce and send out an email to it group.
Sample Background Results Response (BackgroundReports) {Completed}
<?xml version="1.0" encoding="utf-8"?>
<BackgroundReports xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
userId="client_provided_userid" password="client_provided_password"
account="client_provided_account"
xmlns="http://ns.hr-xml.org/2007-04-15">
<BackgroundReportPackage>
<ProviderReferenceId>
<IdValue name="orderID">2082</IdValue>
</ProviderReferenceId>
<ClientReferenceId>
<IdValue name="orderID">1234</IdValue>
</ClientReferenceId>
<ScreeningStatus>
<OrderStatus>Complete</OrderStatus>
</ScreeningStatus>
<Screenings>
<Screening>
<ProviderReferenceId>
<IdValue name="orderServiceID">3256</IdValue>
</ProviderReferenceId>
<ClientReferenceId>
<IdValue name="orderServiceID">56788</IdValue>
</ClientReferenceId>
<ScreeningStatus>
<OrderStatus>Report Complete</OrderStatus>
<AdditionalItems type="actionID" qualifier="846091">
<AdditionalItems type="actionDateTime">
<Text>10/29/2012 1:31:00 PM</Text>
</AdditionalItems>
<AdditionalItems type="actionType">
<Text>Review Completed</Text>
</AdditionalItems>
<AdditionalItems type="actionDescription">
<Text>Review Completed.</Text>
</AdditionalItems>
</AdditionalItems>
</ScreeningStatus>
<ResultDetails>
<AdditionalItems type="QuestionAnswerResponse">
<AdditionalItems type="questionText">
<Text>Please provide start and end date(s) of
employment:</Text>
</AdditionalItems>
<AdditionalItems type="responseText">
<Text>02/02/2004 - 12/12/2008</Text>
</AdditionalItems>
<AdditionalItems type="userInput">
<Text>From 02/2004 to 12/2008</Text>
</AdditionalItems>
<AdditionalItems type="isAlert">
<Text>False</Text>
</AdditionalItems>
<AdditionalItems type="displayOrder">
<Text>1</Text>
</AdditionalItems>
</AdditionalItems>
<AdditionalItems type="QuestionAnswerResponse">
<AdditionalItems type="questionText">
<Text>Please provide the Applicant's position:</Text>
</AdditionalItems>
<AdditionalItems type="responseText">
<Text>Confirmed</Text>
</AdditionalItems>
<AdditionalItems type="userInput">
<Text>Medical Assistant</Text>
</AdditionalItems>
<AdditionalItems type="isAlert">
<Text>False</Text>
</AdditionalItems>
<AdditionalItems type="displayOrder">
<Text>2</Text>
</AdditionalItems>
</AdditionalItems>
<AdditionalItems type="QuestionAnswerResponse">
<AdditionalItems type="questionText">
<Text>Please provide the Applicant's salary:</Text>
</AdditionalItems>
<AdditionalItems type="responseText">
<Text>Unable to provide per company policy.</Text>
</AdditionalItems>
<AdditionalItems type="userInput">
<Text />
</AdditionalItems>
<AdditionalItems type="isAlert">
<Text>False</Text>
</AdditionalItems>
<AdditionalItems type="displayOrder">
<Text>3</Text>
</AdditionalItems>
</AdditionalItems>
<AdditionalItems type="QuestionAnswerResponse">
<AdditionalItems type="questionText">
<Text>What was the Applicant's reason for leaving?</Text>
</AdditionalItems>
<AdditionalItems type="responseText">
<Text>Unable to provide per company policy.</Text>
</AdditionalItems>
<AdditionalItems type="userInput">
<Text />
</AdditionalItems>
<AdditionalItems type="isAlert">
<Text>False</Text>
</AdditionalItems>
<AdditionalItems type="displayOrder">
<Text>4</Text>
</AdditionalItems>
</AdditionalItems>
<AdditionalItems type="QuestionAnswerResponse">
<AdditionalItems type="questionText">
<Text>Was the Applicant ever a previous employee of your
company?</Text>
</AdditionalItems>
<AdditionalItems type="responseText">
<Text>Unable to provide per company policy.</Text>
</AdditionalItems>
<AdditionalItems type="userInput">
<Text />
</AdditionalItems>
<AdditionalItems type="isAlert">
<Text>False</Text>
</AdditionalItems>
<AdditionalItems type="displayOrder">
<Text>5</Text>
</AdditionalItems>
</AdditionalItems>
<AdditionalItems type="QuestionAnswerResponse">
<AdditionalItems type="questionText">
<Text>Is the Applicant rehirable?</Text>
</AdditionalItems>
<AdditionalItems type="responseText">
<Text>Unable to provide per company policy.</Text>
</AdditionalItems>
<AdditionalItems type="userInput">
<Text />
</AdditionalItems>
<AdditionalItems type="isAlert">
<Text>False</Text>
</AdditionalItems>
<AdditionalItems type="displayOrder">
<Text>6</Text>
</AdditionalItems>
</AdditionalItems>
<AdditionalItems type="QuestionAnswerResponse">
<AdditionalItems type="questionText">
<Text>Any additional comments?</Text>
</AdditionalItems>
<AdditionalItems type="responseText">
<Text>No additional comments. </Text>
</AdditionalItems>
<AdditionalItems type="userInput">
<Text />
</AdditionalItems>
<AdditionalItems type="isAlert">
<Text>False</Text>
</AdditionalItems>
<AdditionalItems type="displayOrder">
<Text>7</Text>
</AdditionalItems>
</AdditionalItems>
<AdditionalItems type="QuestionAnswerResponse">
<AdditionalItems type="questionText">
<Text>Verified by:</Text>
</AdditionalItems>
<AdditionalItems type="responseText">
<Text>Mandy Smith</Text>
</AdditionalItems>
<AdditionalItems type="userInput">
<Text />
</AdditionalItems>
<AdditionalItems type="isAlert">
<Text>False</Text>
</AdditionalItems>
<AdditionalItems type="displayOrder">
<Text>8</Text>
</AdditionalItems>
</AdditionalItems>
<AdditionalItems type="QuestionAnswerResponse">
<AdditionalItems type="questionText">
<Text>Title:</Text>
</AdditionalItems>
<AdditionalItems type="responseText">
<Text>Human Resources Assistant</Text>
</AdditionalItems>
<AdditionalItems type="userInput">
<Text />
</AdditionalItems>
<AdditionalItems type="isAlert">
<Text>False</Text>
</AdditionalItems>
<AdditionalItems type="displayOrder">
<Text>9</Text>
</AdditionalItems>
</AdditionalItems>
</ResultDetails>
</Screening>
</Screenings>
</BackgroundReportPackage>
</BackgroundReports>
TBW-PreEmploy Integration Field Mapping of fields from Request XML to Fields in salesforce
http://preemploy.arcsdev.com/document/tbw-preemploy_integrationfield_map.xls