Issue on save country in address field on clientcontact object 02543165

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

ArunrajM
User
Posts: 3
Joined: Tue Jul 04, 2017 1:25 pm

Issue on save country in address field on clientcontact object 02543165

Postby ArunrajM » Tue Jul 04, 2017 1:33 pm

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

pmularski
Bullhorn Support Staff
Posts: 880
Joined: Wed Dec 31, 1969 8:00 pm

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

Postby pmularski » Wed Jul 05, 2017 3:23 pm

Good Afternoon ArunrajM,

Would you please post the REST call you are making so that it could be reviewed? Thanks!
Patrick Mularski
Senior Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
Bullhorn Support Contact Numbers
US: 617-478-9126
UK: 44 800 032 2848
Australia: 61 28 073 5089
International: 617-478-9131

ArunrajM
User
Posts: 3
Joined: Tue Jul 04, 2017 1:25 pm

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

Postby ArunrajM » Thu Jul 06, 2017 5:48 am

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"

pmularski
Bullhorn Support Staff
Posts: 880
Joined: Wed Dec 31, 1969 8:00 pm

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

Postby pmularski » Thu Jul 06, 2017 11:12 am

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?
Patrick Mularski
Senior Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
Bullhorn Support Contact Numbers
US: 617-478-9126
UK: 44 800 032 2848
Australia: 61 28 073 5089
International: 617-478-9131

shuddleston
User
Posts: 27
Joined: Tue Feb 03, 2009 12:00 pm

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

Postby shuddleston » Fri Jul 07, 2017 11:37 am

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/rest-services/{corp-token}/entity/Lead/1039861?fields=id,dateAdded,firstName,lastName,address&BhRestToken={session-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

shuddleston
User
Posts: 27
Joined: Tue Feb 03, 2009 12:00 pm

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

Postby shuddleston » Thu Jul 13, 2017 11:02 am

Hi,

Any word on this issue?

Thanks,

Scott
--
Scott Huddleston
Talascend

pmularski
Bullhorn Support Staff
Posts: 880
Joined: Wed Dec 31, 1969 8:00 pm

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

Postby pmularski » Thu Jul 13, 2017 11:30 am

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
Patrick Mularski
Senior Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
Bullhorn Support Contact Numbers
US: 617-478-9126
UK: 44 800 032 2848
Australia: 61 28 073 5089
International: 617-478-9131

pmularski
Bullhorn Support Staff
Posts: 880
Joined: Wed Dec 31, 1969 8:00 pm

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

Postby pmularski » Thu Jul 13, 2017 11:56 am

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.
Patrick Mularski
Senior Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
Bullhorn Support Contact Numbers
US: 617-478-9126
UK: 44 800 032 2848
Australia: 61 28 073 5089
International: 617-478-9131

shuddleston
User
Posts: 27
Joined: Tue Feb 03, 2009 12:00 pm

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

Postby shuddleston » Tue Sep 05, 2017 10:40 am

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.


Return to “REST API”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest