Skip to Content
avatar image
Former Member

EmployeeCentral - retrieve records set with effective date through CompundEmployee API

Hello,

In our case we have integration between EmployeeCentral and 3rd party system, which replicates employees information. To do that, we use CompoundEmployee API - based on scheduler. We use below query to get the data:

SELECT personal_information, ... FROM CompoundEmployee WHERE replicationContentType = 'EMPLOYEE_MASTER_DATA' and last_modified_on >= to_datetime('2017-09-10T00:00:02Z') AND effective_end_date >= to_date('2017-09-05')

In most of the cases it works just fine. The problem starts when user in EC set some changes with some effective date in the future. The easiest way is to describe this on a example:

Lets say we have a user in EC - John Smith. CompundEmployee API will return those kind of information:

<personal_information>
<first_name>John</first_name>
<last_name>Smith</last_name>
<start_date>2017-09-10</start_date>
<end_date>9999-12-31</end_date>
<last_modified_on>2017-09-10T12:00:00.000Z</last_modified_on>

...
</personal_information>

Today (2017-09-12) we will change under this user profile last name to Jones - with effective date 2017-09-20. Compound employee will return those data:

<personal_information>

<first_name>John</first_name>
<last_name>Jones</last_name>
<start_date>2017-09-20</start_date>
<end_date>9999-12-31</end_date>
<last_modified_on>2017-09-12T12:00:00.000Z</last_modified_on>
...

</personal_information>

<personal_information>
<first_name>John</first_name>
<last_name>Smith</last_name>
<start_date>2017-09-10</start_date>
<end_date>2017-09-19</end_date>

<last_modified_on>2017-09-10T12:00:00.000Z</last_modified_on>
...

</personal_information>

In our case we have to send to 3rd party system only current information. So when integration is triggered on 12th September (as last_modified_on date is 2017-09-12T12:00:00.000Z) it will pick up that something has been changed but because it's future change (we check if current timestamp is greater-equal start_date and less than end_date) it will not get propagated.

So far it all works as expected. The problem will appear on 20th September - as modified date is still on 12th, integration won't know that something has to be send because from its perspective - nothing has been changed.

How we can solve this issue? Is there a way to refresh last_modified_date when changes with effective date become active?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers