Search code examples
telegram-botzendesksmooch

Proactive message using smooch telegram and zendesk


I need to contact my userbase using telegram via smooch, the flow is:

  • send a message to users with the bot link
  • the user clicks the link and accepts to receive messages from the bot
  • using smooch webhook, I need to recognize the user on my system so, I need to pass a parameter in the bot link.

Is possible to do this?


Solution

  • UPDATE OCT-7: the fix has been introduced! You will now get back the referral code in the conversation:start webhook that you specified in the link

    example: https://telegram.me/my_amazing_smooch_bot?start=myParameter

    This will show up in the property referral.code like in the sample below

    UPDATE OCT-4: we will introduce the fix early next week (probably Tuesday Oct 8) and you will have the property referral as shown in the webhook below

    {
        "trigger": "conversation:start",
        "app": {
            "_id": "5d83cd561848924fe36ccb22"
        },
        "version": "v1.1",
        "source": {
            "type": "telegram",
            "integrationId": "5d97392ee784e3586d8f41b8"
        },
        "appUser": {
            "_id": "6c7cf3f8d64c3d996d06c8dd",
            "conversationStarted": true,
            "givenName": "Bobby",
            "signedUpAt": "2019-10-04T16:54:01.550Z",
            "properties": {}
        },
        "timestamp": 1570214057.443,
        "conversation": {
            "_id": "af62c3a0450401ee1bf0f0f1"
        },
        "referral": {
            "code": "myParameter"
        }
    }
    

    The way you would do this is by specifying the parameter like so :

    https://telegram.me/my_amazing_smooch_bot?start=myParameter

    Unfortunately, we currently swallow this parameter and the conversation:start webhook we send does not forward the parameter back to you

    I will get back to you regarding this 'fix' we needs to make on our end to accommodate this use case

    Thank you!

    Bobby Connolly Zendesk Inc.