Page 1 of 1

Problem with creating ClientContact

Posted: Wed Apr 22, 2015 2:08 am
by oregonwebco
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

Re: Problem with creating ClientContact

Posted: Thu Apr 23, 2015 12:56 am
by oregonwebco
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.

Re: Problem with creating ClientContact

Posted: Sat Apr 25, 2015 2:53 am
by oregonwebco
Can anyone help me with the missing "application" propertyName?

Re: Problem with creating ClientContact

Posted: Fri May 01, 2015 11:56 am
by s.emmons
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.