- To Access this reference field, navigate to Admin => References
- On the References page, select the reference type you would like to display this field on eg: quote/customer/Job etc.
- Select an available Reference field
- Click on the magnifier glass icon, to open the Reference field modal window
- Change the type to “Text with Validation”
- Specify the default name which should be shown as the label of the textbox on the page.
- Set it to “Active”
- Configure the Validation URL.
- The format of this URL requires the placeholder {value}. eg: https://www.abc.com/{value}. This {value} will be replaced with the text entered in the reference textbox.
- Configure the authorization to the validation endpoint
- Specify the “Authorization Header Name” – Currently, we support Basic mode
- Specify the “Authorization Header Value” – Base64 encoded version of the username and password
- Specify any other “Custom Headers” required – Any additional headers to be provided
- Click “Save”
Internal Note:
Once the customer provides the Authorization username and password, we need to encode the credentials using Base64 encoding.
There are number of free sites which can generate an encoded version of credentials.
You need to paste the encoded version of the username and password into the “Header Value”.
How does this actually work?
A new webservice called “ExternalValidation.asmx” was developed to call a 3rd party validation service from PrintIQ.
As shown in the above workflow diagram, after the user enters the text in the validation field, the text is sent to the ExternalValidation.asmx web service in printIQ.
This service then builds web request by replacing the {value} with the text entered along with the authorization header name, value and custom headers (if any).
Once it has built the web request, it sends it to the external validation service.
Once the validation is complete, then the webservice would get the response from the external validation service which then
has a set of rules which it runs through to return the response back to the webpage which were the user has entered the text.
The response contains either the text is valid or not.