{"_id":"5614eaac8113d20d00082e6d","category":{"_id":"55b7d0e5568be2230092bb92","project":"53844557a43e08da4677be0e","version":"53844558a43e08da4677be12","pages":["55b7f917568be2230092bc55","55b800e2568be2230092bc85","55b83216d9caa30d001aae38","55b8324ad9caa30d001aae3a","55d3a5bac336ec0d007c222b","55d7732f4ad876170027fa1d"],"__v":6,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-28T18:58:45.698Z","from_sync":false,"order":2,"slug":"inbox-by-knowtify-in-app-notifications","title":"InBox by Knowtify - In-app Notifications"},"project":"53844557a43e08da4677be0e","version":{"_id":"53844558a43e08da4677be12","__v":8,"project":"53844557a43e08da4677be0e","createdAt":"2014-05-27T07:57:12.136Z","releaseDate":"2014-05-27T07:57:12.136Z","categories":["53844558a43e08da4677be13","538619e1ef91f96d49aa1a0b","541e82877eb16bb64f83c0ca","5445a073c3eb3808000c76b2","5445a098c3eb3808000c76b3","54bb05ab522f03150054d9e8","54bb05cf9741c81500078f73","55b7d0e5568be2230092bb92"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"false","version_clean":"1.0.0","version":"1.0"},"__v":0,"user":"5384345d90c19d5e43a8170c","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-07T09:49:32.411Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"STEP ONE - Turn on your Knowtify integration via Segment\"\n}\n[/block]\nTo learn more about how our Segment integration works, you can read [here](http://api.knowtify.io/docs/segmentio). \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/NPsBYaj2Qqa0qzBlKAaR_skitch.png\",\n        \"skitch.png\",\n        \"288\",\n        \"105\",\n        \"#5ecc5e\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nThis will start shipping all your Segment events to Knowtify. As users use your application, contact records will be created in Knowtify and data from any events they trigger will be recorded under those user profiles.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"STEP TWO - Create an InBox Notification template in Knowtify\"\n}\n[/block]\nCreate a new InBox message and select Event as your trigger.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/yCt2pAmeSc2RemY2iHan_skitch.png\",\n        \"skitch.png\",\n        \"1276\",\n        \"708\",\n        \"#4086cb\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nYou will use our InBox Message designer to create a template for your notification.\n\nYou will be inserting {merge_tags} for any variable, personalized content that will be contained in the event data. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/1hUQ6U63RdSPE8PJAf0b_skitch.png\",\n        \"skitch.png\",\n        \"1276\",\n        \"704\",\n        \"#4d84be\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"STEP THREE - Tag your template with the name of the Segment event\"\n}\n[/block]\nIn your .track call, you will have a name of the event. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"  analytics.track('new_job_request', {\\n        category: 'Action',\\n        requester_name: 'Sally Knowne',\\n        job_name: 'Babysitting'\\n      });\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nIn this case, it's 'new_job_request'.\n\nYou will simply enter this event name in the Event Tag box on the Delivery tab of your message template. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/otg34AjaSoWzbvPm0ENf_skitch.png\",\n        \"skitch.png\",\n        \"1276\",\n        \"544\",\n        \"#4482c0\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nThis tells Knowtify to ship this message every time this event occurs. The message is delivered to whatever user* is referenced in the .track call. \n\n*This means if you want a message delivered to a user that didn't actually trigger the event (for example, a user requested a job, but you want an email to go out to the person who will fulfill the job), then you need to have a .track event referencing that other user.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"STEP FOUR (Optional) - Set rules for your notification\"\n}\n[/block]\nIf you want, you can create rules to filter who should receive your notifications (ie - only people with a user-type of Admin, or only people who haven’t logged in in 2 days, etc), you can do that here as well. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/eIOI1PRIQeqr05qSXmz2_skitch.png\",\n        \"skitch.png\",\n        \"1276\",\n        \"777\",\n        \"#4c7cae\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"STEP FIVE - Turn notification LIVE\"\n}\n[/block]\nOnce you are ready, you can turn your notification LIVE and it will begin delivering as soon as those events are triggered. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/siu9ite4TrSj1WTtVEBs_skitch.png\",\n        \"skitch.png\",\n        \"1276\",\n        \"489\",\n        \"#4281c1\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"A quick guide for shipping in-app notifications through InBox directly from your Segment integration.","slug":"inbox-notifications-with-segment","type":"basic","title":"INBOX NOTIFICATIONS WITH SEGMENT"}

INBOX NOTIFICATIONS WITH SEGMENT

A quick guide for shipping in-app notifications through InBox directly from your Segment integration.

[block:api-header] { "type": "basic", "title": "STEP ONE - Turn on your Knowtify integration via Segment" } [/block] To learn more about how our Segment integration works, you can read [here](http://api.knowtify.io/docs/segmentio). [block:image] { "images": [ { "image": [ "https://files.readme.io/NPsBYaj2Qqa0qzBlKAaR_skitch.png", "skitch.png", "288", "105", "#5ecc5e", "" ] } ] } [/block] This will start shipping all your Segment events to Knowtify. As users use your application, contact records will be created in Knowtify and data from any events they trigger will be recorded under those user profiles. [block:api-header] { "type": "basic", "title": "STEP TWO - Create an InBox Notification template in Knowtify" } [/block] Create a new InBox message and select Event as your trigger. [block:image] { "images": [ { "image": [ "https://files.readme.io/yCt2pAmeSc2RemY2iHan_skitch.png", "skitch.png", "1276", "708", "#4086cb", "" ] } ] } [/block] You will use our InBox Message designer to create a template for your notification. You will be inserting {merge_tags} for any variable, personalized content that will be contained in the event data. [block:image] { "images": [ { "image": [ "https://files.readme.io/1hUQ6U63RdSPE8PJAf0b_skitch.png", "skitch.png", "1276", "704", "#4d84be", "" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "STEP THREE - Tag your template with the name of the Segment event" } [/block] In your .track call, you will have a name of the event. [block:code] { "codes": [ { "code": " analytics.track('new_job_request', {\n category: 'Action',\n requester_name: 'Sally Knowne',\n job_name: 'Babysitting'\n });", "language": "javascript" } ] } [/block] In this case, it's 'new_job_request'. You will simply enter this event name in the Event Tag box on the Delivery tab of your message template. [block:image] { "images": [ { "image": [ "https://files.readme.io/otg34AjaSoWzbvPm0ENf_skitch.png", "skitch.png", "1276", "544", "#4482c0", "" ] } ] } [/block] This tells Knowtify to ship this message every time this event occurs. The message is delivered to whatever user* is referenced in the .track call. *This means if you want a message delivered to a user that didn't actually trigger the event (for example, a user requested a job, but you want an email to go out to the person who will fulfill the job), then you need to have a .track event referencing that other user. [block:api-header] { "type": "basic", "title": "STEP FOUR (Optional) - Set rules for your notification" } [/block] If you want, you can create rules to filter who should receive your notifications (ie - only people with a user-type of Admin, or only people who haven’t logged in in 2 days, etc), you can do that here as well. [block:image] { "images": [ { "image": [ "https://files.readme.io/eIOI1PRIQeqr05qSXmz2_skitch.png", "skitch.png", "1276", "777", "#4c7cae", "" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "STEP FIVE - Turn notification LIVE" } [/block] Once you are ready, you can turn your notification LIVE and it will begin delivering as soon as those events are triggered. [block:image] { "images": [ { "image": [ "https://files.readme.io/siu9ite4TrSj1WTtVEBs_skitch.png", "skitch.png", "1276", "489", "#4281c1", "" ] } ] } [/block]