JsonLogic-Based Assignment and Filtering
Deepdesk uses JsonLogic to define flexible data selection rules for profile assignment and for filtering data in training pipelines (such as exclude as suggestion and ignore messages).
JsonLogic rules can be based on any available platform-specific metadata, as well as the following conversation properties:
conversation_idexternal_conversation_idmessage_idtimeauthor_idauthor_namesourcetextlocaletags
For legacy reasons, the non-metadata attributes used for exclude_as_suggestion are agent_id, not author_id. This is because of an older schema still being used in Engine. There is a Linear ticket on the tech debt back log to fix this. Other field names that are different: agent_name instead of author_name, origin instead of source
Example
If the platform provides a metadata property category which is messaging for certain messages, you can define a JsonLogic rule as follows:
{
"or": [
{ "==": [ { "var": "category" }, "messaging" ] },
{ "in": [ "Bot", { "var": "author_name" } ] }
]
}
This rule will match any message where the category is messaging or the author name is Bot. JsonLogic rules are used both for profile assignment during ingestion and for filtering which messages are included or excluded in model training pipelines.
See the JsonLogic documentation for all available operators and advanced usage.