Índice

Search

  1. Prólogo
  2. Introducción a los servicios de entidad de negocio
  3. Llamadas del servicio de entidad de negocio de EJB
  4. Llamadas del servicio de entidad de negocio de REST
  5. API REST para Data Director
  6. Llamadas del servicio de entidad de negocio de SOAP
  7. Servicios de cálculos de BVT y registros de referencias cruzadas
  8. Compatibilidad del servicio de vinculación empresarial
  9. Llamadas externas para limpiar, analizar y transformar datos
  10. Apéndice A: Uso de las API de REST para añadir registros
  11. Apéndice B: Uso de las API de REST para cargar archivos
  12. Apéndice C: Uso de las API de REST para administrar informes

Guía de servicios de entidad de negocio

Guía de servicios de entidad de negocio

Probar la lógica de fusión

Probar la lógica de fusión

Para probar la lógica de fusión que evita que los números de teléfono se fusionen, use la API MergePreview.
  1. Para crear entidades de negocio de dos personas, utilice la API Create.
    POST https://<host>:<port>/cmx/cs/<ors>/Person?systemName=Admin { firstName: "John", Addresses: { item: [ { cityName: "Toronto" } ] }, TelephoneNumbers: { item:[ { phoneNum: "111-11-11" } ] } }
    POST https://<host>:<port>/cmx/cs/<ors>/Person?systemName=Admin { firstName: "John", Addresses: { item: [ { cityName: "Ottawa" } ] }, TelephoneNumbers: { item:[ { phoneNum: "222-22-22" } ] } }
    La respuesta incluye los siguientes ID de fila de muestra:
    • Persona: 161923, 161924
    • Direcciones: 2123, 2124
    • Números de teléfono: 101723, 101724
  2. Para obtener una vista previa de las entidades de negocio de persona fusionadas, ejecute la API PreviewMerge.
    POST https://<host>:<port>/cmx/cs/<ors>/Person/161923?action=previewMerge&depth=2 { keys: [ { rowid: "161924" } ] }
    La respuesta incluye dos direcciones y dos números de teléfono.
    { "Person": { "rowidObject": "161923 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.878-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.879-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Person: , Bill", "partyType": "Person", "displayName": "Bill", "firstName": "Bill", "TelephoneNumbers": { "link": [], "firstRecord": 1, "recordCount": 2, "pageSize": 2, "item": [ { "rowidObject": "101723 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.904-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.905-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "111-1111 ", "phoneCountryCd": "1" }, { "rowidObject": "101724 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.768-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.769-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "222-2222 ", "phoneCountryCd": "1" } ] }, "Addresses": { "link": [], "firstRecord": 1, "recordCount": 2, "pageSize": 2, "item": [ { "rowidObject": "2123 ", "creator": "admin", "createDate": "2016-10-20T09:50:37.956-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:37.956-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Addresses", "Address": { "rowidObject": "2121 ", "creator": "admin", "createDate": "2016-10-20T09:50:36.922-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:37.923-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Address", "cityName": "Toronto" } }, { "rowidObject": "2124 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.790-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.790-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Addresses", "Address": { "rowidObject": "2122 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.777-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.777-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Address", "cityName": "Ottawa" } } ] } } }
  3. Ejecute la API PreviewMerge con los reemplazos de fusión.
    Las anulaciones activan la llamada externa que evita que los números de teléfono se fusionen.
    POST https://<host>:<port>/cmx/cs/<ors>/Person/161923?action=previewMerge&depth=3 { keys: [ { rowid: "161923" } ], overrides: { Person: { Addresses: { item:[ { rowidObject: "2123", MERGE: { item:[{key:{rowid: "2124"}}], $original: { item:[null] } } } ] }, TelephoneNumbers: { item:[ { rowidObject: "101723", MERGE: { item:[{key:{rowid: "101724"}}], $original: { item:[null] } } } ] } } } }
    En la respuesta se muestra una sola dirección y dos números de teléfono:
    { "Person": { "rowidObject": "161923 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.878-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.879-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Person: , Bill", "partyType": "Person", "displayName": "Bill", "firstName": "Bill", "TelephoneNumbers": { "link": [], "firstRecord": 1, "recordCount": 2, "pageSize": 2, "item": [ { "rowidObject": "101723 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.904-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.905-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "111-1111 ", "phoneCountryCd": "1" }, { "rowidObject": "101724 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.768-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.769-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "222-2222 ", "phoneCountryCd": "1" } ] }, "Addresses": { "link": [], "firstRecord": 1, "recordCount": 1, "pageSize": 1, "item": [ { "rowidObject": "2123 ", "creator": "admin", "createDate": "2016-10-20T09:50:37.956-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:37.956-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Addresses" } ] }, "PersonDetails": { "link": [], "recordCount": 0, "pageSize": 0, "item": [] } } }