Formatting requirements for Feedback data
Who is this article for?Users who need help formatting data for importing new Feedback data.
Feedback_Create,Create_Contactpermissions are required.
To create Feedback entries via the web service integration, your data must meet specific formatting requirements. This guide will outline the structure and syntax you need to bear in mind when importing data.
In this article:
1. POST Structure
For an import to succeed, please make sure your data follows our XML schema, and that the web service integration POSTs the data to the following endpoint: https://www.pentanarpm.uk/CovalentWebServices/SendData.
Your POST should also include the following parameters:
|
Key |
Contents |
Notes |
|---|---|---|
|
<user> |
Login details of the Integration User. |
Must be an active User with appropriate Permissions. |
|
<pass> |
Password of the Integration User. |
Must be a valid password for the active User. |
|
<id>/<cust> |
Customer ID/Customer Name |
Customer ID is the unique identifier assigned to your site. You can reach out to the Support Team if you are not sure what your ID is. Customer names the first portion of your site URL, before .pentanarpm.uk. |
|
<data> |
XML Data |
|
|
<service> |
(text) |
Feedback integrations: ‘FEEDB’. |
2. Feedback XML syntax
Feedback imports must be structured as follows:
….
<data>
<contact>
/* Contact information goes here */
</contact>
<detail>
/* Feedback item detail goes here */
</detail>
<udfs>
/* Customer Field information goes here */
</udfs>
<owners>
/* Ownership information goes here */
</owners>
</data>
Contact Details
These are the details for the Contact associated with the Feedback item and can be recorded against any Feedback type using Contacts.
|
Key |
Contents/Data Type |
Notes |
|---|---|---|
|
<title> |
(text) |
Contact title. |
|
<fullName> |
(text) |
Contact full name (compulsory). |
|
<forename> |
(text) |
Contact first name. |
|
<initial> |
(text) |
Contact initial. |
|
<surname> |
(text) |
Contact last name. |
|
<address1> |
(text) |
First line of address. |
|
<address2> |
(text) |
Second line of address. |
|
<city> |
(text) |
City of address. |
|
<county> |
(text) |
County of address. |
|
<country> |
(text) |
Country of address. |
|
<postcode> |
(text) |
Postcode of address. |
|
<telephone> |
(number) |
Contact phone number. |
|
<email> |
(text) |
Contact email address. |
|
<ctypeKey> |
Web service key for the appropriate contact type. |
Can be accessed in Browser. |
|
<gender> |
(number) |
Accepted values: 1 (Not Specified), 2 (Male), 3 (Female), 4 (Transgender). |
|
<ethnicityKey> |
Web service key for the appropriate ethnicity. |
Can be accessed in Browser. |
|
<agegroupKey> |
Web service key for the appropriate age group. |
Can be accessed in Browser. |
|
<religionKey> |
Web service key for the appropriate religion. |
Can be accessed in Browser. |
|
<disabilityKey> |
Web service key for the appropriate disability. |
Can be accessed in Browser. |
|
<sexualityKey> |
Web service key for the appropriate sexuality. |
Can be accessed in Browser. |
Complete example of Contact Details may look like this:
<contact>
<title>Mr</title>
<fullName>Mr John R Smith</fullName>
<forename>John</forename>
<initial>R</initial>
<surname>Smith</surname>
<address1>The Cottage</address1>
<address2>Something Street</address2>
<city>Anytown</city>
<county>Anycounty</county>
<country>UK</country>
<postcode>AA1 1AA</postcode>
<telephone>01234 567890</telephone>
<email>john.smith@anydomain.co.uk</email>
<ctypeKey>266</ctypeKey>
<gender>1</gender>
<ethnicityKey>1</ethnicityKey>
<agegroupKey>29</agegroupKey>
<religionKey>19</religionKey>
<disabilityKey>92</disabilityKey>
<sexualityKey>13</sexualityKey>
<maritalStatus>1</maritalStatus>
</contact>
Feedback Item Details
This contains the main detail for each Feedback item, including dates.
|
Key |
Contents/Data Type |
Notes |
|---|---|---|
|
<id>/<discriminator> |
(text) |
Unique reference. |
|
<title> |
(text) |
Name of the Feedback record (compulsory). |
|
<description> |
(text) |
Further details for the record. |
|
<duedate> |
Date (YYYY-MM-DD) |
Date by which the first stage should be completed (compulsory). |
|
<openeddate> |
Date (YYYY-MM-DD) |
Date the record was opened. |
|
<openedtime> |
Time (HH:MM:SS) |
Time the record was opened (if enabled). |
|
<closeddate> |
Date (YYYY-MM-DD) |
Date the record was closed. |
|
<closedtime> |
Time (HH:MM:SS) |
Time the record was closed (if enabled). |
|
<feedbackTypeKey> |
Web service key for the appropriate type. |
Can be accessed in Browser (compulsory). |
|
<sourcetypeKey> |
Web service key for the appropriate type. |
This can be accessed in the ‘Webservice Keys’ section in the ‘Site Admin’ browser menu. |
|
<typefields> |
<typefield key = “field key”> </typefield> (where “field key” is the web service key of the customer field) |
Used for Customer Fields specific to a certain Feedback Type. |
Complete example of Feedback Item details may look like this:
<detail>
<id>WEB001</id>
<title> Supplier has found error with printed materials</title>
<description> The phone number supplied to suppliers is incorrect on printed materials.</description>
<duedate>2013-04-25</duedate>
<openeddate>2013-04-11</openeddate>
<openedtime>11:09:00</openedtime>
<closeddate>2013-04-18</closeddate>
<closedtime>23:15:30</closedtime>
<feedbackTypeKey>C</feedbackTypeKey>
<sourcetypeKey>18</sourcetypeKey>
<typefields>
<typefield key="dtypeKey">Resources</typefield>
</typefields>
</detail>
Non-Specific Customer Fields
For Customer Fields that aren’t specific to a particular Feedback Type, data must be imported in a separate section of the import.
|
Key |
Contents/Data Type |
Notes |
|---|---|---|
|
<udf key=”field key”> |
Field data/drop-down item web service key. |
Datatype here is dependent on the field type. |
Ownerships
The final section of the import determines which application Users will have ownership of the item once it’s created.
|
Key |
Contents/Data Type |
Notes |
|---|---|---|
|
<owner> |
<type = “” entity= “”> |
|
|
<type= “”> |
(text) |
|
|
<entity = “”> (User/Role) </entity> |
(text) |
If referencing a User, use the login username visible at the top of their User record. |
Complete example of the Ownerships section may look like this:
<owners>
<owner type="R" entity="role">HoS</owner>
<owner type="A" entity="user">Lily.Atkinson</owner>
</owners>
3. XML sample
Once all the sections have been created, a full import may look something like this:
<?xml version="1.0" encoding="utf-8"?>
<feedback xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=" https://www.pentanarpm.uk/schema/feedback-2.3.xsd">
<data>
<contact>
<title>Mr</title>
<fullName>Mr John R Smith</fullName>
<forename>John</forename>
<initial>R</initial>
<surname>Smith</surname>
<address1>The Cottage</address1>
<address2>Something Street</address2>
<city>Anytown</city>
<county>Anycounty</county>
<country>UK</country>
<postcode>AA1 1AA</postcode>
<telephone>01234 567890</telephone>
<email>john.smith@anydomain.co.uk</email> <ctypeKey>266</ctypeKey>
<gender>1</gender>
<ethnicityKey>1</ethnicityKey>
<agegroupKey>29</agegroupKey>
<religionKey>19</religionKey>
<disabilityKey>92</disabilityKey>
<sexualityKey>13</sexualityKey>
<maritalStatus>1</maritalStatus>
</contact>
<detail>
<id>WEB001</id>
<title> Supplier has found error with printed materials</title>
<description> The phone number supplied to suppliers is incorrect on printed materials.</description>
<duedate>2013-04-25</duedate>
<openeddate>2013-04-11</openeddate>
<openedtime>11:09:00</openedtime>
<closeddate>2013-04-18</closeddate>
<closedtime>23:15:30</closedtime>
<feedbackTypeKey>C</feedbackTypeKey>
<sourcetypeKey>18</sourcetypeKey>
<typefields>
<typefield key="dtypeKey">Resources</typefield>
</typefields>
</detail>
<udfs>
<udf key="RACTION">Please arrange for documentation to be corrected.</udf>
</udfs>
<owners>
<owner type="R" entity="role">HoS</owner>
<owner type="A" entity="user">Lily.Atkinson</owner>
</owners>
</data>
</feedback>