show Plug widget on click of a button
ART-1270_KNOWLEDGE_NODE-6
screen is open, you should use either the togglewidget() method with a boolean value or the toggleSearchAgent() method, depending on which PLuG instance you are using.\n\n1 window. plugSDK. toggleWidget ( true ) ; 2 window. plugSDK. toggleSearchAgent ( true ) ; Take actions from events.\n\nThis method can be used to listen to events coming from the PLuG widget. The following are the different PAYLOAD_TYPES.\n\nON_PLUG_WIDGET_CLOSED The PLuG widget is closed.\n\nON_PLUG_WIDGET_OPENED The PLuG
Methods — DevRev | Docs
ART-1270_KNOWLEDGE_NODE-9
utilized to open the PLuG widget with the conversation creation view activated. It essentially replicates the action of clicking the Send us a message. button, launching the widget directly to the conversation initiation screen.\n\nThe method also accepts an optional input parameter, allowing you to pre-fill a message in the conversation creation screen. This provides your users with a prompt to initiate a conversation with your team.\n\n1 plugSDK. toggleWidget ( true , \' create_conversation
Methods — DevRev | Docs
ART-2894_KNOWLEDGE_NODE-5
window.plugSDK.toggleSearchAgent();  \n    ---\n[/code]  \n  \nTo prefill search input from outside the window, call the following method:\n\n[code]\n\n    window.plugSDK.prefillSearchQuery(query:"string")  \n    ---\n[/code]  \n  \nYou should now have the PLuG search widget installed on your website. Facing some issues? Reach out to us through our own PLuG chat widget from the bottom right of your screen.\n\nOnce the widget is installed on your website, every user who visits your website is
Install PLuG search — DevRev | Docs
ART-1466_KNOWLEDGE_NODE-21
widget.\n\n1 window. plugSDK. toggleWidget ( true ) ; Take action from PLuG chat events.\n\nThis method allows you to listen for events from the PLuG widget. Below are the available values for PAYLOAD_TYPE.\n\nON_PLUG_WIDGET_CLOSED : Triggered when the PLuG widget is closed.\nON_PLUG_WIDGET_OPENED : Triggered when the PLuG widget is opened.\nON_PLUG_WIDGET_READY : Triggered when the PLuG widget is ready.\nON_PLUG_WIDGET_UNREAD_COUNT_CHANGE : Triggered when the user receives a new message. You
Methods — DevRev | Docs
ART-1270_KNOWLEDGE_NODE-1
widget.\n\nplugSDK.initSearchAgent() Initialize PLuG search agent.\n\nplugSDK.shutdown() End the user session which is currently initialized in PLuG widget.\n\nplugSDK.toggleWidget() Open/close the chat widget.\n\nplugSDK.toggleSearchAgent() Open/close the search agent.\n\nplugSDK.onEvent() Perform specific actions based on the payload type received from the PLuG widget.\n\nplugSDK.toggleTheme(\'light/dark\') Toggle PLuG widget theme.\n\nplugSDK.toggleWidget(true, \'create_conversation\',
Methods — DevRev | Docs
ART-2897_KNOWLEDGE_NODE-12
PLuG chat widget.\n\nPassing `true` opens the chat widget.\n\nPassing `false` closes the chat widget.\n\n[code]\n\n    1| window.plugSDK.toggleWidget(true);  \n    ---|---\n[/code]  \n  \n## Check widget status\n\nUse `isWidgetOpen` to determine whether your chat widget is currently open or closed.\n\n[code]\n\n    1| window.plugSDK.isWidgetOpen  \n    ---|---\n[/code]  \n  \nThis returns `true` if the chat widget is open and `false` if it is closed.\n\n## Take action from PLuG chat
Methods — DevRev | Docs
ART-15509_KNOWLEDGE_NODE-11
widget.\n\nPassing `true` opens the chat widget.\n\nPassing `false` closes the chat widget.\n\n```\n|  |  |\n| --- | --- |\n| 1 | window.plugSDK.toggleWidget(true); |\n```\n\nCheck widget status\n-------------------\n\nUse `isWidgetOpen` to determine whether your chat widget is currently open or closed.\n\n```\n|  |  |\n| --- | --- |\n| 1 | window.plugSDK.isWidgetOpen |\n```\n\nThis returns `true` if the chat widget is open and `false` if it is closed.\n\nTake action from Plug chat
Methods | DevRev | Docs
ART-1466_KNOWLEDGE_NODE-23
} ) ; 7 } , []) ; Check widget status.\n\nUse isWidgetOpen to determine whether your chat widget is currently open or closed.\n\n1 window. plugSDK. isWidgetOpen\n\nThis returns true if the chat widget is open and false if it is closed.\n\nStart conversation.\n\nThe 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.\n\nThis
Methods — DevRev | Docs
ART-15496_KNOWLEDGE_NODE-4
in the `custom_launcher_selector` property. This CSS selector is the reference based on which your Plug widget opens. This property accepts a string value. The selector can also be configured through the plug settings on app.devrev.ai.\n\n```\n|  |  |\n| --- | --- |\n| 1 | custom_launcher_selector?: '#my-plug-widget' |\n```\n\nUse the `enable_default_launcher` property only if you are not using the custom launcher selector.\n\n```\n|  |  |\n| --- | --- |\n| 1 | enable_default_launcher?:
Custom implementation | DevRev | Docs
ART-2900_KNOWLEDGE_NODE-5
styles, specify the CSS selector in the `custom_launcher_selector` property. This CSS selector is the reference based on which your PLuG widget opens. This property accepts a string value. The selector can also be configured through the plug settings on app.devrev.ai.\n\n[code]\n\n    1| custom_launcher_selector?: '#my-plug-widget'  \n    ---|---\n[/code]  \n  \nUse the `enable_default_launcher` property only if you are not using the custom launcher selector.\n\n[code]\n\n    1|
Custom implementation — DevRev | Docs
ART-15509_KNOWLEDGE_NODE-14
//Your logic goes here |\n| 5 | } |\n| 6 | }); |\n| 7 | }, []); |\n```\n\nStart conversation\n------------------\n\nThe `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.\n\nThis method also accepts an optional input parameter to pre-fill a message on the conversation creation screen, providing your users with a
Methods | DevRev | Docs
ART-2063_KNOWLEDGE_NODE-27
release notes, news, or blogs with your customers.\n   * *Open Widget*: Upon clicking on the nudge, the Plug widget opens to prompt the user to start a conversation. This is useful for informing customers about Plug cards and suggesting support options.\n   * *None*: When the user clicks on the nudge, nothing happens and there won't be any interaction.\n9. Define rules as described in the [Create rules](#create-rules) section.\n\nCreate a banner\n---------------\n\n1. Click **Settings** >
Nudges | Computer for Your Customers | DevRev
ART-1466_KNOWLEDGE_NODE-20
plugSDK. toggleTheme ( \' light | dark \' ) ;\n\nCalling toggleTheme() switches between the current themes. Specifying a theme as a parameter allows you to toggle directly to that specific theme.\n\nThe theme specified in this method takes precedence over the theme configured in the PLuG settings in your DevRev app.\n\nToggle widget.\n\nThe toggleWidget method allows you to control the visibility of the PLuG chat widget.\n\nPassing true opens the chat widget.\n\nPassing false closes the chat
Methods — DevRev | Docs
ART-15509_KNOWLEDGE_NODE-10
`dark`.\n\n```\n|  |  |\n| --- | --- |\n| 1 | window.plugSDK.toggleTheme(\'light | dark\'); |\n```\n\nCalling `toggleTheme()` switches between the current themes. Specifying a theme as a parameter allows you to toggle directly to that specific theme.\n\n##### \n\nThe theme specified in this method takes precedence over the theme configured in the Plug settings in your DevRev app.\n\nToggle widget\n-------------\n\nThe `toggleWidget` method allows you to control the visibility of the Plug chat
Methods | DevRev | Docs
ART-2897_KNOWLEDGE_NODE-15
here  \n    5|     }  \n    6|   });  \n    7| }, []);\n[/code]  \n  \n## Start conversation\n\nThe `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.\n\nThis method also accepts an optional input parameter to pre-fill a message on the conversation creation screen, providing your users with a prompt to start a
Methods — DevRev | Docs
ART-15490_KNOWLEDGE_NODE-5
shared any information.\n\nAfter integrating the Plug widget, you can personalize and contextualize customer engagement. Learn how to [identify your customers](/sdks/web/user-identity) and update their information.\n\nBind a hotkey to toggle search agent\n------------------------------------\n\nYou can bind the `toggleSearchAgent` method to a hotkey, such as `Cmd + K` (or `Ctrl + K` for Windows), to toggle the search agent. Here\xe2\x80\x99s an example implementation:\n\n###### Setup\n\n######
Install Plug search | DevRev | Docs
ART-1466_KNOWLEDGE_NODE-24
method also accepts an optional input parameter to pre-fill a message on the conversation creation screen, providing your users with a prompt to start a conversation with your team.\n\n1 plugSDK. toggleWidget ( true , \' create_conversation \' , { 2 startConversationContent : \' Hi \' , 3 } ) ; Shutdown.\n\nThe shutdown() method is used to end the current user session in the PLuG widget. It allows you to clear users\xe2\x80\x99 conversations and tickets when they log out of your
Methods — DevRev | Docs
ART-15513_KNOWLEDGE_NODE-25
button, which can be integrated into your application. To include it on the current screen, add the following code to your XML layout:\n\n```\n|  |  |\n| --- | --- |\n| 1 | <ai.devrev.sdk.plug.view.PlugFloatingActionButton |\n| 2 | android:id="@+id/plug_fab" |\n| 3 | android:layout_width="wrap_content" |\n| 4 | android:layout_height="wrap_content" |\n| 5 | android:layout_margin="24dp" |\n| 6 | app:layout_constraintBottom_toBottomOf="parent" |\n| 7 | app:layout_constraintEnd_toEndOf="parent" />
Features | DevRev | Docs
ART-2897_KNOWLEDGE_NODE-11
options: `light` and `dark`.\n\n[code]\n\n    1| window.plugSDK.toggleTheme(\'light | dark\');  \n    ---|---\n[/code]  \n  \nCalling `toggleTheme()` switches between the current themes. Specifying a theme as a parameter allows you to toggle directly to that specific theme.\n\n#####\n\nThe theme specified in this method takes precedence over the theme configured in the PLuG settings in your DevRev app.\n\n## Toggle widget\n\nThe `toggleWidget` method allows you to control the visibility of the
Methods — DevRev | Docs
ART-2900_KNOWLEDGE_NODE-3
have customized these properties of the widget through the PLuG settings page of DevRev, the values set in the initalization code take priority over those which you have updated in your PLuG settings.\n\nAll of these properties have to be passed as parameters while initializing the PLuG widget using `plugSDK.init()`. For details, refer to the PLuG SDK for Web [methods documentation](/public/sdks/web/methods).\n\nCustomization| Description  \n---|---  \n`custom_launcher_selector`| Customize the
Custom implementation — DevRev | Docs
ART-2897_KNOWLEDGE_NODE-16
conversation with your team.\n\n[code]\n\n    1| plugSDK.toggleWidget(true, \'create_conversation\', {  \n    ---|---  \n    2| \tstartConversationContent: \'Hi\',  \n    3| });\n[/code]  \n  \n## Shutdown\n\nThe `shutdown()` method is used to end the current user session in the PLuG widget. It allows you to clear users\xe2\x80\x99 conversations and tickets when they log out of your application.\n\n[code]\n\n    1| await window.plugSDK.shutdown();  \n    ---|---\n[/code]  \n  \nAfter calling
Methods — DevRev | Docs
ART-15490_KNOWLEDGE_NODE-3
app_id: \'<your_unique_app_id>\', |\n| 4 | disable_plug_chat_window: true, |\n| 5 | }); |\n| 6 |  |\n| 7 | window.plugSDK.onEvent((payload) => { |\n| 8 | if (payload.type === \'ON_PLUG_WIDGET_READY\') { |\n| 9 | window.plugSDK.initSearchAgent(); |\n| 10 | } |\n| 11 | }); |\n| 12 | </script> |\n```\n\nTo toggle `searchAgent`, call the following method on any event required:\n\n```\n|  |\n| --- |\n| window.plugSDK.toggleSearchAgent(); |\n```\n\nTo prefill search input from outside the window,
Install Plug search | DevRev | Docs
ART-15509_KNOWLEDGE_NODE-15
prompt to start a conversation with your team.\n\n```\n|  |  |\n| --- | --- |\n| 1 | plugSDK.toggleWidget(true, \'create_conversation\', { |\n| 2 | startConversationContent: \'Hi\', |\n| 3 | }); |\n```\n\nShutdown\n--------\n\nThe `shutdown()` method is used to end the current user session in the Plug widget. It allows you to clear users\xe2\x80\x99 conversations and tickets when they log out of your application.\n\n```\n|  |  |\n| --- | --- |\n| 1 | await window.plugSDK.shutdown();
Methods | DevRev | Docs
ART-15496_KNOWLEDGE_NODE-2
Plug settings page of DevRev, the values set in the initalization code take priority over those which you have updated in your Plug settings.\n\nAll of these properties have to be passed as parameters while initializing the Plug widget using `plugSDK.init()`. For details, refer to the Plug SDK for Web [methods documentation](/sdks/web/methods).\n\n| Customization | Description |\n| --- | --- |\n| `custom_launcher_selector` | Customize the widget launcher to best fit your website or app. |\n|
Custom implementation | DevRev | Docs
ART-2897_KNOWLEDGE_NODE-8
selector string is used to match the element to which the widget will be attached. You can also set this selector from the PLuG settings on app.devrev.ai. If both sources are set, this value will be considered the definitive source.| Boolean (True or False)  \n`spacing`| Padding from the launcher: This padding can also be set in the PLuG settings on app.devrev.ai. If a value is specified in both places, this value will be considered the definitive source. Bottom: Padding from the bottom of the
Methods — DevRev | Docs
ART-886_KNOWLEDGE_NODE-5
be used to select a single page, a URL containing text, or a wildcard\n      The example rule above will only show the nudge when the exact URL is matched.\n      For wildcards, you can use the Contains operator\n      The Action can either launch a URL, launch the PLuG widget, or do nothing (e.g. notification only)\n    \n  \n  Validate preview\n  When satisfied, click on Publish\n  Enjoy your new nudge!\n\n\nAnalytics\n\nDevRev Nudges have full tracking including impressions, clicks, and more
Nudges | The Book of DevRev
ART-2894_KNOWLEDGE_NODE-6
considered an anonymous user. Anonymous users are the users that come to your site and haven\xe2\x80\x99t yet logged in or shared any information.\n\nAfter integrating the PLuG widget, you can personalize and contextualize customer engagement. Learn how to [identify your customers](/public/sdks/web/user-identity) and update their information.\n\n## Bind a hotkey to toggle search agent\n\nYou can bind the `toggleSearchAgent` method to a hotkey, such as `Cmd + K` (or `Ctrl + K` for Windows), to
Install PLuG search — DevRev | Docs
ART-982_KNOWLEDGE_NODE-5
be used to select a single page, a URL containing text, or a wildcard\n      The example rule above will only show the nudge when the exact URL is matched.\n      For wildcards, you can use the Contains operator\n      The Action can either launch a URL, launch the PLuG widget, or do nothing (e.g. notification only)\n    \n  \n  Validate preview\n  When satisfied, click on Publish\n  Enjoy your new nudge!\n\n\nAnalytics\n\nDevRev Nudges have full tracking including impressions, clicks, and more
DevRev Nudges - Driving Customer Engagement
ART-2897_KNOWLEDGE_NODE-19
10|     }  \n    11|   });  \n    12| }, []);\n[/code]  \n  \n## Toggle search agent\n\nThe `toggleSearchAgent` method allows you to control the visibility of the search agent.\n\nIf no input is provided, the method toggles the search bar: opening it if it\xe2\x80\x99s closed, and closing it if it\xe2\x80\x99s open.\n\n[code]\n\n    1| window.plugSDK.toggleSearchAgent(true);  \n    ---|---\n[/code]  \n  \n## Check Search Agent status\n\nUse `isSearchAgentOpen` to determine whether the search
Methods — DevRev | Docs
ART-15509_KNOWLEDGE_NODE-18
window.plugSDK.initSearchAgent(); |\n| 10 | } |\n| 11 | }); |\n| 12 | }, []); |\n```\n\nToggle search agent\n-------------------\n\nThe `toggleSearchAgent` method allows you to control the visibility of the search agent.\n\nIf no input is provided, the method toggles the search bar: opening it if it\xe2\x80\x99s closed, and closing it if it\xe2\x80\x99s open.\n\n```\n|  |  |\n| --- | --- |\n| 1 | window.plugSDK.toggleSearchAgent(true); |\n```\n\nCheck Search Agent
Methods | DevRev | Docs
ART-2063_KNOWLEDGE_NODE-29
following types of action are supported:\n   * *Redirect to URL*: You can provide a URL that your customers are redirected to when clicking on a nudge. It's helpful for sharing release notes, news, or blogs with your customers.\n   * *Open Widget*: Upon clicking on the nudge, the Plug widget opens to prompt the user to start a conversation. This is useful for informing customers about Plug cards and suggesting support options.\n   * *None*: When the user clicks on the nudge, nothing happens and
Nudges | Computer for Your Customers | DevRev