Monday, September 17, 2018

Use an External Web Site to Send Data to NetSuite's Online Case Form

This is a guide on how to use external web page to send a POST data in NetSuite's Online Case Forms.

First part is to create the form in NetSuite.

1. Navigate to Setup > Support > Online Case Forms > New.

2. Select Default Form Template for the form type.

3. In the Select Fields tab, add all required fields.

4. Click Save.

5. View the created form and click the External tab and locate the Publishable Form URL field, it looks something like this:

 https://forms.netsuite.com/app/site/crm/externalcasepage.nl?compid=TSTDRV570143&formid=5&h=7b3e74d1fe1b93d47b73


6. The URL in step 5 is needed for the form's action element in an external HTML form.


Second part is to pass the value on an HTML form to NetSuite's Online Case form.

1. Open the external form in a browser (e.g. https://forms.netsuite.com/app/site/crm/externalcasepage.nl?compid=TSTDRV570143&formid=5&h=7b3e74d1fe1b93d47b73)

2. View the source.

3. Look for the <input> elements and get the field name.

4. The field names are the parameters that needed to be supplied when sending this data from the external PHP/HTML form.

5. Here is a sample code:

 <form action='https://forms.netsuite.com/app/site/crm/externalcasepage.nl?compid=TSTDRV570143&formid=7&h=9dea413a72ccb3baf79b' method="post">

          <table>

                   <tr>

                             <td>Email:</td>

                             <td><input type="text" name="email" /></td>

                   </tr>

                   <tr>

                             <td>Title:</td>

                             <td><input type="text" name="title" /></td>

                   </tr>

                   <tr>

                             <td>First Name:</td>

                             <td><input type="text" name="firstname" /></td>

                   </tr>

                   <tr>

                             <td>Last Name:</td>

                             <td><input type="text" name="lastname" /></td>

                   </tr>

                   <tr>

                             <td>Company Name:</td>

                             <td><input type="text" name="companyname" /></td>

                   </tr>

                   <tr>

                             <td>Incoming Message:</td>

                             <td><input type="text" name="incomingmessage" /></td>

                   </tr>

                   <tr>

                             <td></td>

                             <td><input type="submit" value="submit" name="submit" /></td>

                   </tr>

</form>


6. After submitting this form, all the input values is mapped to the case record created in NetSuite.

No comments:

Post a Comment