Searchability of Candidate Activities

Tagged:

Currently contains 16 posts

Avatar

April 03, 2018 23:52

pcr_dev@abinitio.com

Hi – As part of the initial set up of our system, (we have an in house server) there were many activities added. The text in those does not seem to be searchable by keyword. If I create a new note, then I can search the text. The only difference that I see is that new entries are of type “NOTES” while the old data is “Note” I tried updating the database on the back end to change the activity type (the Act_Type field). That didn’t seem to do the trick.
Can you suggest a way to make all of our existing Notes searchable? I am very proficient with both SQL and web services.

Thanks!

Avatar

April 04, 2018 13:22

Wayne-PCRecruiter

I am not sure what you mean by part of our initial set up. I would start with a call to our technical support staff and let them know what you are trying to do as I am not sure that this is an API related issue.

Our tech support can be reached at: 440-946-5214 extension 3000

Avatar

April 04, 2018 13:37

pcr_dev@abinitio.com

I think that you are correct -I will contact them directly. Thanks for your time. By the way, I am also playing with the web api and it is very nice.

Avatar

April 04, 2018 14:10

Wayne-PCRecruiter

If you have any questions about the API usage please let me know.

Avatar

April 04, 2018 14:38

pcr_dev@abinitio.com

Ok – I do have a question. How do I add a Note to a candidate? (The same thing that I would get with the “Add Notes” button in the UI.)

Is that a POST to /candidates/{CandidateId}/activities? If so, is setting activity_type to “NOTES” sufficient?

Avatar

April 04, 2018 14:58

Wayne-PCRecruiter

Activities and Notes are actually two different things in the software. If someone is using the Add Notes button in PCR they are placing it in the notes field on a record.

As far as notes go with a record you need to retrieve all of the existing notes through the API. At that point you would likely want to place the new note at the top and put all old notes below it so the user sees the latest notes first. For example:

Where the {CandidateId} value in the url is 1111111111

Retrieving Notes for a specific record
Method: GET
Headers:
Accept: application/json
Content-Type: application/json
Authorization: BEARER {SessionId}
URL: ../rest/api/candidates/1111111111?fields=notes

Response:
{
“notes”: “old sample candidate notes”
}

Updating Notes for a specific record
Method: PUT
URL: ../rest/api/candidates/1111111111
Headers:
Accept: application/json
Content-Type: application/json
Authorization: BEARER {SessionId}
Request Body:
{
“notes”: “changed or additional notes old sample candidate notes”
}
Response: (success)
{
“CandidateId”: 1111111111
}

Avatar

April 04, 2018 15:56

pcr_dev@abinitio.com

Hi.

So I was able to add a note. Thank you. However, when I look in the GUI, I don’t see the text of that note. Instead, I see:

Candidate was updated via API. (Wed Apr-4 ’18 11:50a/APIUSER)

If I add a note though the GUI, then I see the text of my note.

The place where I am looking is in the activities area of the Candidate record.

Can you suggest how I get the text of my note to appear?

Avatar

April 04, 2018 16:18

Wayne-PCRecruiter

Activities and notes are two separate things. The Activity Record which you are seeing is logged due to that candidate being updated. To view notes in PCR8 or PCR9 you would do the following:

View Notes in PCR9
1. Load the record in question
2. Click on the Notes Navigation (if not pinned you will need to click on the navigation dropdown)
3. You should see a screen with the notes.

View Notes in PCR8
1. Load the record in question
2. Click on the Notes Navigation
3. You should see a screen with the notes.

If you would like the note added to also be an activity (or alternatively if you would just like an activity record to be written which will change how you search for it in PCR).

Example API Add activity:
Where the {CandidateId} value in the url is 1111111111

Method: POST
URL: ../rest/api/candidates/1111111111/activities
Headers:
Accept: application/json
Content-Type: application/json
Authorization: BEARER {SessionId}
Request Body:
{
“ActivityType”: “MYACTTYPE”,
“ActivityText”: “Sample Activity Text”
}
Response: (success)
{
“ActivityId”: 1232342343
}

There are other fields you can set which are optional when creating an activity. A complete object with everything set:
{
“UserName”: “MYUSERNAME
“ActivityDate”: ""2018-04-04T16:08:00",
“ActivityType”: “MYACTTYPE”,
“ActivityText”: “Sample Activity Text”,
“ActivityResult”: “MYRESULT
}

“UserName” When not set will use the current logged in user
“ActivityDate” When not set will use the current time, else it should be in ISO8601 format
“ActivityResult” is an optional field which might be used to better describe the activity. For example when making marketing calls some clients will have the following:

ActivityType: “MRKCALL

with possible results:
ActivityResult: LVM //left voicemail
or
ActivityResult: NI //not interested
etc.

Many Clients will just use specific activity types instead of results. It is very dependent on reporting and searching needs. In the case of just using activity types they would just set the Activity Type to something like the following:

MRK_LVM
MRK_NI

Does this help clear things up?

Avatar

April 04, 2018 16:49

pcr_dev@abinitio.com

This is a helpful explanation. I was able to add an activity.

The GUI seems to also add the text of the Note to the activities list when you add a note. And that is what my users expect. A key point is that when a note is added, the text is parsed and added to the search index (Keyword_Lexicon and Keyword_Records2 tables)

When an activity is added, the text is not added to the search index.

So I am trying to figure out how to add information that is both searchable and ends up in the list of activities.

Thank you for all your clear help and speedy answers!

Avatar

April 04, 2018 17:07

Wayne-PCRecruiter

There is a per user prefrence for copying Notes to Activities when added in the GUI (Auto Write Activities when adding notes).

I should have thought of this during your initial questions. The API does not make the copy due to the possible use cases of the API where that behavior may not be wanted based on how the API is accessing/modifying data.

If you would like to duplicate this behavior you would need to add the notes via the API in one request and then add the Activity with the ActivityType of “NOTES” upon success of the notes addition.

Avatar

April 04, 2018 17:31

pcr_dev@abinitio.com

Thank you! Now it all makes sense.

I’m not yet sure how we will decide to handle this but at least I understand the pieces.

Avatar

April 04, 2018 17:33

Wayne-PCRecruiter

If you have any additional questions please let me know.

Avatar

April 06, 2018 13:59

pcr_dev@abinitio.com

Good morning.
I successfully updated about 28K notes yesterday. About 200 had problems and the response is
{"Message":“An error has occurred.”}
Do you have any suggestions on troubleshooting? I am scanning the text by eye for bad characters but don’t see any. Are there any characters that are not allowed in the body? Is there anyway to increase the level of error reporting?

Avatar

April 06, 2018 14:08

Wayne-PCRecruiter

There is no way to increase the level of error reporting. That appears to be an unexpected error. If you can recreate the issue and send me the request (minus sensitive details) that would be the next step.

Avatar

April 06, 2018 14:46

pcr_dev@abinitio.com

Hi – I figured it out. There was a back slash in the data – \
Once I removed that, all was well

Avatar

April 06, 2018 14:55

Wayne-PCRecruiter

Sounds good. Please let me know if there are any additional questions or issues you are having which I can help with.

Reply to thread