> For the complete documentation index, see [llms.txt](https://docs.taptalk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.taptalk.io/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-ios/case-and-topic.md).

# Case & Topic

### Get Available Topics

You can get the list of available topics by calling **`getTopicList`**.

{% tabs %}
{% tab title="Objective-C" %}
{% code title="YourViewController.m" %}

```csharp
#import <TapTalkLive/TapTalkLive.h>

[[TapTalkLive sharedInstance] getTopicListWithSuccess:^(NSArray<TTLTopicModel *> *topicListArray) {
    // Successfully fetched topics
}
failure:^(NSError *error) {
    
}];
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Get Active User's Case List

To use this method, you need to first finish [authentication](/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-ios/authentication.md#authenticate-user-optional) process.

Once authenticated, you can obtain the active user's case list by calling **`getUserCaseList`**.

{% tabs %}
{% tab title="Objective-C" %}
{% code title="YourViewController" %}

```csharp
#import <TapTalkLive/TapTalkLive.h>

[[TapTalkLive sharedInstance] getUserCaseListListWithSuccess:^(NSArray<TTLCaseModel *> *caseListArray) {
    // Successfully fetched user cases
}
failure:^(NSError *error) {
    
}];
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Create a New Case

To use this method, you need to first finish [authentication](/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-ios/authentication.md#authenticate-user-optional) process.

Once authenticated, you can create a new case for the user by calling **`createNewCase`**, providing the **topic ID** and **first message**.

{% tabs %}
{% tab title="Objective-C" %}
{% code title="YourViewController" %}

```csharp
#import <TapTalkLive/TapTalkLive.h>

[[TapTalkLive sharedInstance] createNewCaseWithTopicID:TOPIC_ID
                                          firstMessage:FIRST_MESSAGE
success:^(TTLCaseModel *caseModel) {
    // Successfully created a new case
}
failure:^(NSError *error) {
    
}];
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Parameters**\
\&#xNAN;**`TOPIC_ID`**: (String) ID of the selected topic, can be obtained from [**`getTopicList`**](#get-available-topics)\
\&#xNAN;**`FIRST_MESSAGE`**: (String) message to be sent by the user to start a case
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.taptalk.io/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-ios/case-and-topic.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
