# Support Tools Integration

To be able to debug support tickets effortlessly, all you have to do is extract the session URL from Luciq and send it as a custom attribute to your preferred support tools. This enables your support team to view Session Replays for every reported issue to help in debugging the issue. You can use the below API to extract the session URL:

{% tabs %}
{% tab title="Swift" %}
{% code overflow="wrap" %}

```swift
if let sessionLink = SessionReplay.sessionReplayLink {
  print("result: \(sessionLink)")
}
```

{% endcode %}
{% endtab %}

{% tab title="Objective-C" %}
{% code overflow="wrap" %}

```objectivec
NSString *sessionLink = LCQSessionReplay.sessionReplayLink;
if (sessionLink != NULL) {
    NSLog(@"sessionLink: %@", sessionLink);
}
```

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

#### Zendesk Example

To automatically attach the session URL to every support ticket submitted through Zendesk, just insert the following snippet into your application's code.

<figure><img src="/files/EgCMOyDqeTvc2kPWnAKW" alt=""><figcaption></figcaption></figure>

***Send Session URL as tags:***

{% tabs %}
{% tab title="Swift" %}

```swift
let request = ZDKCreateRequest()
        request.subject = "Session replay"
        request.requestDescription = "Adding session replay url"

        let luciqSessionReplayLink = SessionReplay.sessionReplayLink

        request.tags = [luciqSessionReplayLink]
```

{% endtab %}
{% endtabs %}

***Send Session URL as custom fields:***

{% tabs %}
{% tab title="Swift" %}

```swift
let request = ZDKCreateRequest()
        request.subject = "Session replay"
        request.requestDescription = "Adding session replay url"

        let luciqSessionReplayLink = SessionReplay.sessionReplayLink
        let field = CustomField(fieldId: 1234, value: luciqSessionReplayLink)

        request.customFields = [field]
```

{% endtab %}
{% endtabs %}

#### Intercom Example

To automatically include the Session URL with each support ticket received via Intercom, simply integrate the following code snippet into your application. This will send the session URL to the recent events section.

{% tabs %}
{% tab title="Swift" %}
{% code overflow="wrap" %}

```swift
guard let sessionURL = SessionReplay.sessionReplayLink else { return }
        Intercom.logEvent(withName: "session-replay-url", metaData: ["url": sessionURL])
        
        Intercom.present()
```

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


---

# Agent Instructions: 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:

```
GET https://docs.luciq.ai/ios/setup-luciq-for-ios/setup-session-replay/support-tools-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
