# Methods

API methods helps you implement custom behaviors.

# group

You can set visitor's group.

<script>
  smartsupp('group', '<GROUP_ID>');
</script>

# chat:show

Show chat box.

<script>
	smartsupp('chat:show');
</script>

You can use it inside html:

<img onclick="smartsupp('chat:show');">
<a href="#" onclick="smartsupp('chat:show'); return false;">Chat with us</a>

# chat:hide

Hide chat box.

<script>
	smartsupp('chat:hide');
</script>

# chat:open

Open chat box.

<script>
	smartsupp('chat:open');
</script>

You can use it inside html:

<img onclick="smartsupp('chat:open');">
<a href="#" onclick="smartsupp('chat:open'); return false;">Chat with us</a>

# chat:close

Close chat box.

<script>
	smartsupp('chat:close');
</script>

# chat:message

Set pre-filled message in chat box (text is not sent).

<script>
	smartsupp('chat:message', 'Hello, can you help me with...');
</script>