Additional D&B Direct+ Services

Dun & Bradstreet’s Direct+ API supports many different products for matching and enriching. For the standard integrations with Identity Resolution (Cleanse and Match) and Company Profile with Executives, Linkage, and Financials (CMPELF), you can configure STEP to leverage these additional Direct+ products. Achieving this will require manual configuration of D&B setup within STEP; therefore, Stibo Systems recommends you follow the steps defined in the D&B Integration Configuration and Easy Setup topic in the Data Integration documentation which provides the system with base D&B configurations to build upon.

For a list of all available D&B Direct+ products and corresponding documentation, refer to the D&B Direct+ API Products topic in the Data Integration documentation.

Note: You must have commercial licensing to obtain access to Direct+ products. Contact Stibo Systems, or your D&B Account Representative for more information.

Data Model for a New Enrichment Service

Prior to configuring STEP to support new Direct+ products, it is important to evaluate and determine which product contains the desired data to bring into STEP. Once this is determined, Stibo Systems recommends you analyze which D&B fields must be mapped and accounted for in the supporting data model within STEP. This is a manual exercise and is not supported by Easy Set-up. It is possible that there will be existing overlapping attributes in the data model for Identity Resolution and CMPELF; in such cases, existing data containers and/or attributes should be extended to support the new Direct+ product.

New Enrichment Service Configuration

The following example will illustrate how to configure STEP to integrate with Company Profile Supplier Risk Assessment (CMPSRA). This will leverage the default data mappings deployed by ‘Easy Set-up.'

Integration attributes

You must manually create the following new integration attributes for CMPSRA. These attributes must be valid for the D&B Organization entity type as indicated in the D&B component model.

  1. Integration Status

    • Attribute ID: DnBIntegrationStatusCMPSRA

    • Attribute name: Integration Status (CMPSRA)

  2. Integration Error Code

    • Attribute ID: DnBIntegrationErrorCodeCMPSRA

    • Attribute name: Integration Error Code (CMPSRA)

  3. Integration Error Description

    • Attribute ID: DnBIntegrationErrorDescriptionCMPSRA

    • Attribute name: Integration Error Description (CMPSRA)

  4. Integration JSON Data

    • Attribute ID: DnBJSONEnrichmentDataCMPSRA

    • Attribute name: D&B JSON Enrichment Data (CMPSRA)

Operation configuration

You must create a new D&B operation configuration for CMPSRA to contain mappings to the new integration attributes.

JavaScript business action enrichment

To initiate the API transaction for CMPSRA, create a new JavaScript business action to retrieve CMPSRA data and map to STEP.

  • Business Action ID: DnBEnrichRequestCMPSRA

  • Business action Name: D&B Enrich Request (CMPSRA)

Input the following binds to your new business action:

Variable Name

Binds To

Parameter

currentObject

Current Object

 

dnbIntegrationContext

D&B Integration Context

 

DnBJSONCompanyProfile

Attribute

D&B JSON Enrichment Data (DnBJSONEnrichmentDataCMPSRA)

dnbGateway

Gateway Integration Endpoint

D&B REST Gateway (DnBRESTGateway)

Copy
mDefaultEnrichingValidation(currentObject); 
if (dnbIntegrationContext.getIntegrationResult().getIntegrationException()) { 
    return

queryParams = new java.util.HashMap(); 
queryParams.put("productId", "cmpsra"); //Supplier Risk Assessment 
queryParams.put("versionId", "v1"); 
var dnbOrg = currentObject.getDnbOrganization(); 
const dunsNumberSingleValue = dnbOrg.getValue("DnBDUNSNumber"); 
var dunsNumber = dunsNumberSingleValue.getValue(); 
for (i = dunsNumber.length(); i < 9; i++) { 
    dunsNumber = "0" + dunsNumber; 

var operationConfiguration = currentObject.getManager().getHome(com.stibo.core.domain.setupentity.SetupEntityHome).getSetupEntityByID('DnBCompanyProfileOpConfigCMPSRA'); //enrichOperationConfigurationID); 
var get = dnbGateway.rest().get(); 
get.path("/v1/data/duns/" + dunsNumber); 
get.pathQuery(queryParams); 
get.header("Content-Type", "application/json"); 
dnbIntegrationContext.setOperationConfiguration(operationConfiguration); 
jsonResult = get.invoke(); 
//log.info("Making call to CMPSRA"); 
dnbOrg.setSimpleValue(DnBJSONCompanyProfileCMPSRA, jsonResult); //DnBJSONCompanyProfileCMPSRA bind to attribute: DnBJSONCompanyProfileDataCMPSRA 
//log.info("Setting JSON response attribute on D&B Org"); 
var responseObject = JSON.parse(jsonResult); 
//log.info("Parsing JSON response"); 
//null check to be applied to all JSON elements 
function getDCValue(val) { 
    if (val) { 
        return val; 
    } else
        return ""
    } 

Business action wrapper for asynchronous integration

For asynchronous integration with CMPSRA, create a new JavaScript business action wrapper to execute the enrichment business action and handle exceptions. Alternatively, you may update the existing D&B Enrich Request Async Wrapper that the Easy Set-Up provides.

  • Business Action ID: DnBEnrichRequestAsyncWrapperCMPELFCMPSRA

  • Business Action Name: D&B Enrich Request Async Wrapper (CMPELF & CMPSRA)

Input the following binds to your new business action:

Variable Name

Binds To

Parameter

currentNode

Current Object

 

dnbManager

D&B Integration Manager

 

dnbEnrichRequestCMPELF

Business Action

D&B Enrich Request (CMPELF) (DnBEnrichRequest)

dnbEnrichRequestCMPSRA

Business Action

D&B Enrich Request (CMPSRA) (DnBEnrichRequestCMPSRA)

Copy
} var resCMPELF = dnbManager.enableRetries().executeBusinessActionWithDnbIntegrationContext(dnbEnrichRequestCMPELF); 
var resCMPSRA = dnbManager.enableRetries().executeBusinessActionWithDnbIntegrationContext(dnbEnrichRequestCMPSRA); 
if(resCMPELF.anyMatchIntegrationStatus(['DNB_THROTTLING_ERROR_QUOTA','DNB_INVALID_LICENSE','DNB_INVALID_REQUEST_FORMAT','STEP_NO_DNB_LICENSE'])) { 
if (resCMPELF.getIntegrationException()) 
  throw new com.stibo.core.domain.eventprocessor.exception.EventProcessorInterruptedException(resCMPELF.getIntegrationException()); 
  else 
  throw new com.stibo.core.domain.eventprocessor.exception.EventProcessorInterruptedException('D&B CMPELF Enrichment failed'); 
} else if(resCMPSRA.anyMatchIntegrationStatus(['DNB_THROTTLING_ERROR_QUOTA','DNB_INVALID_LICENSE','DNB_INVALID_REQUEST_FORMAT','STEP_NO_DNB_LICENSE'])) { 
if (resCMPSRA.getIntegrationException()) 
  throw new com.stibo.core.domain.eventprocessor.exception.EventProcessorInterruptedException(resCMPSRA.getIntegrationException()); 
  else 
  throw new com.stibo.core.domain.eventprocessor.exception.EventProcessorInterruptedException('D&B CMPSRA Enrichment failed'); 
} else if(resCMPELF.anyMatchIntegrationStatus(['SUCCESS','DNB_SUCCESS_LIMITED_RESULT']) && resCMPSRA.anyMatchIntegrationStatus(['SUCCESS','DNB_SUCCESS_LIMITED_RESULT'])) { 
currentNode.getTaskByID('DnBCompanyProfile', 'PerformProfiling').triggerByID('Submit', ''); 
}  
else
  if (resCMPELF.getIntegrationException()) 
  currentNode.getTaskByID('DnBCompanyProfile', 'PerformProfiling').triggerByID('GoError', 'Unexpected error: ' + resCMPELF.getIntegrationException().getMessage()); 
  else if (resCMPSRA.getIntegrationException()) 
  currentNode.getTaskByID('DnBCompanyProfile', 'PerformProfiling').triggerByID('GoError', 'Unexpected error: ' + resCMPSRA.getIntegrationException().getMessage()); 
  else 
  currentNode.getTaskByID('DnBCompanyProfile', 'PerformProfiling').triggerByID('GoError', 'Unexpected error. No Integration Exception'); 

Business action wrapper for synchronous integration

For synchronous integration with CMPSRA, create a new JavaScript business action wrapper to execute the enrichment business action and handle exceptions. Alternatively, you may update the existing D&B Enrich Request Sync Wrapper that is provided by the Easy Set-Up.

  • Business Action ID: DnBEnrichRequestSyncWrapperCMPELFCMPSRA

  • Business Action Name: D&B Enrich Request Sync Wrapper (CMPELF & CMPSRA)

In order to test the synchronous business action, you must test using the business action wrapper rather than the enrichment request business action.

Input the following binds to your new business action:

Variable Name

Binds To

Parameter

currentNode

Current Object

 

dnbManager

D&B Integration Manager

 

dataIssuesReport

Data Issues Report

 

dnbEnrichRequestCMPELF

Business Action

D&B Enrich Request (CMPELF) (DnBEnrichRequest)

dnbEnrichRequestCMPSRA

Business Action

D&B Enrich Request (CMPSRA) (DnBEnrichRequestCMPSRA)

enrichIntegrationStatusAttributeCMPELF

Attribute

D&B Enrich Request (CMPELF) (DnBEnrichRequest)

enrichIntegrationStatusAttributeCMPSRA

Attribute

D&B Enrich Request (CMPSRA) (DnBEnrichRequestCMPSRA)

Copy
var dnbResultCMPELF = dnbManager.executeBusinessActionWithDnbIntegrationContext(dnbEnrichRequestCMPELF); 
if (dnbResultCMPELF.getIntegrationException()) { 
dataIssuesReport.addError(dnbResultCMPELF.getIntegrationException().getMessage(), currentObject, enrichIntegrationStatusAttributeCMPELF); 
} else
var dnbResultCMPSRA = dnbManager.executeBusinessActionWithDnbIntegrationContext(dnbEnrichRequestCMPSRA); 
if (dnbResultCMPSRA.getIntegrationException()) { 
dataIssuesReport.addError(dnbResultCMPSRA.getIntegrationException().getMessage(), currentObject, enrichIntegrationStatusAttributeCMPSRA); 


return dataIssuesReport;