Support Center

POST answer data collected in your app to DNA Behavior [Sample Code]

Last Updated: Dec 07, 2017 03:05PM EST

Natural Behavior is a 10-minute discovery process, the end results explain the participant’s complete personality. For a firm to identify a participant’s personality, the participant must first complete a 10-minute, 46-question assessment. DNA Behavior has developed the algorithms to analyze the participant’s responses to the questions. There are 3 ways that the assessment can be completed, they are listed below in order of development coding effort from your perspective.  Regardless of which option is chosen by you to use, the algorithms that determine the client’s personality style from his or her answer responses is done so by DNA Behavior’s servers.
  1. (No coding) Using DNA Behavior’s existing platform for participants to complete the assessment.
  2. (Minimal Coding) Open our questionnaire within your web screens- Adding a JavaScript enabled button embedded into your screen. The questionnaire (which opens from our platform) opens either as an in-browser pop-up or new browser tab. Details covered here.
  3. (1 Day Coding and testing) Build a questionnaire on your platform: Integrate the questionnaire into your platform for the clients to complete the process. You store the answers in your database, send them to us via API and then we score the profile and send you back the results. Details for this integration for Natural Behavior are included in this article.

Project Pre-requisites: To integrate this solution, you will need the following pre-requisites:
  • Agreed and executed Statement of Work between your firm and DNA Behavior
  • Active subscription account for to process questionnaire data and receive results
  • Active API Key

Answer POST API Pre-requisites:
  • Your firm has developed the questionnaire on your end for the clients to complete. To get a feel for the scope of this development, see the set of questions attached here for Financial DNA or here for Business DNA.
  • Participant has completed 46-question Natural Behavior questionnaire from within your platform.
  • Participant has been assigned unique ApiPersonID (details for this parameter are addressed below)

Answer POST API Input parameters:
  • Participant ApiPersonID (details for this parameter are addressed below)
  • First and Last name assigned to user (can be anonymized by your firm)
  • Username assigned to user (can be anonymized by your firm)
  • Most and Least like sections to 46 Natural Behavior questions

Sample Code:
var json = {
                "ApiPersonID": "111111111",
                "FirstName": "FirstName",
                "LastName": "LastName",
                "UserName": "",
                "DiscoveryType": "Natural Behavior",
                "OrgID": "12341234-1234-1234-1234-123456123456",
                "DNAUserName": "",
                …repeated until Q46…

Understanding the POST payload:
Answer data in the POST is being shortened to limit the string size. For each question triad, the participant selects 1 most like, 1 least like and leaves one option blank. In the POST payload, only the most and least like selections will be sent and the option that is left blank will be concluded by DNA Behavior based on the item not listed.
The data will be expanded into DNA Behavior database for scoring and storage. Please see the tables to translate the data across the two platforms and end user interface:

Answers selected on screen by client in UI (for question 1):
Format of POST to DNA Behavior (for above question):
var json = {
Data as stored in the DNA Behavior platform for scoring and export (used to verify the answer data is correct):
Question No Question
Word No Words/Phrases Most Nothing Least Total
        5 3 1  
1 95 1 Provides support
Assists others, provides others with hope, courage, or confidence
 5     5
  96 2 Consistent approach
Steady, uniform, reliable
   3   3
  97 3 Aspiring
Ambitious, driven, achieving, sets high goals
     1 1

Response to the Answer POST API:
If successful: 200 result code sent by DNA Behavior indicating that the data has been received and has been stored in the DNA Behavior database.
If unsuccessful: See ​Exception Handling below.

Assigning the Client ID / Person ID:
Your firm will develop logic internally to create and store the External API ID numbers for users, these ID numbers will be selected by your firm out of a range provided by DNA Behavior. Your logic will assign each client with 1 ID. The ID’s should be assigned in ascending order. 
The specific ID’s available and the range allotted will be provided in the statement of work process with DNA Behavior. Additional ID ranges will be made available upon request on an as needed basis.

Exception Handling:
Exception Cause Severity Action or Notification Required
200 Success N/A N/A
202 Request Pending Medium Clients request is pending and will be completed later.
404 Not Found Critical Verify provided URL or Contact DNA support.
409 Invalid client ID # Low Duplicate user: POST API provided by Customer containing answer data matches a record currently in the DNA Admin System, verify provided ApiPersonID either out of range or already exist in DNA system.
400 Incomplete answer data string.
Either invalid answer string data or invalid person details.
Medium Provided answers are not in proper format, please check answers for Most and Least values.
500 Server-side error Critical Internal server error. Contact DNA support with available details.

Integrating the questions in different languages:
DNA Behavior has multiple languages within it’s platform. This article, lists the languages that are available.


Recent Discussions

seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found
There was an error contacting Get Satisfaction
View All