Skip to content
synthreo.ai

CW Ticket Sentiment Analyzer

Function agent guide for Builder — retrieve and cache ConnectWise ticket sentiment for reuse across agent workflows.

Reusable Ticket Sentiment & Experience Analysis Function

CW Ticket Sentiment Analyzer is a function-style agent that retrieves and analyzes sentiment from ConnectWise ticket notes.

It accepts a list of ticket IDs, generates sentiment analysis when needed, and caches results for reuse.

This allows other agents to obtain reliable ticket sentiment quickly without regenerating analysis.


This function provides a reusable mechanism for:

  • analyzing ticket sentiment
  • summarizing technician–client interactions
  • capturing customer feedback signals
  • reducing repeated LLM processing through caching

It is designed to be called by other agents as part of larger workflows.


Used by:

  • reporting agents
  • client health scoring agents
  • service quality monitoring workflows
  • operational insight pipelines

Problem it solves:

  • eliminates repeated sentiment generation
  • reduces compute cost and latency
  • standardizes sentiment interpretation across workflows

Without this function, agents would need to individually retrieve and analyze ticket notes, increasing runtime and cost.


This function is called by another agent using a Call Agent node.

Execution model: synchronous
Trigger: agent flow logic
Prerequisite: list of ConnectWise ticket IDs


The function accepts an array of ticket objects.

  • ticket_id (number)
  • include_internal (boolean, default: false)
    include internal notes in sentiment analysis

  • force_refresh (boolean, default: false)
    bypass cache and regenerate sentiment

[
{ "ticket_id": 123 },
{ "ticket_id": 1234, "include_internal": true, "force_refresh": true }
]

The function returns the input array with added sentiment data.

Existing properties are preserved.

"sentiment": {
"sentiment": "positive | negative | neutral | unknown",
"sentiment_score": -1.0 to 1.0,
"explanation": "reason sentiment was assigned",
"synopsis": "summary of ticket notes",
"feedback": "customer feedback to technician"
},
"cached": true
  • cached indicates whether the sentiment was retrieved from cache.

Consumed by: any calling agent.


The function retrieves:

  • ticket notes
  • last update timestamps

Cache keys are based on:

  • ticket ID
  • include_internal flag

For each ticket:

  1. Retrieve ticket metadata and last update time

  2. Check cache for matching sentiment record

  3. If cache is valid → return cached result

  4. If cache miss or refresh requested:

    • pull ticket notes
    • generate sentiment using LLM analysis
    • store result in cache
  5. return sentiment data

This ensures sentiment reflects the most recent ticket state.


Sentiment analysis is generated using LLM interpretation of ticket notes.

The function extracts:

  • overall sentiment
  • customer tone and experience
  • feedback directed toward technicians
  • a concise synopsis of interactions

  • input validation is enforced per ticket
  • malformed entries return element-level errors
  • failures prevent cache writes for affected tickets
  • ConnectWise timeouts are respected
  • agent runtime limit: 2 hours

Efficiency features include:

  • cache reuse to reduce regeneration
  • cache invalidation when ticket updates change
  • optional forced refresh
  • external request timeouts

Batching and deduplication are handled by the calling agent.


If an error occurs:

  • missing data → element-level error
  • external dependency failure → error returned
  • malformed input → error returned

The function returns the input array with error messages attached to affected elements.


  • return full ticket data
  • validate ticket existence before processing
  • batch large ticket lists
  • manage workflow runtime limits
  • validating ticket IDs
  • batching requests to stay within runtime limits
  • handling downstream logic

Runtime: Synthreo Builder
Services: Synthreo DCS
Deployment: Synthreo Builder environment


CW Ticket Sentiment Analyzer provides:

  • reusable ticket sentiment analysis
  • consistent customer experience insight
  • cache-backed performance efficiency
  • structured outputs for downstream automation

It enables other agents to incorporate sentiment intelligence without repeated ticket processing.