Raise ticket bot

Hi team, how to create a bot that handles ticketing through Raise Ticket, view ticket options… or add this feature in current bot… please help

Step 1: Create the Raise Ticket Dialog

  • Go to the XO Platform → Automation → Dialog Tasks.
  • Create a new dialog and name it “Raise Ticket.”
  • Train it with sample utterances so the bot knows when to trigger:
    • Raise a ticket
    • Report an issue
    • Log a problem
    • Complaint

Step 2: Design the Flow for Raise Ticket

  • Entity Node: Issue Description
    • Ask: “Please describe your issue.”
    • Type: String
  • Entity Node: Priority
    • Ask: “What priority is this issue? (High, Medium, Low)”
    • Type: List
  • Service Node: Create Ticket
    • Integrate with your ticketing system (e.g., JIRA, Zendesk, ServiceNow, or API).
    • Example payload:
{
  "description": "{{context.entities.IssueDescription}}",
  "priority": "{{context.entities.Priority}}",
  "user": "{{context.session.UserId}}"
}
  • Store returned Ticket ID in context.ticketId.
  • Message Node: Confirmation
    • Example message:
      “Your ticket has been created successfully. Ticket ID: {{context.ticketId}}.”

Step 3: Create the View Ticket Dialog

  • Create a new dialog and name it “View Ticket.”
  • Train with utterances like:
    • View my ticket
    • Check ticket status
    • Show my complaint

Step 4: Design the Flow for View Ticket

  • Entity Node: Ticket ID
    • Ask: “Please provide your Ticket ID.”
    • Type: String
  • Service Node: Fetch Ticket
    • Call your ticketing system API to fetch details.
    • Example request:
{
  "ticketId": "{{context.entities.TicketId}}"
}
  • Store response fields like status, priority, description.
  • Message Node: Show Ticket
    • Example message:
      *“Here are the details for Ticket {{context.entities.TicketId}}:
    • Issue: {{context.ticket.description}}
    • Priority: {{context.ticket.priority}}
    • Status: {{context.ticket.status}}”*

Step 5: Example Conversations

Raise Ticket

  • User: I want to raise a ticket
  • Bot: Please describe your issue.
  • User: Laptop won’t start.
  • Bot: What priority is this issue? (High, Medium, Low)
  • User: High
  • Bot: Your ticket has been created successfully. Ticket ID: T12345.

View Ticket

  • User: View my ticket
  • Bot: Please provide your Ticket ID.
  • User: T12345
  • Bot: Ticket T12345 → Issue: Laptop won’t start, Priority: High, Status: Open.

Result:
Now your bot can both raise new tickets and view existing tickets.
You can later extend this with Update Ticket (change priority, add comments) or Close Ticket dialogs.