Loading

Direct 2.0
Collapse

Create User Preference

ProductD&B Direct 2.0
Product Code(s)Not Applicable
Option(s)Email; HTTPCallBack; MQOutput
Monitoring AvailableNo
InterfaceSOAP
WSDLdownload
Format(s)XML
ServiceUser
OperationCreatePreference
{version}2.2
2.2 Released OnOctober 3, 2013

IMPORTANT: Version 2.2 is the latest available service for Direct 2.0 customers.

This function allows a customer to establish a profile for receiving communications from D&B Direct API services. Currently, this feature is utilized by Data Monitoring.

A User Preference captures the technical details required to deliver information through various protocols, including Email and HTTP Callback.

Update History

No modifications have been made to this data layer since the initial release.

Feature Request

IMPORTANT: Please see the new Online Services Security Enhancement Release, effective December 14, 2018.

Data Layer Entitlement

For customers in U.S. and Canadian markets, the API is provisioned for specific collections of products, reports, and/or features (collectively referred to as data layers) for production and trial usage. Entitlement is not required for testing in the sandbox environment.

  • This particular feature does not require entitlement for production and trial usage for D&B Direct 2.0 customers.

Specification

Possible values for Preference Type are Email; HTTPCallBack

The UserCredentials. UserID and UserCredentials. PasswordText parameters should be specified when reverse authentication (i.e. a D&B service contacting a customer's service, such as in an HTTPCallBack scenario) is required.

The URL value specified in PreferenceSpecification. PreferenceValueText is required to be a secure HTTP (i.e. https) link when HTTPCallBack is the preference type.

Sample Request (Email)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="http://services.dnb.com/UserServiceV2.0">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-7" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>MyUserName</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MyPassword</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <user:CreatePreferenceRequest ServiceVersionNumber="2.0">
         <user:PreferenceRequestDetail>
            <user:PreferenceSpecification>
               <user:PreferenceType>Email</user:PreferenceType>
               <user:ApplicationAreaName>Monitoring</user:ApplicationAreaName>
               <user:PreferenceName>Mike-Email</user:PreferenceName>
               <user:PreferenceDescription>Mike's email address</user:PreferenceDescription>
               <user:PreferenceValueText>mike@mycompany.com</user:PreferenceValueText>
            </user:PreferenceSpecification>
         </user:PreferenceRequestDetail>
      </user:CreatePreferenceRequest>
   </soapenv:Body>
</soapenv:Envelope>
Sample Request (HTTPcallback)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="http://services.dnb.com/UserServiceV2.0">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-7" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>MyUserName</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MyPassword</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <user:CreatePreferenceRequest ServiceVersionNumber="2.0">
         <user:PreferenceRequestDetail>
            <user:PreferenceSpecification>
               <user:PreferenceType>HTTPCallBack</user:PreferenceType>
               <user:ApplicationAreaName>Monitoring</user:ApplicationAreaName>
               <user:PreferenceName>MyCompany-HTTPCallBack</user:PreferenceName>
               <user:PreferenceDescription>MyCompany's HTTPCallBack URI</user:PreferenceDescription>
               <user:PreferenceValueText>https://www.mycompany.com/httppushuri</user:PreferenceValueText>
            </user:PreferenceSpecification>
         </user:PreferenceRequestDetail>
      </user:CreatePreferenceRequest>
   </soapenv:Body>
</soapenv:Envelope>
Name Characteristics
CreatePreferenceRequest Aggregate
CreatePreferenceRequest@ServiceVersionNumber Attribute
CreatePreferenceRequest. TransactionDetail Aggregate, Optional
CreatePreferenceRequest. TransactionDetail. ApplicationTransactionID string up to 64 chars., Optional
CreatePreferenceRequest. TransactionDetail. TransactionTimestamp DateTimestamp, Optional
CreatePreferenceRequest. TransactionDetail. SubmittingOfficeID string up to 64 chars., Optional
END: CreatePreferenceRequest. TransactionDetail /Aggregate
CreatePreferenceRequest. PreferenceRequestDetail Aggregate, Required
CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification Aggregate, Required
CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification. PreferenceType PreferenceTypeEnum, Required

Possible values: HTTPCallBack, Email, MQOutput

CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification. ApplicationAreaName ApplicationAreaEnum, Optional
CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification. PreferenceName string up to 64 chars., Optional
CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification. PreferenceDescription string up to 256 chars., Optional
CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification. PreferenceValueText string up to 1024 chars., Required

string up to 1024 chars., Required

For MQOutput Type, both MQ and AmazonSQS are supported.

Sample Template:

  • For MQ: mq://<HostName>:<PortNo>?QueueManager= <MyQueueManager>;Channel= <MyChannel>;RequestQueue=<MyRequestQueue>
  • For SQS: AmazonSQSName=<MySQSQueueName>;SecretKey=<MySecretKey>;AccessKey=<MyAccessKey>
CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification. UserCredentials Aggregate, Optional
CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification. UserCredentials. UserID string up to 64 chars., Required
CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification. UserCredentials. PasswordText string up to 64 chars., Required
END: CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification. UserCredentials /Aggregate
CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification. DefaultPreference boolean, Optional
END: CreatePreferenceRequest. PreferenceRequestDetail. PreferenceSpecification /Aggregate
END: CreatePreferenceRequest. PreferenceRequestDetail /Aggregate
END: CreatePreferenceRequest /Aggregate

Endpoint

Use the following endpoint with the downloadable WSDL to request this feature.

Endpoint (User)
https://direct.dnb.com/UserService/V{version}

Testing

This operation has no additional limits or restrictions in the D&B Direct sandbox (test) environment.

Feature Response

Specification

The following is a list of the possible data fields returned by this operation in the XML response. Samples are provided for testing successful and failed retrieval, and to demonstrate the basic layout of a response. The data returned in samples may not represent actual values that this feature will deliver.

NOTE: While this operation does not require that a PreferenceSpecification.UserCredentials aggregate be specified in the request, a Monitoring Notification Profile cannot be created if it references a UserPreference without credentials.

For testing HTTPCallBack scenarios, the URL value specified in PreferenceSpecification. PreferenceValueText may be any HTTP (i.e. secured or not secured) link.

Sample Response (Email)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soap-env:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
      <user:CreatePreferenceResponse ServiceVersionNumber="2.2" xmlns:user="http://services.dnb.com/UserServiceV2.0">
         <user:TransactionDetail>
            <user:ServiceTransactionID>Id-22269863520e3630084b742e-1</user:ServiceTransactionID>
            <user:TransactionTimestamp>2013-08-16T10:24:48.300-04:00</user:TransactionTimestamp>
         </user:TransactionDetail>
         <user:TransactionResult>
            <user:SeverityText>Information</user:SeverityText>
            <user:ResultID>CM000</user:ResultID>
            <user:ResultText>Success</user:ResultText>
         </user:TransactionResult>
      </user:CreatePreferenceResponse>
   </soap-env:Body>
</soapenv:Envelope>
Sample Response (HTTPcallback)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soap-env:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
      <user:CreatePreferenceResponse ServiceVersionNumber="2.2" xmlns:user="http://services.dnb.com/UserServiceV2.0">
         <user:TransactionDetail>
            <user:ServiceTransactionID>Id-ebb44905520e38d503fb742e-1</user:ServiceTransactionID>
            <user:TransactionTimestamp>2013-08-16T10:36:05.306-04:00</user:TransactionTimestamp>
         </user:TransactionDetail>
         <user:TransactionResult>
            <user:SeverityText>Information</user:SeverityText>
            <user:ResultID>CM000</user:ResultID>
            <user:ResultText>Success</user:ResultText>
         </user:TransactionResult>
      </user:CreatePreferenceResponse>
   </soap-env:Body>
</soapenv:Envelope>
Name Characteristics
CreatePreferenceResponse Aggregate [M]
CreatePreferenceResponse@ServiceVersionNumber Attribute [M]
CreatePreferenceResponse. TransactionDetail Aggregate, Required [M]
CreatePreferenceResponse. TransactionDetail. ApplicationTransactionID string up to 64 chars., Optional [M]
CreatePreferenceResponse. TransactionDetail. ServiceTransactionID string up to 64 chars., Required [M]
CreatePreferenceResponse. TransactionDetail. TransactionTimestamp DateTimestamp, Required [M]
END: CreatePreferenceResponse. TransactionDetail /Aggregate [M]
CreatePreferenceResponse. TransactionResult Aggregate, Required [M]
CreatePreferenceResponse. TransactionResult. SeverityText string, Required [M]
CreatePreferenceResponse. TransactionResult. ResultID string up to 32 chars., Required [M]
CreatePreferenceResponse. TransactionResult. ResultText string up to 512 chars., Optional [M]
CreatePreferenceResponse. TransactionResult. ResultMessage Aggregate, Optional (Array) [M]
CreatePreferenceResponse. TransactionResult. ResultMessage. ResultDescription string up to 512 chars., Required [M]
END: CreatePreferenceResponse. TransactionResult. ResultMessage /Aggregate [M]
END: CreatePreferenceResponse. TransactionResult /Aggregate [M]
END: CreatePreferenceResponse /Aggregate [M]

NOTE: There may be additional request and/or response elements specified in the WSDL that are not applicable for D&B Direct customers. Data elements that are not listed on this page are currently unused by this operation.

Response Codes & Error Handling

Successful service requests will return a CM000 response code in the TransactionResult ResultID field. Otherwise, one of the D&B Direct standard response codes will be returned.

This operation may return the following response codes: CM002, CM0004, CM023, and SC001-SC009.

D&B Direct 2.0 API requests are provided on a metered basis; and may require entitlement prior to use in the production environment. In addition, a concurrency limit (QPS) is monitored to ensure that it is not exceeded. An error code will be returned in the event that a transaction is throttled.

While this operation is provided on a metered basis, usage is tracked; however, no billing for successful calls is recorded.

What to do Next