Welcome to our Customer Service Portal

nanorep Interfaces

Contact Form API

The following API allows you to specify values that will populate the contact form when it’s opened. It includes hidden values* that will be visible in the ticket details in your inbox (for representatives).

_nRepData["formValues"] = new Array();

Then add each value using the following syntax; replacing name and value with your desired information:

_nRepData["formValues"].push(["name", "value"]);

*For the values to appear in the Contact Form input boxes, the specified name must match the name of the field in the Contact-Form configuration (commonly used names are Email_Address, Message_Body). These values are called 'visible values since they are visible to the user.

If the specified name does not match an existing UI input box, the value will not be visible to the user, and will be silently added to the ticket's details. Once added, it will be visible in your inbox (we call these values 'hidden values').

Remember: you can add any and as many values as you require for processing your ticket effectively.

Example:

To illustrate how to set 2 values to a contact form (1 visible and 1 hidden), we take as an example a contact form with 2 fields: an e-mail address and a details box.

To automatically set the user's email address and add his user ID to the ticket, the following lines are added:

_nRepData["formValues"] = new Array();

_nRepData["formValues"].push(["Email_Address", "user@email.com"]);

_nRepData["formValues"].push(["userId", "1234567890"]);

Please notice that user@email.com will appear in the e-mail field in the contact form. However, the user ID value will not appear in the UI but will be available in the ticket details in your inbox.