Search Agent configuration in acme
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-1466_KNOWLEDGE_NODE-26
agent.\n\nCalling the initSearchAgent() method sets up the PLuG search agent on your website. This initialization is required before performing any other actions with the PLuG widget SDK.\n\n1 useEffect ( () => { 2 window. plugSDK. init ( { 3 app_id : \' <your_unique_app_id> \' , 4 disable_plug_chat_window : true , 5 } ) ; 6 7 window. plugSDK. onEvent ( ( payload ) => { 8 if ( payload. type === \' ON_PLUG_WIDGET_READY \' ) { 9 window. plugSDK. initSearchAgent () ; 10 } 11 } ) ; 12 } , []) ;
Methods — DevRev | Docs
ART-2897_KNOWLEDGE_NODE-18
search agent on your website. This initialization is required before performing any other actions with the PLuG widget SDK.\n\n[code]\n\n    1| useEffect(() => {  \n    ---|---  \n    2|   window.plugSDK.init({  \n    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
Methods — DevRev | Docs
ART-2894_KNOWLEDGE_NODE-4
2|     window.plugSDK.init({  \n    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[/code]  \n  \nTo toggle `searchAgent`, call the following method on any event required:\n\n[code]\n\n
Install PLuG search — DevRev | Docs
ART-2897_KNOWLEDGE_NODE-20
agent is currently open or closed.\n\n[code]\n\n    1| window.plugSDK.isSearchAgentOpen  \n    ---|---\n[/code]  \n  \nThis returns `true` if the search agent is open and `false` if it is closed.\n\n## Prefill search query in search agent\n\nUse the `prefillSearchQuery` method to prefill a search query when opening and initializing the search agent.\n\n[code]\n\n    1| window.plugSDK.prefillSearchQuery("search_query");  \n    ---|---\n[/code]  \n  \n## Add session properties\n\nThe
Methods — DevRev | Docs
ART-1466_KNOWLEDGE_NODE-27
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\n1 window. plugSDK. toggleSearchAgent ( true ) ; Prefill search query in search agent.\n\nUse the prefillSearchQuery method to prefill a search query when opening and initializing the search agent.\n\n1 window. plugSDK. prefillSearchQuery ( "
Methods — DevRev | Docs
ART-15509_KNOWLEDGE_NODE-17
the `initSearchAgent()` method sets up the Plug search agent on your website. This initialization is required before performing any other actions with the Plug widget SDK.\n\n```\n|  |  |\n| --- | --- |\n| 1 | useEffect(() => { |\n| 2 | window.plugSDK.init({ |\n| 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 |
Methods | DevRev | Docs
ART-1270_KNOWLEDGE_NODE-3
might get a warning message from window.plugSDK.init() being called multiple times. These errors won\xe2\x80\x99t impact the installation and functioning of the widget.\n\nInitialize search.\n\nCalling the initSearchAgent() method initializes the PLuG Search agent on your website. Initializing search is necessary for you to perform any other actions on the PLuG widget SDK.\n\n1 useEffect ( () => { 2 window. plugSDK. init ( { 3 app_id : \' <your_unique_app_id> \' , 4 disable_plug_chat_window :
Methods — DevRev | Docs
ART-15490_KNOWLEDGE_NODE-2
Copy your **Unique App ID** from the **Configuration tab**.\n\n###### Setup\n\n###### Setup for React\n\nPlace the following code in the `<head>` section of your HTML page:\n\n```\n|  |  |\n| --- | --- |\n| 1 | <script |\n| 2 | src="https://plug-platform.devrev.ai/static/plug.js" |\n| 3 | type="text/javascript"> |\n| 4 | </script> |\n```\n\nPlace the following code in the `<body>` section of your HTML page:\n\n```\n|  |  |\n| --- | --- |\n| 1 | <script> |\n| 2 | window.plugSDK.init({ |\n| 3 |
Install Plug search | DevRev | Docs