+ {/* Enable/Disable Toggle */}
+
+
+
+
+ Allow this workflow to be embedded on external websites
+
+
+
+
+
+ {isEnabled && (
+ <>
+
+
+ {/* Allowed Domains */}
+
+
+
+ {/* Domain Input */}
+
+
setNewDomain(e.target.value)}
+ onKeyPress={handleKeyPress}
+ />
+
+
+
+ {/* Domain List */}
+ {domains.length > 0 && (
+
+ {domains.map((domain, index) => (
+
+ {domain}
+
+
+ ))}
+
+ )}
+
+
+ {/* Embed Mode Selection */}
+
+
+
+
+
+
+
+
+ {/* Configuration based on mode */}
+
+
+
+ {embedMode === "floating" ? (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+ setButtonText(e.target.value)}
+ placeholder="Start Voice Call"
+ />
+
+ >
+ ) : (
+ <>
+
+
+
Integration Instructions
+
+ - • Add a div with id="dograh-inline-container" where you want the widget
+ - • The widget will render inside this container
+ - • You have full control over the container's styling
+ - • Call window.DograhWidget.start() to begin the call
+ - • Call window.DograhWidget.end() to end the call
+
+
+
+
+
Example React Component
+
+ {`export function DograhAgent() {
+ const [isCallActive, setIsCallActive] = useState(false);
+
+ useEffect(() => {
+ // Widget will auto-initialize when script loads
+ window.DograhWidget?.onCallStart(() => {
+ setIsCallActive(true);
+ });
+ window.DograhWidget?.onCallEnd(() => {
+ setIsCallActive(false);
+ });
+ }, []);
+
+ return (
+
+
Talk to Our Agent
+
+ {/* Widget renders here */}
+
+
+
+ );
+}`}
+
+
+
+ >
+ )}
+
+ {/* Preview for floating mode only */}
+ {embedMode === "floating" && (
+
+
+
+ )}
+
+
+
+
+ {/* Save Button */}
+
+
+
+
+ {/* Embed Script (shows after saving) */}
+ {embedToken && embedToken.is_active && (
+ <>
+
+
+
+
+
+
+
+
+ {embedToken.embed_script}
+
+
+
+ Add this script to your website's HTML to enable the voice widget.
+ Configuration changes will apply automatically without re-embedding.
+
+
+ >
+ )}
+ >
+ )}
+
+ )}
+