Help desk

Merge tickets

ticket_merge · Changes data · Markdown

Merges a duplicate ticket into another: its messages, notes, email threads, tags and fields move over.

$0.01 a call

From your agent’s balance. A call that fails costs nothing.

An example

Paul emailed again about the same scratch and it opened ticket 91. Fold it into 87.

Your agent callsticket_merge$0.01 a call

The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.

With these arguments
{
  "number": 91,
  "into": 87
}
What comes back
{
  "ticket": {
    "number": 1,
    "subject": "Scratch on the Tabor's top tube",
    "status": "open",
    "priority": "high",
    "category": "Damaged delivery",
    "tags": [
      "damage"
    ],
    "requester_email": "paul.hoffmann@example.com",
    "requester_name": "Paul Hoffmann",
    "contact_id": null,
    "company_id": null,
    "source": "api",
    "channel": "api",
    "assigned_to": null,
    "waiting_on": "us",
    "sla": null,
    "merged_into": null,
    "created_at": "2026-10-14T08:00:00+00:00",
    "last_activity_at": "2026-10-14T08:00:00+00:00",
    "first_reply_at": null,
    "resolved_at": null,
    "body": "Called on Wednesday: the Tabor gravel bike delivered on Monday has a 3 cm scratch on the top tube. He would like it touched up or the frame swapped.",
    "fields": {
      "order_id": "2231"
    },
    "inbox": null,
    "email_message_id": null,
    "rating": null,
    "rating_requested_at": null,
    "comments": [
      {
        "kind": "requester",
        "body": "(Merged from ticket #2, from paul.hoffmann@example.com: Any news about the scratch on my bike?)\n\nAny news about the scratch on my bike?",
        "email_status": null,
        "at": "2026-10-14T08:00:00+00:00"
      },
      {
        "kind": "system",
        "body": "Ticket #2 was merged into this one.",
        "email_status": null,
        "at": "2026-10-14T08:00:00+00:00"
      }
    ]
  },
  "merged": 2
}

Use it when

The same customer opened two tickets about one problem.

What it does

Merge a duplicate ticket (number) into another (into): its messages, notes, email threads, tags and fields move over, so mail in the duplicate's thread lands on `into` from now on, and `into` reopens if the duplicate was still open. The duplicate is resolved and points at `into`. Replies on `into` go to its own requester only.

What comes back

The ticket that stays, in full, merged: the duplicate's number, and a note when the duplicate came from another requester. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
numberRequiredintegerThe ticket number, e.g. 42 for ticket #42. At least 1.
intoRequiredintegerThe ticket number, e.g. 42 for ticket #42. At least 1.

The call

Over MCP, call ticket_merge on https://api.conecto.chat/mcp/helpdesk. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/ticket_merge \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"number":91,"into":87}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_found404No ticket of the business has that number.Find it with ticket_list and use its number.
invalid_input400number and into are the same ticket.Send two different tickets.
conflict409One of the tickets was merged already.Merge into the ticket the message names.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md