First, constructing your DBB Postback doesn’t require any coding. Easily, just copy and paste based on the instructions below.
The key benefit with DBB Postback is directly updating a validation database stored in our servers in real-time. Thus, you don’t have to export scan records and create a new, updated CSV file to upload to that database.
A validation database is a table of barcode values and associated data stored on CodeREADr’s servers for use with your validation Service types. After each scan, you can present the associated data as a ‘response’ to the user if the barcode value exists in that database.
Normally, if the barcode value doesn’t exist in the database, the user will get an Invalid response after scanning that value. However, with DBB Postback, you can enable users to add that value to the database along with associated data (text, photos, etc.). Then, allow them to edit data associated with values already existing in the database.
Also, we save scan records on our server. Then, from the Scans page, you can filter, share, export, or insert it into third-party databases.
DBB Postback only works when the user has Internet connectivity. Also, use it only when you need to add or edit the data associated with the scanned barcode value. If you want to add values to a validation database, use Pattern Validation, which can work online or offline.
First, create a destination database. Then, copy the Database ID.
Second, create a validation service.
Then, you can add questions. However, you must have them appear after a user submits a scan.
Third, retrieve your API key from your account details page.
To obtain your API key, you will need to have a paid account.
Next, create your Postback URL. This is where you use the database ID and API Key. First, you replace ‘DB_ID’ with the destination database ID. Then, replace ‘API_KEY’ with your API Key. Edit this URL (copy & paste into a text editor, e.g. Word, Notepad, etc. with no spaces):
Finally, on the Advanced tab, insert your Postback URL into the Postback section. Check the default options.
To format the data as structured data, check ‘Alter Response Value’. Then, copy and paste the following:
Alter Response Pattern: ^([\s\S]*?)$
This Alter Response Replacement script works for older versions of Android OS (4.1 and higher). However, you need iOS 10.0 or higher even though the app supports lower iOS versions.
There are three optional variables within that document:
The most common mistake is including a space in the URL or missing part of the text (a ‘variable’) which you need to append to the URL. Thus, check your URL in a text editor, such as Notepad if you have any trouble.
The optional variable “&require_answer=false” will give an Invalid response to the app user. However, it will add the DBB Scan Record to the DBB Destination database once submitted. The variable &require_answer=true will give the app user a Valid response since the value needs to already be in the DBB Destination database. The app users will see the existing associated data. Also, they can edit that data by entering new data if they answer the Questions.
This optional variable “&require_status=valid” will only add DBB Scan Record if the scanned value is already in the DBB Destination Database. If you use this variable, app users will not be able to add new values to a DBB Destination Database.
This optional variable “&transfer_label=YOUR_LABEL_TEXT” presents your original response text (i.e. column 2 of your validation database) for each value to the app user when that value is scanned. For example, this will show the description of the asset after a scan along with DBB Responses.
On the Scans page choose “Create a Template.”
For our example, our final patterns should be:
When you export or download your scan records be sure to select this template. Please email support@CodeREADr.com if you need assistance.