Tracking ClientContact changes

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
ivandevpartner
User
Posts: 9
Joined: Fri Jan 25, 2019 11:10 am

Tracking ClientContact changes

Post by ivandevpartner » Fri Jan 25, 2019 11:32 am

Hello,
I would like to know if there is any entity that holds the history of changes done do ClientContacts, specifically the "status" field.
Some entities support {Entity}EditHistory and {Entity}EditHistoryFieldChange tables to track field changes, but it looks like ClientContact is not one of them.

Is there any was to get the values of the "status" field and the date that those were applied?

KevinSupport
User
Posts: 3
Joined: Tue Jan 29, 2019 2:26 pm

Re: Tracking ClientContact changes

Post by KevinSupport » Tue Jan 29, 2019 3:15 pm

Hi Ivan,

ClientContact edit history is available in the {Entity}EditHistory and {Entity}EditHistoryFieldChange tables under the User entity. User comprises all "people" entities so you would want to use the UserEditHistory entity if pulling edit history for ClientContact, Candidate, CorporateUser, or Lead records.

ivandevpartner
User
Posts: 9
Joined: Fri Jan 25, 2019 11:10 am

Re: Tracking ClientContact changes

Post by ivandevpartner » Wed Jan 30, 2019 11:30 am

Thanks for the info.
I have hit a small problem with pulling changes for ClientContacts specifically.
The following request gives me an error on my targetEntity filter:

Code: Select all

query/UserEditHistory?where=(dateAdded>=946677600000)AND(dateAdded<=1577829600000)AND(targetEntity._subtype=ClientContact)&fields=targetEntity,dateAdded,id&sort=id&count=500&start=0
The error:

Code: Select all

    "errorMessage": "Where clause 'subtype' at position 73 is not a valid field name.",
    "errorCode": 400
I am sure that there is a field called "_subtype" in the targetEntity object.
Is the request semantically wrong, or is the approach completely wrong?

KevinSupport
User
Posts: 3
Joined: Tue Jan 29, 2019 2:26 pm

Re: Tracking ClientContact changes

Post by KevinSupport » Mon Feb 11, 2019 4:13 pm

Hi Ivan,

You cannot search or filter off the subtype field. Instead I would recommend getting your desired list of Contacts first through a query against the ClientContact entity then putting those IDs into a UserEditHistory query.

/query/UserEditHistory?where=targetEntity.id IN ([comma separated list of IDs])&BhRestToken=4f868c1b-81ba-4b65-9326-404119d57bf9&fields=*

jcolton
User
Posts: 1
Joined: Mon Feb 11, 2019 9:50 am

Re: Tracking ClientContact changes

Post by jcolton » Tue Feb 12, 2019 10:23 am

Hello Ivan,

This is Joseph from the Bullhorn Support team.

As stated previously, you cannot filter off of the _subtype field. Running some tests on this, however, it appears that you can filter off of the personSubtype field which should match the _subtype. Try the following:

Code: Select all

query/UserEditHistory?where=(dateAdded>=946677600000)AND(dateAdded<=1577829600000)AND(targetEntity.personSubtype='ClientContact')&fields=targetEntity,dateAdded,id&sort=id&count=500&start=0

Post Reply