Customer Agent

Script entry

Browser global exposed by the Customer Agent script SDK.

The script entry is the browser-global version of the SDK. It exposes one global, window.CustomerAgent, which is both a command function and a method namespace.

window.CustomerAgent: CustomerAgentGlobal

Command Forms

FormShapeReturn
Command callwindow.CustomerAgent(command, ...args)Command-specific return value.
Method callwindow.CustomerAgent.boot(options)Method-specific return value.

The command names and method names match the JavaScript SDK reference.

Script Attributes

When the script element has data-app-id, the SDK boots the Messenger from script attributes.

<script async src="https://cdn.example.com/customer-agent/v1/sdk.js" data-app-id="app_123"></script>
AttributeTypeEffect
data-app-idstringSets CustomerAgentOptions.app_id.
data-open"true" | "false"Sets open_on_init; only "true" opens.
data-position"bottom-right" | "bottom-left"Sets default launcher position.

Global API

window.CustomerAgent supports the same command form and methods as the ESM SDK.

APIReference
MethodsJavaScript SDK
OptionsOptions
EventsEvents

On this page