Android – Tickets

Tickets

This is used to power a “Help Me” action in your app. The user can request help and fill in a question, and the app sends a message to RevTwo that creates a ticket. Depending on the configuration, a ticket may flow into a system like ServiceNow or other CRM. When it is created, a support tech can claim the ticket and begin to assist the mobile user.

RevTwo offers two different ways to create a ticket. The first is MyTicketActivity. This view is included in the library and contains the full ticketing workflow. There is also an API to programmatically create a ticket, such as when some condition occurs.

MyTicketActivity

This view can be used as-is, or subclassed in your app.  It manages the workflow around creating and closing tickets. When it is opened, the user can ask a question in the text input and tap Submit. This creates a new ticket. The view also shows previous tickets, both open and closed. In this view, tapping on any existing tickets goes to a view with that ticket’s information at the top and in a dropdown, including a button to close an open ticket. The main part of the view is where messages are shown, between support techs, other community users, and the app user.

// Retrieve My Tickets
Intent intent = new Intent(getActivity(), MyTicketActivity.class);

// Provide tags that you want for ticket routing
intent.putExtra(MyTicketActivity.TAGS,new String []{"yellow","blue"});
startActivity(intent);
// Retrieve Community Tickets
Intent community = new Intent(getActivity(), CommunityActivity.class);

// Provide tags that you want for ticket routing
community.putExtra(CommunityActivity.TAGS,new String[]{"yellow"});
startActivity(community);

Ticket Manager

Initialize Ticket Manager like this:

ITicketManager ticketManager = Revtwo.getTicketManager()

You can then call any of the following interfaces for managing tickets:

// Open ticket with all params
void openTicket(String text, String name, String email, String phone, String[] tags, Double lat, Double lng, android.content.Context context, Callback<Void> callback);

// Open ticket without Lat and Long
void openTicket(String text, String name, String email, String phone, String[] tags, android.content.Context context, Callback<Void> callback);

// Open ticket without tags
void openTicket(String text, String name, String email, String phone, android.content.Context context, Callback<Void> callback);

// Close ticket
void closeTicket(Long ticketId, android.content.Context context, Callback<Void> callback);

// Check ticket status
void checkTicket(Long ticketId, android.content.Context context, Callback<TicketStatusEnum> callback);

// List community tickets for specified Search parameter with Size and Offset
void listTickets(String[] tags, Double lat, Double lng, Double range, String search, int size, int offset, android.content.Context context, Callback<ListTicketsResponse> callback);

// List community tickets for specified Search parameter with Size only
void listTickets(String[] tags, Double lat, Double lng, Double range, String search, int size, android.content.Context context, Callback<ListTicketsResponse> callback);

// List community tickets for specified Search parameter
void listTickets(String[] tags, Double lat, Double lng, Double range, String search, android.content.Context context, Callback<ListTicketsResponse> callback);

// List community tickets for specified Lat and Long with Range
void listTickets(String[] tags, Double lat, Double lng, Double range, android.content.Context context, Callback<ListTicketsResponse> callback);

// List community tickets for specified Lat and Long without Range
void listTickets(String[] tags, Double lat, Double lng, android.content.Context context, Callback<ListTicketsResponse> callback);

// List community tickets for specified tags
void listTickets(String[] tags, android.content.Context context, Callback<ListTicketsResponse> callback);

// List all community tickets
void listTickets(android.content.Context context, Callback<ListTicketsResponse> callback);

// List all user’s tickets for specified Size and offset
void listMyTickets(boolean includeClosed, boolean includeFollow, int size, int offset, android.content.Context context, Callback<ListTicketsResponse> callback);

// List all user’s tickets for specified Size
void listMyTickets(boolean includeClosed, boolean includeFollow, int size, android.content.Context context, Callback<ListTicketsResponse> callback);

// List all user’s tickets including closed and following tickets
void listMyTickets(boolean includeClosed, boolean includeFollow, android.content.Context context, Callback<ListTicketsResponse> callback);

// List all user’s tickets including closed tickets
void listMyTickets(boolean includeClosed, android.content.Context context, Callback<ListTicketsResponse> callback);

// List all user’s tickets
void listMyTickets(android.content.Context context, Callback<ListTicketsResponse> callback);

Parameters