You can post forms from your website directly to Relenta using our Web Form API. This requires a few simple modifications to your existing form:

  1. Change the form action to post to
    http://your-account-name.relenta.com/api/httpform
  2. Change the field names to match contact fields in Relenta. If your forms contain additional fields that don’t correspond to the fields listed, include them in the body of the form contents.
  3. Add hidden fields containing:
    • department_key It is unique for each department and can be found in My Account > API tab
    • r_redirect The URL of the thank-you page
    • subject The subject as you want it to appear in Inbox
    • contact_groups Group names or IDs to which the contact should be assigned to (IDs can be found in My Account > API tab). Separate multiple groups with semicolon (;)
    • message_template Format the form contents the way you want it to appear in Relenta.

Forms posted to Relenta will appear in your Inbox as messages that you can reply to, archive, delete, forward, apply filters to, and otherwise treat them as good old email.

HTTP form API example


<form action="http://YourAccountID.relenta.com/api/httpform" method="post" enctype="multipart/form-data">
<input type="hidden" name="department_key" value="YOUR DEPARTMENT API KEY HERE" />
<input type="hidden" name="r_redirect" value="http://www.yourwebsite.com/thankyou.html" />
<input type="hidden" name="subject" value="Website contact form" />
<input type="hidden" name="contact_groups" value="12345678;9876543" />
<textarea style="display:none;" name="message_template">
Name: {first_name} {last_name}
Email: {email}
Message: {message}
Best time to call: {time_to_call}
T-shirt size: {shirt_size}
</textarea>


First name: <input type="text" name="first_name" value=""/><br/>
Last name: <input type="text" name="last_name" value=""/><br/>
Email:
<input type="text" name="email" value=""/><br/>
Phone:
<input type="text" name="phone" value=""/><br/>
Office phone:
<input type="text" name="phone(office)" value="" /><br/>
Billing address:
<textarea name="billing|address"></textarea><br/>
Message:
<textarea name="message"></textarea><br/>
Best time to call:
<input type="text" name="time_to_call" value="" /><br/>
T-shirt size:
<select name="shirt_size">
<option value="S">Small</option>
<option value="M">Medium</option>
<option value="L">Large</option>
<option value="XL">X-Large</option>
</select><br/>
<input type="submit" name="submit" value="Submit" />
</form>

Relenta contact fields:
first_name
last_name
email
company
job_title
contact_comments

Example


<input type="text" name="company" value="Relenta, Inc" />
<input type="text" name="email" value="helpdesk@domain.com, other@domain.com" />

Custom contact fields

custom_field(field_name)

If you have custom contact fields created, you can populate them with information from the submitted form using any type of input. Input name should be “custom_field(custom_field_name)” as in the following example:

<input type="text" name="custom_field(order_id)" value="2234798234" />

Important notes

  • Custom field names are case sensitive, so if your field is named “Order ID”, the input name should be “custom_field(Order_ID)” – not “custom_field(order_ID)”
  • If email submitted with the form already belongs to a contact in the department, the form submission will be assigned to it, but the contact information will not be updated as a security precaution
  • message_template may include any form field names, even if they don’t correlate to Relenta contact fields. If the field isn’t recognized (no match), its value will still be recorded in the created message