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
var activity = new Intent(this, typeof(MyTicketActivity));

// Provide tags that you want for ticket routing
activity.PutExtra(MyTicketActivity.TAGS, new string[] {"yellow", "blue"});
StartActivity (activity);
// Retrieve Community Tickets
var activity = new Intent(this, typeof(CommunityActivity));

// Provide tags that you want for ticket routing
activity.PutExtra(CommunityActivity.TAGS, new string[] {"yellow"});
StartActivity (activity);

Ticket Manager

Initialize Ticket Manager like this:

RevTwoXamarin.RevTwo.GetTicketManager();

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

// Open ticket with all params
public void OpenTicket(string text, string name, string email, string phone, string[] tags, double lat, double lng, Dictionary<string, string> data, Context context, Action<CreateTicketResponse> success = null,Action<Exception> error = null);

// Open ticket without Lat and Long
public void OpenTicket(string text, string name, string email, string phone, string[] tags, Dictionary<string, string> data, Context context, Action<CreateTicketResponse> success = null, Action<Exception> error = null);

// Open ticket without tags
public void OpenTicket(string text, string name, string email, string phone, Dictionary<string, string> data, Context context, Action<CreateTicketResponse> success = null, Action<Exception> error = null);

// Open ticket without name, email and phone for the user set with @SetUser method
public void OpenTicket(string text, string[] tags, Dictionary<string, string> data, Context context,Action<CreateTicketResponse> success = null, Action<Exception> error = null);

// Retrieve ticket by ID
public void GetTicket(long ticketId, Context context, Action<TicketResponse> success = null, Action<Exception> error = null);

// Close ticket
public void CloseTicket(long ticketId, Context context, Action<Java.Lang.Object> success = null, Action<Exception> error = null);

// Check ticket status
public void CheckTicket(long ticketId, Context context, Action<TicketStatusEnum> success = null, Action<Exception> error = null); 

// List community tickets for specified Search parameter with Size and Offset
public void ListTickets(string[] tags, double lat, double lng, double range, string search, int size, int offset, Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null);

// List community tickets for specified Search parameter with Size only
public void ListTickets(string[] tags, double lat, double lng, double range, string search, int size, Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null);

// List community tickets for specified Search parameter
public void ListTickets(string[] tags, double lat, double lng, double range, string search, Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null);

// List community tickets for specified Lat and Long with Range
public void ListTickets(string[] tags, double lat, double lng, double range, Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null); 

// List community tickets for specified Lat and Long without Range
public void ListTickets(string[] tags, double lat, double lng, Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null);

// List community tickets for specified tags
public void ListTickets(string[] tags, Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null);

// List all community tickets
public void ListTickets(Context context, Action<ListTicketsResponse> success, Action<Exception> error = null);

// List all tickets created on current device for specified Size and offset
public void ListMyTickets(bool includeClosed, bool includeFollow, int size, int offset, Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null);

// List all tickets created on current device for specified Size
public void ListMyTickets(bool includeClosed, bool includeFollow, int size, Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null);

// List all tickets created on current device
public void ListMyTickets(bool includeClosed, bool includeFollow, Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null);

// List all tickets created on current device excluding followed tickets
public void ListMyTickets(bool includeClosed, Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null);

// List all tickets created on current device excluding followed and closed tickets
public void ListMyTickets(Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null);

// List all tickets for the user set with @SetUser method
public void ListUserTickets(bool includeClosed, Context context, Action<ListTicketsResponse> success = null, Action<Exception> error = null);

// Flag chat message abusive
public void FlagTicket(long ticketId, string chatId, Context context, Action<Java.Lang.Object> success = null, Action<Exception> error = null); 

// Get the number of unread messages for a device
public int GetUnreadMessages(Context context);

Parameters