Ticket Actor
The Ticket Actor in Hantera models and tracks long-running business transactions such as shipments, requests, inquiries, and support cases. It is a Custom Actor which allows you to customize tickets to fit a wide range of applications, from customer support issues to internal workflow processes.
By combining the Ticket Actor with the sendMessage effect in rules, you can automate actions such as generating returns and processing refunds upon ticket completion.
Ticket is different from Asset because Ticket actors exist in states and can be marked as completed.
Key Features
- Dynamic Data Model: Customize ticket fields to capture the specific information required for different scenarios.
- Versatile Applications: Utilize tickets for customer inquiries, support cases, returns, refunds, and more.
- Integration with Rules: Automate processes by emitting messages and triggering effects based on ticket events.
- State Transitions: Tickets exist in different states including
open,rejected, andcompleted.
Quick Start for Ticket Actors
Follow these steps to create and work with new Tickets.
Ticket Rule Hooks
Related Rule Hooks for Tickets are:
| Name | Discount | Rule | Reactor |
|---|---|---|---|
| OnTicketBeforeCreated | |||
| OnTicketBeforeDeleted | |||
| OnTicketCommands | |||
| OnTicketComplete | |||
| OnTicketCreated | |||
| OnTicketDeleted | |||
| OnTicketRejected |
Example: Process a Ticket Completion
Create return of related order lines upon ticket completion
param input: OnTicketComplete
from match when input.typeKey == 'rma' |> effects.sendMessage { path: 'order/{input.ticket.dynamic->'orderId'}' type: 'applyCommands' body: { commands: [input.ticket.items select ticketItem => { type: 'createReturn' orderLineId: ticketItem.dynamic->'orderLineId' quantity: ticketItem.dynamic->'quantity' refundFactor: 1 }] } }