# Support Integration

You can now capture and include a Zipy session URL in any ticket raised by your end users from inside your application where Zipy is integrated. It is as simple as calling a Javascript function **getCurrentSessionURL.** \
\
This function can be called from any page of the application where Zipy is active and will return the ongoing Zipy session URL of that user. On the form submission, when your users create tickets from inside your application, the same Zipy link can be sent to your support desk/chat client. This will enable your support team to access the Zipy sessions of the users, in the corresponding issues reported by them.

### Synchronous Method

```javascript
const sessionUrl = window.zipy.getCurrentSessionURL();
/* You can send this URL in an email/chat that is sent on form submission. */
```

**Example Usage:**

```javascript
const handleLogin = (data) => {
    let sessionURL = window.zipy.getCurrentSessionURL();
    console.log("sessionURL", sessionURL);
    setLoading(true);    
};
```

### Asynchronous Method

For scenarios where you need to fetch the session URL asynchronously, such as when performing other operations before accessing the session URL, you can use the asynchronous version of the function, getCurrentSessionURLAsync.

```javascript
window.zipy.getCurrentSessionURLAsync().then((sessionUrl) => {
    console.log("Session URL: ", sessionUrl);
    // Use this URL in form submission or send it to your support desk.
});
```

**Example Usage:**

```javascript
const handleLogin = (data) => {
    window.zipy.getCurrentSessionURLAsync().then((sessionURL) => {
        console.log("sessionURL", sessionURL);
        setLoading(true);    
        // Now, send this session URL along with login details or include it in the support ticket
    });
};
```


---

# 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.zipy.ai/configure/support-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.
