Haptik Docs

Haptik Docs

  • Tools
  • Integrations

›Advanced

  • Quick Start
  • Authentication
  • Advanced

    • Launch Message
    • Custom Button
    • SDK Methods
    • Customisation

    Support and Compatibility

    • Browser Support
    • Native Support

    Examples

    • Example: Always Open
    • Example: Multi Language

Launch Message

You can launch the Bot with a task or message on behalf of the user. Haptik provides the following methods for doing so.

launchTask(taskId, callback)

Launches the SDK and automatically sends specified taskId as a user message (The same message that would be sent if the user tapped on that task)

Params:

  • taskId <Number> The task id is specified in the tasks section of the bot builder (business manager)
  • callback <Function> (optional) The callback executes once the call completes. The callback function is executed with success boolean flag as a parameter indicating whether the call completed or failed.

launchMessage(message, callback, hidden)

Launches the SDK and automatically sends specific message as a user message. It can optionally be sent as a hidden user message

Params:

  • message <String> The message that is to be sent
  • callback <Function> (optional) The callback executes once the call completes. The callback function is executed with success boolean flag as a parameter indicating whether the call completed or failed.
  • hidden <Boolean> Whether to send the message as a hidden user message. A hidden message is not visible to the user but can be seen by the agent or bot
Last updated on 4/16/2021
← AuthenticationCustom Button →
Haptik Inc.
Tools
Conversation StudioSmart Agent ChatIntelligent Analytics
Integrations
iOS SDKAndroid SDKWeb SDKWhatsAppFacebookBot API
Others
HSLSLAExternal Agent Chat Tool
Copyright © 2021 Haptik Inc.