Running the Support engine

The Support engine handles the creation of Support tickets through the Messaging SDK. It is primarily intended for use in conjunction with the Answer Bot engine but can be used by itself.

How the Support engine works

On starting, the Support engine checks for any previous conversation data (such as an Answer Bot interaction). If found, it uses the data for the body of the ticket to be created. If it doesn't find any previous conversation data, the engine asks the user to enter their query.

Support engine prompts for a message

If the Conversations setting is not enabled in Zendesk Support and the SDK is configured with an anonymous identity with no email address, then the Support engine prompts the user for an email address. Because tickets can't be viewed in the SDK when the Conversations setting is turned off, email is the only way a user can receive a reply.

Support engine confirms a ticket has been created

Once the Support engine has a message from the user (and an email address, if required), it creates a ticket in Support. If the Conversations setting is enabled, the Support engine shows a link to the Support SDK RequestListActivity. If Conversations is disabled, the Support engine simply confirms that the ticket has been created.

Support engine confirms a ticket has been created, and links to the request list screen Support engine confirms a ticket has been created

The Support engine can't be used to view or update existing tickets yet. Once the ticket has been created, the Support SDK's RequestActivity must be used to view or update it.

Starting the Support engine

Note: Make sure to add the Unified SDK dependency, initialise the SDK, and identify your user.

First, obtain an instance of SupportEngine:

Engine supportEngine = SupportEngine.engine();
Running the engine by itself

To start the Support engine by itself, pass your SupportEngine instance to the builder for MessagingActivity as follows:

MessagingActivity.builder()
    .withEngines(supportEngine)
    .show(context);
Running the engine with other engines

To use the Support engine in conjunction with the Answer Bot and Chat engines, obtain an instance of AnswerBotEngine and ChatEngine and include them when using the MessagingActivity builder:

Engine supportEngine = SupportEngine.engine();
Engine answerBotEngine = AnswerBotEngine.engine();
Engine chatEngine = ChatEngine.engine();

MessagingActivity.builder()
    .withEngines(answerBotEngine, chatEngine, supportEngine)
    .show(context);

Note that the answerBotEngine object is placed before supportEngine. This is important because the Unified SDK will start the first engine in the list and any subsequent engines will be treated as potential handover options. Answer Bot can hand over to Support and Chat but they cannot hand over to Answer Bot. This means answerBotEngine must be placed first in the list or else it will never be started.

Using the standalone Support SDK

If the Support engine doesn't suit your use case or you want your users to be able to continue the ticket conversation in your app, you can use the Support SDK's own RequestActivity and RequestListActivity. See Adding tickets in the Support SDK documentation for more details.

Using the Support API providers

If neither the Support engine nor the standalone Support SDK UI suit your use case, you can use the Support SDK's API providers instead and build your own UI. See the API providers reference in the Support SDK documentation.