Problem with creating ClientContact

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
oregonwebco
User
Posts: 6
Joined: Fri Mar 20, 2015 7:08 pm

Problem with creating ClientContact

Post by oregonwebco » Wed Apr 22, 2015 2:08 am

Hi,

I'm trying to create/update ClientCorporation along with ClientContact using PHP. Most of the time, I'm able to create both of them without any problem, but sometimes, ClientCorporation goes through, but ClientContact does not. This causes the Client not displaying in Bullhorn. What am I missing? What are the required fields? Any help would be appreciated.

Code: Select all

...
...
$client_response = $this->getClientResponse( $bh_entity, $entities ); //This is working

//Add contact to ClientCorporation
$bh_entity = new BullhornEntity($bh_connection, "ClientContact");
$obj = new stdClass();
$obj->firstName = "First";
$obj->lastName = "Last";
$obj->name = "First Last";
$obj->phone = "1112223333";
$obj->email = "email@mydomain.com";
$obj->status = "Active";
$obj->type = "Primary";
$obj->occupation = "Founder";
$obj->address = $address;
$obj->clientCorporation = array("id" => $client_response->changedEntityId); //id from the call above
$obj->owner = array("id" => 1051484);
$contact_response = $bh_entity->createContact($obj); //send ClientContact to Bullhorn using PHP Curl

oregonwebco
User
Posts: 6
Joined: Fri Mar 20, 2015 7:08 pm

Re: Problem with creating ClientContact

Post by oregonwebco » Thu Apr 23, 2015 12:56 am

Hi,

So I think I figured out why the ClientContact doesn't get created, but I'm not entirely sure. I think the reason is because the email of the Contact is already existed in Bullhorn. This is the error when I tried to add an existing Contact. Can anyone confirm this for me? Thanks!

Code: Select all

stdClass Object ( [errorMessage] => error persisting an entity of type: ClientContact [errors] => Array ( [0] => stdClass Object ( [detailMessage] => missing required property: application [propertyName] => application [severity] => ERROR [type] => MISSING_REQUIRED_PROPERTY ) ) [entityName] => ClientContact )
 
EDIT: I was wrong. I'm able to add the multiple contacts with the same info (name, email) to a ClientCorporation.

oregonwebco
User
Posts: 6
Joined: Fri Mar 20, 2015 7:08 pm

Re: Problem with creating ClientContact

Post by oregonwebco » Sat Apr 25, 2015 2:53 am

Can anyone help me with the missing "application" propertyName?

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: Problem with creating ClientContact

Post by s.emmons » Fri May 01, 2015 11:56 am

Hi oregonwebco,

This is an infrequent error in REST.

If you receive this specific error, we recommend putting in a catch & retry until you receive a successful response.
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

Post Reply