-
Notifications
You must be signed in to change notification settings - Fork 3
**WIP** method getSessionDetails() added #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
6f458b8
1daabd8
f41ff97
ce6ea40
e1497a6
5d7980f
f15a885
433a286
e5e583f
5d8addc
4090b69
c470226
7abec7b
2508efa
2099d32
408b794
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -61,6 +61,16 @@ Passing `false` closes the chat widget. | |||||
window.plugSDK.toggleWidget(true); | ||||||
``` | ||||||
|
||||||
## Check widget status | ||||||
|
||||||
Use `isWidgetOpen` to determine whether your chat widget is currently open or closed. | ||||||
|
||||||
```jsx | ||||||
window.plugSDK.isWidgetOpen | ||||||
``` | ||||||
|
||||||
This returns `true` if the chat widget is open and `false` if it is closed. | ||||||
|
||||||
## Take action from PLuG chat events | ||||||
|
||||||
This method allows you to listen for events from the PLuG widget. Below are the available values for `PAYLOAD_TYPE`. | ||||||
|
@@ -82,16 +92,6 @@ useEffect(() => { | |||||
}, []); | ||||||
``` | ||||||
|
||||||
## Check widget status | ||||||
|
||||||
Use `isWidgetOpen` to determine whether your chat widget is currently open or closed. | ||||||
|
||||||
```jsx | ||||||
window.plugSDK.isWidgetOpen | ||||||
``` | ||||||
|
||||||
This returns true if the chat widget is open and false if it is closed. | ||||||
|
||||||
## Start conversation | ||||||
|
||||||
The `startConversationContent` method opens the PLuG widget directly to the conversation creation view. It replicates the action of clicking the **Send us a message** button, launching the widget to the conversation initiation screen. | ||||||
|
@@ -146,6 +146,16 @@ If no input is provided, the method toggles the search bar: opening it if it's c | |||||
window.plugSDK.toggleSearchAgent(true); | ||||||
``` | ||||||
|
||||||
## Check Search Agent status | ||||||
|
||||||
Use `isSearchAgentOpen` to determine whether the search agent is currently open or closed. | ||||||
|
||||||
```jsx | ||||||
window.plugSDK.isSearchAgentOpen | ||||||
``` | ||||||
|
||||||
This returns true if the search agent is open and false if it is closed. | ||||||
|
This returns true if the search agent is open and false if it is closed. | |
This returns `true` if the search agent is open and `false` if it is closed. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the `getSessionDetails` method to fetch the session id and tab id of currently ongoing session. These details can then be passed across different domains to maintain the journey as a single, continuous session. | |
You can use the `getSessionDetails` method to fetch the session ID and tab ID of currently ongoing session. These details can then be passed across different domains to maintain the journey as a single, continuous session. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)
fern-api-docs/fern/docs/pages/plug-sdk/web/methods.mdx
Line 30 in 5d8addc