There might be times when your help desk integration does not expose all the necessary fields, or the data might not even live in your help desk. Luckily, we can still work around this by sending in that data to our API. Klaus will then associate this metadata with the right conversation & its messages and display them right inside Klaus.

Let's look at how we'd send in CSAT scores & comments for a specific reply in a conversation. This is what the end result will look like:

Next, we will need the API token of your Custom Integration - be sure to read our article on setting up a Custom Integration to see how to get your token.

Besides the API token, we will also need the connection ID. If you wish to send in metadata for conversations from different help desks, you will need the connection IDs of each of those connections. If you've integrated solely via a Custom Integration, then you would still need that connection's ID (but also its API token from the same connection).

To find the unique connection ID, navigate to Settings > Connections , find your connection and open up that connection's Settings modal via the cogwheel icon (⚙️).

The connection ID is listed right under the title:

Lastly, you'll need the external ID of the conversation and its message that you would like to enrich with additional data. This is the ID of the conversation inside your help desk.

With those 3 at hand, we can now send in the metadata with a POST request:

POST https://events.pub.klausapp.com/capture/integration/klaus-csat/token/<connection-id>

{
"ticket_id": "<conversation-id>",
"message_id": "<message-id>", # optional
"csat": {
"score": 10,
"comment": "Great service"
}
}

Note! Do not forget to authenticate your request with the API token as a Bearer token in the Authorization header.

As you can see in the payload example, the message_id is optional. If you send in only the ticket_id , then Klaus will show the CSAT score (and/or message) in the conversation details section:

Did this answer your question?