Category Mapping from Webservices to bullhorn Issue

Forum for users and developers of Bullhorn's Webservices API suite

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
techteam321
User
Posts: 4
Joined: Sat Jun 23, 2012 7:37 am

Category Mapping from Webservices to bullhorn Issue

Post by techteam321 » Sat Jun 23, 2012 7:54 am

Hi support team / Members,

We are holding bullhorn account for processing candidates and we are using php api method for Posting our Candidate registrations to bullhorn. As our website designed, the candidate can select more than one categories / sectors which they preferred and able to register with our website. But, we got failure when pushing the candidate records while they selected more than one categories / sectors as we are not sure about the acceptable format for bullhorn. We got success when registering the candidate profile with one category / sector values selected.

we have tried to send the multiple selection values in the format of array , commas separated. But both the methods are resulted in fail.

our array creation structure:
$'category_id_array=array('610100','610102','610103');

also we tried with comma separated as $'category_id_array='610100','610102','610103';

'categoryID' => $category_id_array,

Can anyone help me to how to send values to bullhorn with multiple selection values?

Please advise.

Thanks in advance.

Best Regards.
Veeramani

MGIORDANO1
User
Posts: 13
Joined: Thu Apr 19, 2012 8:47 am

Re: Category Mapping from Webservices to bullhorn Issue

Post by MGIORDANO1 » Mon Jun 25, 2012 9:39 am

Hello

For the initial creation of a candidate only one categoryID and one sector can be passed through. Once the candidate is created then multiple categories and sectors can be added using an associate or associateMultiple command.

Thank you

techteam321
User
Posts: 4
Joined: Sat Jun 23, 2012 7:37 am

Re: Category Mapping from Webservices to bullhorn Issue

Post by techteam321 » Tue Jun 26, 2012 12:55 am

Hi,

Thanks for your reply, below is our code.How can we send a multiple category id to bullhorn registration.

Please check the below code.Could send us any sample code.

$params = array(
'trace' => 1,
'soap_version' => SOAP_1_1);
$BHClient = new SoapClient("https://api.bullhornstaffing.com/webser ... l",$params);

$username = ***********; //username
$password = ***********; //password
$apiKey =****************; //apikey

$session_request = new stdClass();
$session_request->username = $username;
$session_request->password = $password;
$session_request->apiKey = $apiKey;
$API_session = $BHClient->startSession($session_request);
$API_currentSession = $API_session->return;


/* To make the username unique, use the first initial and last name with a random number. You can use any mechanism for generating the random number. */


$address_array = array(
'address1' => $value['address1'],
'address2' => $value['address2'],
'city' => $value['town'],
'state' => $county_name,
'zip' => $value['post_code'],
'countryID' => $value['country']
);

$candidate_array = array(
'distinct' => false,
'firstName' => $value['firstname'],
'lastName' => $value['lastname'],
'name' => $name,
'email' => $value['username'],
'username' => $value['username'],
'address' => $address_array,
'status' => 'Available',
'userTypeID' => 35,
'mobile' => $value['home_tel'],
'phone' => $value['home_tel'],
'occupation' => $value['job_keywords'],
'ownerID' => $API_currentSession->userId,
'categoryID' => '230100', //We have sent a CategoryId static value.How do we send Multiple category id from our category mapping table
'password' => $value['password'],
'source' => "Company Website",
'comments'=> $value['comments'],
'customText14' => $eligibility,
'customText16' => $licence,
'willRelocate' => $relocate,
'employeeType' => "584",
'isDeleted' => '0',
'preferredContact' => $value['home_tel']
);

$SOAP_dto = new SoapVar($candidate_array, SOAP_ENC_OBJECT, "candidateDto", "http://candidate.entity.bullhorn.com/");
$request_array = array(
'session' => $API_currentSession->session,
'dto' => $SOAP_dto
);
$SOAP_request = new SoapVar($request_array, SOAP_ENC_OBJECT, "save", "http://save.apiservice.bullhorn.com/");
try{
$saveResponse = $BHClient->save($SOAP_request);
} catch (SoapFault $fault) {
var_dump($BHClient->__getLastRequest());
die($fault->faultstring);
}
$API_currentSession = $saveResponse->return->session;
$savedCandidate = $saveResponse->return->dto;
$bh_userId = $savedCandidate->userID;


Thanks

MGIORDANO1
User
Posts: 13
Joined: Thu Apr 19, 2012 8:47 am

Re: Category Mapping from Webservices to bullhorn Issue

Post by MGIORDANO1 » Thu Jun 28, 2012 8:48 am

Hello

We do not have sample code for this language however this is how you would call the associate multiple in SOAP:

<!--request-->
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:apis="http://apiservice.bullhorn.com/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<soapenv:Header/>
<soapenv:Body>
<apis:associateMultiple>
<session>key</session>
<entityName>Candidate</entityName>
<id xsi:type="xs:int">3</id>
<associationName>categories</associationName>
<associateIds xsi:type="xs:int">276008</associateIds>
<associateIds xsi:type="xs:int">225963</associateIds>
</apis:associateMultiple>
</soapenv:Body>
</soapenv:Envelope>

Post Reply