通过SF OData查询删除的记录API?

Query deleted records via SF OData API?

我正在通过 OData API 将 Successfactors 员工中央数据(包括 FO、MDF、BG 元素等)复制到本地数据库以供第三方集成。

它能够通过过滤上次修改日期来跟踪更改的记录。但是,已删除的记录无法从 OData API 中捕获。因此,当相应的EC记录被删除时,我无法删除本地数据库中的记录。

有什么方法可以从 API 或其他来源获取已删除的记录?谢谢

OData API 无法处理此任务。

摘自SF OData API doc

Don't use our OData APIs when:

● Your system cannot consume either OData APIs or SOAP for an initial data load. In this case, you would go for Import/Export with a CSV. Automation via FTP would also be a possibility.

You need employee replication field level delta, snapshot, or read modified employees only, then SOAP Compound Employee API is your tool of choice. You can find more information in the guide Implementing the Employee Central Compound Employee API.

● You only need to read data, then the SOAP Compound Employee API would also be your tool of choice.

但是使用 SFAPI (SuccessFactors CompoundEmployee API) 很容易。 SFAPI 有一个特殊参数 changedSegmentsOnly 完全符合您的要求,API returns 仅更改了操作代码不等于的段在增量传输中到 NO_CHANGE。

例如,您查询更改的员工数据:

<urn:query>
 <urn:queryString>select person,
                         personal_information,
                         address_information,
                         email_information,
                         phone_information,
                         employment_information,
                         job_information,
                         compensation_information,
                         paycompensation_recurring,
                         paycompensation_non_recurring,
                         direct_deposit,
                         national_id_card,
                         payment_information
                         from CompoundEmployee
                         where person_id_external = 'cgrant'
 </urn:queryString>
 <urn:param>
     <urn:name>resultOptions</urn:name>
     <urn:value>changedSegmentsOnly</urn:value>
</urn:param>
 <urn:param>
     <urn:name>maxRows</urn:name>
     <urn:value>50</urn:value>
 </urn:param>
</urn:query>

此 API 查询将 return 您所有已更改或删除的员工。

之后,您可以按该字段过滤您的回复。

附录: 对 MDF 实体(标准和自定义)的任何更改都可以通过 OData 审计日志进行跟踪。如何启用它们:

  1. 转到 API 中心的这个设置

  1. 启用此开关。 SFAPI 也可以启用

  1. 这样所有 API 调用有效负载都将被保存,您将能够看到每次调用更改了哪个实体

先决条件:对象必须对API可见并且必须启用 MDF 版本历史记录

有关 SuccessFactors 的 API 类型的更多信息: