Reference
Name | Type | Default | Description |
---|---|---|---|
publicKey | string | The public key of your workspace. You need to go to your workspace settings to get this key. | |
pullInterval | number | undefined | 60000 | The time, in milliseconds, for the Messenger to wait before pulling the latest changes from the server. This acts as a fallback in case the component's websocket doesn't work. |
authOptions | AuthOptions | undefined | You can pass your user's information here or leave it blank for usage in guest mode. More information. | |
viewOptions | ViewOptions | undefined | Options for customizing the Messenger's appearance and content. More information. |
AuthOptions
Name | Type | Default | Description |
---|---|---|---|
user | User | undefined | Your signed in User's information. Use your auth provider to get this information. | |
anonymousSignedInDuration | number | undefined | 7 | The time, in days, for how long a guest's information is kept in their local storage. |
User
Name | Type | Default | Description |
---|---|---|---|
id | string | The unique identifier of the user. Use the one from your auth provider as it will used for future updates to their personal information. Internally, this id is indexed with the workspace ID, so there is no danger of conflicts in case this same user is used in multiple workspaces in Makkuro. | |
name | string | Your user's full name. | |
email | string | Your user's email address. It's ok if it changes, we always use the ID to identify the user. | |
photoUrl | string | undefined | Your user's avatar. If not provided, we'll just render a generic anonymous figure. |
ViewOptions
Name | Type | Default | Description |
---|---|---|---|
brandColor | string | undefined | #000000 | This will update the background color of the header and the color of the send button. Other types, such as rgba and hsl, are also supported. |
header | HeaderViewOptions | React.JSX.Element | null | undefined | Customization options for the header. Passing a React JSX Element will render your component instead and using | |
panels | ( PanelConversations
|
PanelLinks
|
PanelCard
)[] | Panels are the white boxes that contain content in the Messenger and you can completely customize them. If nothing is provided ( |
HeaderViewOptions
Name | Type | Default | Description |
---|---|---|---|
title | string | The title that shows at the top of the Messenger. Usually contains a greeting. | |
description | string | The short text under this title where you can provide more information about your reply times, or time of operation. There is no limit to the length of this text. | |
avatars | AgentAvatar[] | undefined | Avatars that are shown on the right side of the header. These are usually the agents that are currently online and you would currently need to provide them statically. |
AgentAvatar
Name | Type | Default | Description |
---|---|---|---|
photoUrl | string | The URL of the agent's avatar. | |
name | string | The name of the agent, used only for the alt text of the image. |
PanelConversations
Name | Type | Default | Description |
---|---|---|---|
type | conversations | You only need to provide this static property to render the conversations panel. |
PanelLinks
Name | Type | Default | Description |
---|---|---|---|
type | links | This static property will help Makkuro understand that a panel with links needs to be rendered. | |
content | LinkPanelContent | The content of the links panel. |
LinkPanelContent
Name | Type | Default | Description |
---|---|---|---|
title | string | undefined | An optional title for the links panel. | |
links | LinkProps | The content of the links panel. |
LinkProps
Name | Type | Default | Description |
---|---|---|---|
href | string | The URL of the link. | |
label | string | The text that will be shown as the link. | |
target | string | undefined | The target attribute of the link. | |
icon | React.JSX.Element | undefined | An optional icon that will be shown before the label. |
PanelCard
Name | Type | Default | Description |
---|---|---|---|
type | card | This static property will help Makkuro understand that a panel with a card needs to be rendered. | |
content | CardPanelContent | The content of the card panel. |
CardPanelContent
Name | Type | Default | Description |
---|---|---|---|
image | Image | undefined | The image that will be shown on the top of the card. | |
title | string | The title of the card. | |
description | string | The description of the card. | |
readMore | LinkProps (without the icon ) | undefined | An optional link that will be shown at the bottom of the card. |
Image
Name | Type | Default | Description |
---|---|---|---|
src | string | The URL of the image. | |
alt | string | The alt text of the image. |
NotificationOptions
Name | Type | Default | Description |
---|---|---|---|
notificationSound | string | null | undefined | [path_to_chime_sound.mp3] | This will update the notification sound. If a |
pageTitle | string | null | undefined | [You have a new message] | This will update the page title of the Messenger's window tab. If a |