en DE RU
Request Demo
x
Bloomreach Acquires Exponea. Learn more

Table of Contents
    Listen this article on:

    Slack integration

    Jun 10, 2016 Jozo Kovac 3 min read

    Slack has become very popular in business community. And of the most powerful features of Slack is integration with all kinds of other tools. Here’s a quick guide how to simply send messages from Exponea to a channel on Slack.


    Requirements
    Before you start, make sure you have all these in place:

    • Have an active Slack team/account (Create)
    • Have an active Exponea account (Create)
    • Have some custom events already in Exponea (Tracking guide)

    Sample use-case: Tracking new registrations
    There are many information you could send to a Slack channel. As we are in a growth stage, one of the most important performance indicators for us are new registrations. Moreover, if we see that a new user has registered, our consultants can immediately react and offer him or her support. We already tracked registration event on submit of registration form (see here), so it was easy to set up the whole thing.

    • In your Exponea project select “Campaigns” > “Scenarios” > “Create new”
    • Add “On event”, open it (double click) and select “Registration” event
    • Add “Webhook” and connect “On event registration” to “Unnamed webhook”

    Scenario
    Now we need URL for Slack webhook and content to be sent. Slack has nice guide about incoming webhooks and they also explain JSON in the document.

    • Create a webhook URL in Slack for existing or new channel
    • Open “Unnamed webhook” in a scenario, give it a name, switch to “Per Customer”
    • Copy&paste the “Webhook URL” from Slack to “Endpoint URL” in Exponea
    • Create a content (equivalent to “payload” in Slack)

    New webhook
    Testing
    If you save and execute scenario then after new each new registration you’ll receive a new message to your Slack channel from Slack bot.
    If you need to trigger the event faster, you can do it from console on your website. Open Javascript console and type: exponea.track(‘registration’). It will trigger message in Slack.
    Scheduling
    You could change a flow to send message immediately. “Now” trigger would send message to all customers in Exponea. To avoid spam add “Condition” and select “email” equals “your own email”. Connect “Condition” to “Webhook” and execute scenario. Message will be sent only once and immediately.
    Similarly you could schedule sending messages to once per day/week by using “Repeat trigger”. Again don’t forget to use condition and limit customers.
    Content personalization
    Slack comes with nice features to customize messages:

    • “username”: “Exponea Registration Bot” – will change name of Slack user who sends messages
    • “icon_url”: “”icon_url”: “http://cdn0.capterra-static.com/logos/150/2106461.png” – changes user’s icon
    • “icon_emoji”: “:ghost:” – uses emoji as user’s icon
    • “channel”: “:ghost:” – sends message to specified channels instead of to default

    Exponea enables to personalise messages even further:

    • Customer attribute can be used to include data about customer who triggered campaign (e.g. customer.email)
    • Triggered event can be used to include attributes from event what triggered campaign (e.g. registration.source)
    • Metrics can be used to include statistics about your company, e.g. # of users registered last month

    Example:

    {"text": "{{ event.email }} has registered on {# instance_id #}{{ aggregates['5742f3428304341843aa91fb'] }}. {# # new registrations today #}{{ metrics['57599796fb6009610c3fa35f'] }} registration today. {% if event.promo_code %} Promo code:{{ event.promo_code }}.{% endif %} {% if aggregates['5759971bfb6009610c3fa35d'] %} Source: {# UTM_Campaign #}{{ aggregates['5759971bfb6009610c3fa35d']  }}. {% endif %}",  "username": "Registration",  "icon_url": "http://cdn0.capterra-static.com/logos/150/2106461.png"}

    Putting it all together in a scenario designer
    Exponea view scenario with Slack

    Result will looks like this:
    Screen Shot 2016-06-10 at 14.09.36
    Quiz: What have I done wrong and why I’ve spammed our Slack channel for last two days? Answer is in a screenshot above. I will rewards the first answer (email me now) with a bottle of sweet Tokaj wine or a copy Lean Startup book. Will publish the winner’s name here. It’s still open!

    Watch Exponea demo video!
    Explore the Customer Data & Experience Platform B2C Leaders Love to Use

    MISSGUIDED Victoria Beckham Desigual
    ebuyer River Island

    We rely on cookies

    to optimize our communication and to enhance your customer experience. By clicking on the Accept and Close button, you agree to the collection of cookies. You can also adjust your preferences by clicking on Manage Preferences. For more information please see our Privacy policy.

    Manage cookies
    Accept & close

    Cookies preferences

    Accept & close
    Back
    X
    We use cookies to optimize our communication and to enhance your customer experience. We also share information about how you use our website with our third parties including social plugins and analytics. You consent to our use of cookies if you continue to browse our website. You can opt out of our cookie use on the Do not Sell my Personal Information page. For more information please see our Privacy Policy.
    Subscribe