Integrating Noibu HelpCode with Gorgias Chat

Last updated: September 9, 2026

Overview This guide explains how to integrate Noibu’s HelpCode™ functionality directly within the Gorgias chat window. Once set up, the HelpCode™ is submitted automatically inside the chat, so there is no need to ask customers to click a button or take any additional action.


Step 1: Implement the Noibu HelpCode™ script Deploy the following script using the tag manager of your choice (for example, Google Tag Manager)

<script>
    const initGorgias = (window.GorgiasChat?.init) 
        ? window.GorgiasChat.init() 
        : new Promise(res => window.addEventListener('gorgias-widget-loaded', res));

    initGorgias.then(() => {
        const syncNoibu = async () => {
            try {
                const helpCode = await window.NOIBUJS?.requestHelpCode?.(false);
                const storedCode = localStorage.getItem('nb_sent_perm');

                // 1. Only proceed if we have a new code
                if (helpCode && helpCode !== storedCode) {
                    
                    // 2. 500ms delay
                    setTimeout(() => {
                        if (window.GorgiasChat.sendMessage) {
                            window.GorgiasChat.sendMessage("Noibu Helpcode: " + helpCode);
                            
                            // 3. Mark as sent to prevent duplicates
                            localStorage.setItem('nb_sent_perm', helpCode);
                        }
                    }, 500); 
                }
            } catch (err) {
	            //Fail Silently
            }
        };

        // Trigger on both sent (human) and received (bot) messages
        window.GorgiasChat.on('message:sent', syncNoibu);
        window.GorgiasChat.on('message:received', syncNoibu);
    });
</script>

Step 2: Script Placement

To ensure Noibu can properly submit the HelpCode™ within the widget, place the script after the primary Gorgias snippet.

  • Step 1: Locate the Gorgias embed script in the <head> or <body>.

  • Step 2: Insert the Noibu script.

  • Step 3: Validate that the GorgiasChat object is defined before calling Noibu functions.

  • Step 4: Confirm there are no ‘GorgiasChat is not defined’ or related errors in the console.

  • Step 5: Create a test support chat to confirm the HelpCode™ appears in the transcript.


Watch the walkthrough

Prefer to see it in action? The short video below walks through the integration to help you understand it better: ​