# Audit chat agents running on Crisp

> Evidova asks Crisp what changed, reads the conversations that did, and scores them.

## What it catches

Crisp gives your visitors somewhere to type and your team somewhere to answer. It does not tell you whether the answer was right. Evidova reads both sides and scores the conversation against the checks you approved: whether the agent answered the question asked, whether it said it was not a person when asked, whether it invented a price or a delivery date, and where the visitor stopped replying.

## Connect Crisp

1. In Crisp, create a plugin and note its identifier and its key. That pair is what we authenticate with, as a plugin rather than as one of your people.
2. Copy your Crisp website ID.
3. In Evidova, open Setup, choose Crisp, and paste all three.
4. There is nothing to paste back into Crisp. About once a minute we ask Crisp which conversations have changed since the last time we asked, then read the messages of each one. The first pass starts at the beginning of the website and works forward a few pages at a time until it catches up, so history arrives on its own.
5. Leave the API base URL and the parallel fetches alone unless you have a reason to change them. Fetches run 4 at a time by default and stop at 8, so a busy morning is read steadily instead of in one burst.

## What we read from Crisp

| | |
|---|---|
| session_id | The conversation, from Crisp's own listing. It is what the messages are grouped under |
| updated_at | How we know a conversation changed. The newest one we have read is where the next read starts |
| fingerprint | Which message this is, so a conversation read twice does not become two copies of itself |
| timestamp | When the message was sent, to the millisecond |
| type | What shape the message is. text gives the words directly, audio gives a recording, and anything else is read for a text field inside it |
| content | What was said. A plain string on a text message, the file's URL on an audio one |
| from | Which side sent it. user is the visitor, operator is your side, and any other value produces no turn |
| origin | Whether the agent or a person replied. Read the trap below |
| user.user_id, user.nickname | Who replied, when a person did. Absent on some older messages, and left empty rather than guessed at from your operator list |

## What we ignore, and why

A message with no words and no recording in it produces no turn, because there is nothing in it to score. A message from neither a visitor nor an operator produces none either. And a conversation Crisp refuses us, because it was deleted or because the plugin may not read it, is dropped from that pass and comes back the next time it changes. If Crisp refuses every one of them, we stop and keep our place instead of moving quietly past the whole batch, so a plugin with the wrong access reads as a failure you can see rather than as a gap nobody noticed.

## One trap worth knowing

Crisp does not label a reply as the agent's or a person's, so we read where it came from. A message whose origin begins with urn: was sent by a plugin, which is your agent, and it is credited to the agent. Every other origin is the operator console, and it is credited to the person who typed it, by their Crisp user id and nickname. So your agent has to answer as a plugin. Anything it sends by another route is read as one of your teammates, and its words are kept out of the agent's score rather than counted in it, which quietly makes the score look better than the bot deserves.

## What Crisp gives us

| | |
|---|---|
| Channel | chat |
| Audio | Yes |
| Timestamps | Milliseconds, on Crisp's clock |
| Delivery | Polled by us |
| Retries | Crisp does not retry |

---

Source: https://evidova.com/platforms/crisp
