Complaints and feedback
  1. Complaints and feedback

Feedback register integration API

A secure and reliable solution for collecting feedback and complaints through a public webpage.

You can enhance your Logiqc subscription by purchasing this feature as an add-on.  

Feature overview

  • Consumers can easily submit their feedback through your public webpage.
  • Upon submission, the feedback is automatically recorded as a 'draft' item in the Feedback register.
  • The designated user/s will receive an email notification regarding the draft item.
  • A dashboard widget provides a clear list of queries that need to be addressed, along with the amount of time that has passed since they were received.
  • Users can easily access the draft form by clicking on the item from the widget. This allows them to conveniently complete the necessary information.

Note: The API is not intended for use by staff who would otherwise require a Logiqc user licence. 

The API will allow the creation of a draft feedback item in the Logiqc Feedback register which will appear in the Draft tab in the Feedback register. 

Records in Logiqc generated via the API can be deleted in the front end while they are still in draft. So, final testing in the client’s production site can be cleaned up.  

Your code will typically populate the fields highlighted in yellow below, matching values already in the menus. The API can actually be used to populate most fields on the Feedback Details form

  

The following technical information is written for qualified engineers to use to build the integration between Logiqc and your website. 


Logiqc uses GraphQL for its API. See https://graphql.org/ for more information.

To access the GraphQL API in Logiqc, you will need to use the GraphQL endpoint. This endpoint is the URL of your Logiqc site with '/graphql' appended to it. For example, if your Logiqc URL is 'https://abc.logiqc.com.au/', the GraphQL endpoint will be 'https://abc.logiqc.com.au/graphql'.

To call the GraphQL API you will need an API key. (see below). The API key must be added as a bearer token in the Authorization HTTP header for any request.

Testing:

We can provide you with access to a test system. Click here to request details. Alternatively you can work directly to your production system. The feedback items created with this API for testing purposes appear as draft items which can be deleted from production systems while still in a draft state.  

To create an API key in Logiqc:

  1. In Admin mode, select API keys from the left nav bar (Your account will need permission to Edit API keys).
  2. Complete the Name, Expiry and IP filter fields and select Apply rate limit.  

Once this is done, you should perform an IntrospectionQuery to determine the current schema.

Example commands to create a feedback item:

windows curl:

curl "https://url.logiqc.com.au/graphql" -H "Content-Type: application/json" -H "Authorization: Bearer <API KEY>" -d "{\"query\":\"mutation feedbackMutation { feedbackExternalCreate(detail: { feedbackType: \\\"Feedback\\\", source: \\\"Supplier\\\", dateReceived: \\\"2023-07-14T01:23:45\\\", text: \\\"Another test\\\", externalName: \\\"<your name and company>\\\" }) }\"}"

curl:

curl 'https://<URL>/graphql' -H 'Content-Type: application/json' -H 'Authorization: Bearer <API KEY>' --data-binary '{"query":"mutation feedbackMutation {\n feedbackExternalCreate(detail: {\n feedbackType: \"Feedback\",\n source: \"Supplier\",\n dateReceived: \"2023-07-14T01:23:45\",\n text: \"Another test\",\n externalName: \"<your name and company>\"\n })\n}"}' 

Feedback API

feedbackExternalCreate

Create a draft feedback item from an external source.

Parameters:

detail ExternalFeedbackModelInputType!

Returns

ID The GUID of the created item.

ExternalFeedbackModelInputType

Field mapping

The ! means mandatory from the schema's point of view ie. it cannot be null.

Form field name in platform Endpoint Type Notes
  externalId ID The external ID of the item.
  externalName String  The external name of the item.
Feedback details text  String 

The feedback details/description of the item.

Char limit=2000

Related business area primaryWorkArea String  The primary business area. See the business area - primary setup item for possible values.
Related business area secondaryWorkArea String  The secondary business area, this must be a child of the specified primary business area. See the business area - secondary setup item for possible values.
Feedback type feedbackType String! The feedback type of the feedback. See the feedback type setup item for possible values.
Feedback source Source  String! The source of the feedback. See the feedback source setup item for possible values.
Feedback category feedbackCategory String  The feedback category of the feedback. See the feedback category setup item for possible values.
Feedback sub- category feedbackSubCategory String  The feedback sub-category of the feedback, this must be a child of the specified feedback category. See the feedback sub-category setup item for possible values.
Related service or program relatedServiceOrProgram String  The service or program the feedback relates to. See the Related Service or Program setup item for possible values.
Date and time received dateReceived DateTime! The date when the feedback was received.
Client ID  referenceId ID  The client ID of the party giving feedback.
Immediate action taken actionTaken String 

What action was taken.

Char limit=2000

Details of person giving feedback hasFeedbackProvider Boolean  Set to true if feedback provider has been specified (see below example)
Name providerName String  The name of the person giving feedback. Char limit=100
Address  providerAddressLine String  The address of the party giving feedback. Char limit=128
City providerCity String  The city of the party giving feedback. Char limit=120
State providerState String  The state of the party giving feedback.
Postcode providerPostCode String  The postcode of the party giving feedback.
Phone providerPhone String  The phone number of the party giving feedback.
Email providerEmail String  The email of the party giving feedback.
Additional comments notes  String  Additional comments associated with the feedback.Char limit=2000
Attached records   attachedRecords     


Setting hasFeedbackProvider to 'true'

If you are populating the 'Details of person giving feedback' section eg provider name, email etc, you will need to activate a checkbox on the form to reveal these fields. To do this, insert:

n hasFeedbackProvider: true, 

into your script

FeedbackAboutPersonInputType

aboutPersons [FeedbackAboutPersonInputType]The list of persons who this feedback is about.

Fields:

id ID The ID.

givenName String The given name.

familyName String The family name.

FeedbackImpactedPersonInputType

impactedPersons [FeedbackImpactedPersonInputType]The list of persons who this feedback has impacted.

Fields:

id ID The ID.

givenName String The given name.

familyName String The family name.

description String The description.

Examples

mutation feedbackExternalCreateMutation($detail ExternalFeedbackModelInputType!) {

    feedbackExternalCreate(detail $detail)

}
{

    "detail" {

        "feedbackType" "Positive feedback",

        "source" "Website",

        "text" "The website is great!",

        "dateReceived" "2022-01-02T012345",

        "hasFeedbackProvider" true,

        "providerName" "Jane Doe",

        "providerEmail" jane.doe@email.com,

        "providerPhone" "0412345678",

        "externalId" "ffffffff-ffff-ffff-ffff-fffffffffff1"

    }

}

You will get the following response if the API key is invalid, or the originating IP address is blocked. Note IP filtering has not yet been configured for pre-production but will be in production.

{

    "error" {

        "errors" [{

            "message" "Authorization is required to access feedbackExternalCreateMutation.",

            "locations" [{

                "line" 1,

                "column" 1

            }],

            "extensions" {

                "code" "auth-required"

            }

        }]

    }

}

You will get the following response if the rate limit has been exceeded.

{

    "error" {

        "errors" [{

            "message" "Rate limit exceeded.",

            "locations" [{

                "line" 1,

                "column" 1

            }],

            "extensions" {

                "code" "rate-limit-exceeded"

            }

        }]

    }

}

ExternalAttachedRecordInputType

Attached records

attachedRecords

[ExternalAttachedRecordInputType!]

The list of attached records

The maximum message size is 52428800 bytes, which equates to a total of around 50MB for all attached records.

Field mapping

Name

Name

String

The name of the attached record.

File

file

Upload

The file associated with the attached record.

Filename

filename

String

The optional filename associated with the record.

FileUrl

fileUrl

String

The URL associated with the record.

QualityRecordCategory

qualityRecordCategory

String

The record category of the attached record. See the records category setup item for possible values.

Example command to create a feedback item with an attached record where the file helloworld.txt is in the current path:

Windows curl:

curl 'http://logiqc.local/graphql' -H 'Authorization: Bearer [API Key]' -F 'operations={"operationName":"feedbackExternalCreateMutationTest","variables":{"detail":{"feedbackType":"Feedback", "source":"supplier","dateReceived":"2023-07-14T01:23:45","text":"Another test","externalName": "[your reference]","attachedRecords":[{"file":null,"name":"Hello World!"}]}},"query":"mutation feedbackExternalCreateMutationTest($detail: ExternalFeedbackModelInputType\u0021) { feedbackExternalCreate(detail: $detail)}"}' -F 'map={"1":["variables.detail.attachedRecords.0.file"]}' -F 1=@helloworld.txt

curl:

curl "http://logiqc.local/graphql" -H "Authorization: Bearer [API Key]" -F "operations={\"operationName\":\"feedbackExternalCreateMutationTest\",\"variables\":{\"detail\":{\"feedbackType\":\"Feedback\", \"source\":\"supplier\",\"dateReceived\":\"2023-07-14T01:23:45\",\"text\":\"Another test\",\"externalName\": \"[your reference]\",\"attachedRecords\":[{\"file\":null,\"name\":\"Hello World!\"}]}},\"query\":\"mutation feedbackExternalCreateMutationTest($detail: ExternalFeedbackModelInputType\u0021) { feedbackExternalCreate(detail: $detail)}\"}" -F "map={\"1\":[\"variables.detail.attachedRecords.0.file\"]}" -F 1=@helloworld.txt