Skip to content

Commit 7f6c18d

Browse files
author
markzegarelli
committed
render handlebar samples as raw
1 parent dd7b2c0 commit 7f6c18d

File tree

1 file changed

+11
-5
lines changed
  • src/connections/destinations/catalog/slack

1 file changed

+11
-5
lines changed

src/connections/destinations/catalog/slack/index.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ By default, your `identify` calls will not be sent through to Slack unless you h
3333
### Identify Template
3434
Once you've saved your whitelisted traits, you can now use them alongside [Handlebars expressions](http://handlebarsjs.com/expressions.html) syntax within a template. Make sure you reference the spec for the [Identify method](/docs/connections/spec/identify/) and [common object](/docs/connections/spec/common/). `Identify` events that contain the whitelisted `traits` will appear as a Slack message with the following default template:
3535
```
36-
Identified user \{{name}}. \n\{{traits}}
36+
{% raw %}
37+
Identified user {{name}}. \n\{{traits}}
38+
{% endraw %}
3739
```
3840
where "name" is the first found of the following:
3941
* `context.traits.name`
@@ -77,9 +79,13 @@ If you would like to have specific events be sent to a particular channel (#chan
7779
### Event Templates
7880
Event templates also use [Handlebars expressions](http://handlebarsjs.com/expressions.html) syntax. Make sure you reference the spec for the [Track method](/docs/connections/spec/track/) and [common object](/docs/connections/spec/common/). `Track` events will trigger a Slack message with the following default template:
7981

80-
`'\{{name}} did \{{event}}.'`
82+
```
83+
{% raw %}
84+
{{name}} did {{event}}.
85+
{% endraw %}
86+
```
8187

82-
where "event" is the event name and "name" is found with the same logic as that of the "name" in the [Identify template](/docs/connections/destinations/catalog/slack/#identify-template).
88+
"event" is the event name and "name" is found with the same logic as that of the "name" in the [Identify template](/docs/connections/destinations/catalog/slack/#identify-template).
8389

8490
The basic Track structure:
8591

@@ -127,5 +133,5 @@ The Slack Destination does not support `page` or `group` calls. Only `track` eve
127133

128134
In order for `identify` events to work, make sure you [whitelist the traits](/docs/connections/destinations/catalog/slack/#whitelisted-traits).
129135

130-
### I'm seeing [object Object] in my Slack message
131-
If you try to print an object (eg., `\{{properties}}`), you will see [object Object] in Slack. Drill down to a primitive type value (eg., `properties.plan`).
136+
### I see [object Object] in my Slack message
137+
If you try to print an object (for example, {% raw %} `{{properties}}` {% endraw %} ), you will see [object Object] in Slack. Drill down to a primitive type value (for example, `properties.plan`).

0 commit comments

Comments
 (0)