Page 1 of 1

Issue on save country in address field on clientcontact object 02543165

Posted: Tue Jul 04, 2017 1:33 pm
by ArunrajM
While save clientcontact via rest api country is not save on bullhorn, when checking on bullhorn ui its have "unites states" in all times.
And i am giving proper country code ,name and Id.
But its not saved.
Can i get a quick support,
Thanks,
Arunraj M

Re: Issue on save country in address field on clientcontact object

Posted: Wed Jul 05, 2017 3:23 pm
by pmularski
Good Afternoon ArunrajM,

Would you please post the REST call you are making so that it could be reviewed? Thanks!

Re: Issue on save country in address field on clientcontact object

Posted: Thu Jul 06, 2017 5:48 am
by ArunrajM
Sure.
Url
{resturl}/entity/ClientContact?BhRestToken={resttoken}
BOdy:

{"address":{"address1":"ad1","address2":"ad2","city":"Madurai","state":"TN","zip":"626130","countryCode":"IN","countryName":"India","countryID":2262},"owner":{"id":"2"},"smsOptIn":"false","clientCorporation":{"id":9,"type":"ClientCorporation"},"firstName":"FN_address","phone3":"2354325"}

But its saving in bh as unitedstates not "india"

Re: Issue on save country in address field on clientcontact object

Posted: Thu Jul 06, 2017 11:12 am
by pmularski
Good Morning ArunrajM,

I ran some tests. My code updated the state to the full state name. This kept the country as India.

{"address":{"address1":"ad1","address2":"ad2","city":"Madurai","state":"Tamil Nadu","zip":"626130","countryCode":"IN","countryName":"India","countryID":2262},"owner":{"id":"2"},"smsOptIn":"false","clientCorporation":{"id":9,"type":"ClientCorporation"},"firstName":"Country","lastName":"Testing","phone3":"2354325"}

Would you please give this a try on your end?

Re: Issue on save country in address field on clientcontact object

Posted: Fri Jul 07, 2017 11:37 am
by shuddleston
Hi Pat,

I'm having the same issue as ArunrajM except when creating a Lead record.

When I PUT a new lead with an address whose countryID is 2200 (Barbados) it returns 200 OK and creates the Lead, but viewing the Lead in Bullhorn shows United States as the country.

Below are the request and response.

Code: Select all

-------------- REQUEST  --------------
PUT https://rest34.bullhornstaffing.com/rest-services/{corp-token}/entity/Lead?BhRestToken={session-token}
Date: Fri, 07 Jul 2017 14:56:40 AM 
Body"
{
   "dateAdded": 1499439400960,
   "firstName": "7jul17l4locFirst",
   "lastName": "7jul17l4locLast",
   "name": "7jul17l4locFirst 7jul17l4locLast",
   "companyName": "test company name",
   "email": "7jul17l4locFirst@7jul17l4locLast.com",
   "phone": "111-222-3333",
   "address": {
     "countryID": 2200
   },
   "category": {
     "id": "45"
   },
   "preferredContact": "Email",
   "isDeleted": false,
   "owner": {
     "id": 407408,
     "firstName": "No",
     "lastName": "Reply",
     "email": "no.reply@talascend.com"
   },
   "status": "New Lead",
   "type": "Unknown"
}
The Response is 200 OK and echos out the fact I set the address to 2200.

Code: Select all

-------------- RESPONSE --------------
HTTP/1.1 200 OK
Date: Fri, 07 Jul 2017 14:56:40 GMT
Body:
{
  "changedEntityType" : "Lead",
  "changedEntityId" : 1039861,
  "changeType" : "INSERT",
  "data" : {
    "dateAdded" : 1499439400960,
    "firstName" : "7jul17l4locFirst",
    "lastName" : "7jul17l4locLast",
    "name" : "7jul17l4locFirst 7jul17l4locLast",
    "companyName" : "test company name",
    "email" : "7jul17l4locFirst@7jul17l4locLast.com",
    "phone" : "111-222-3333",
    "address" : {
      "countryID" : 2200
    },
    "category" : {
      "id" : "45"
    },
    "preferredContact" : "Email",
    "isDeleted" : false,
    "owner" : {
      "id" : 407408,
      "firstName" : "No",
      "lastName" : "Reply",
      "email" : "no.reply@talascend.com"
    },
    "status" : "New Lead",
    "type" : "Unknown"
  }
}

If I GET the same resource after I've done a PUT I see that the value of the country ID is 1 (United States) and not 2200 (Barbados).

GET https://rest34.bullhornstaffing.com/res ... sion-token}

Code: Select all

{
  "data" : {
    "id" : 1039861,
    "dateAdded" : 1499439400960,
    "firstName" : "7jul17l4locFirst",
    "lastName" : "7jul17l4locLast",
    "address" : {
      "address1" : null,
      "address2" : null,
      "city" : null,
      "state" : null,
      "zip" : null,
      "countryID" : 1,
      "countryName" : "United States",
      "countryCode" : "US"
    }
  }
}
Are there other requirements to create an entity with an address whose countryID is not 1 (United States)?

Thanks,

Scott
--
Scott Huddleston
Talascend

Re: Issue on save country in address field on clientcontact object

Posted: Thu Jul 13, 2017 11:02 am
by shuddleston
Hi,

Any word on this issue?

Thanks,

Scott
--
Scott Huddleston
Talascend

Re: Issue on save country in address field on clientcontact object

Posted: Thu Jul 13, 2017 11:30 am
by pmularski
Hello Scott,

In my previous testing, I found that you need more than just the country in the address.

I would also suggest you open a ticket for this. We can then discuss your code and any further testing.

-Pat

Re: Issue on save country in address field on clientcontact object

Posted: Thu Jul 13, 2017 11:56 am
by pmularski
Hello Everyone,

If you experience this issue, you can do one of two things to bypass the existing block. The first option is to fill out the state field with a non-United States associated state, which will allow the country to be saved. The second option is to run a POST immediately after completing your PUT request. That will update the new record with the correct localization data. I would suggest the second option, as it will maintain your existing data set.

Re: Issue on save country in address field on clientcontact object 02543165

Posted: Tue Sep 05, 2017 10:40 am
by shuddleston
It appears this has been fixed with the release on 31 Aug 2017. I now see the correct country on the lead records created with the REST API where only the countryID is specified.