{"__v":1,"_id":"57b96d6b1d08500e00bf81dd","category":{"__v":0,"_id":"57b96d6b1d08500e00bf81d3","project":"54861bb654b3ce0b00367292","version":"57b96d6b1d08500e00bf81d1","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-12-08T21:55:25.679Z","from_sync":false,"order":1,"slug":"1-setup","title":"iOS / App Triggers"},"parentDoc":null,"project":"54861bb654b3ce0b00367292","user":"54861b9f3681d914006992a4","version":{"__v":7,"_id":"57b96d6b1d08500e00bf81d1","project":"54861bb654b3ce0b00367292","createdAt":"2016-08-21T08:59:23.326Z","releaseDate":"2016-08-21T08:59:23.326Z","categories":["57b96d6b1d08500e00bf81d2","57b96d6b1d08500e00bf81d3","57b96d6b1d08500e00bf81d4","57b96d6b1d08500e00bf81d5","57b96d6b1d08500e00bf81d6","57b96d6b1d08500e00bf81d7","57b96d6b1d08500e00bf81d8","57b96d6b1d08500e00bf81d9","57b96d6b1d08500e00bf81da","57b96d6b1d08500e00bf81db","57b96d6b1d08500e00bf81dc","57b97748306b9b0e001dd53f","57d12c6c1227b40e0044908a","57d51ad68191880e008bb51b","57d52b5cf350090e00fe073e","57d5468a17b492170053a3f0","57df9df05927cb0e002bce1e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"","version_clean":"4.0.0","version":"4.0"},"updates":["5718c693c7b52619003f62c2"],"next":{"pages":[],"description":""},"createdAt":"2015-12-02T16:26:30.297Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"The following code represents the moment and can be created seperetely and called later on\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[ElastiCode showAppTrigger::::at:::\\\"Trigger name\\\"];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"ElastiCode .showAppTrigger(\\\"Trigger name\\\")\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\nReturn to the dashboard and create the right audiences and additional​ experiences for this moment\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Advance usage\"\n}\n[/block]\n** Programmatically close a moment**\nAlthough any dashboard action can achieve this, you can also programmatically close any moment, and learn if it was completed successfully\n\n\nCompletion with goal \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[ElastiCode endAppTriggerWithGoalConversion:YES];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"ElastiCode. endAppTriggerWithGoalConversion(true)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\nThe following completion block is available as well:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[ElastiCode endAppTriggerWithGoalConversion:YES \\n  afterDismissBlock:(dispatch_block_t)dissmissBlock];\\n\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"ElastiCode.endAppTriggerWithGoalConversion(completion: Bool, \\nafterDismissBlock: dispatch_block_t)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]","excerpt":"A walkthrough, support flow, tour and more","slug":"moments","type":"basic","title":"Launching app triggers"}

Launching app triggers

A walkthrough, support flow, tour and more

The following code represents the moment and can be created seperetely and called later on [block:code] { "codes": [ { "code": "[ElastiCode showAppTrigger:@\"Trigger name\"];", "language": "objectivec" }, { "code": "ElastiCode .showAppTrigger(\"Trigger name\")", "language": "swift" } ] } [/block] Return to the dashboard and create the right audiences and additional​ experiences for this moment [block:api-header] { "type": "basic", "title": "Advance usage" } [/block] ** Programmatically close a moment** Although any dashboard action can achieve this, you can also programmatically close any moment, and learn if it was completed successfully Completion with goal [block:code] { "codes": [ { "code": "[ElastiCode endAppTriggerWithGoalConversion:YES];", "language": "objectivec" }, { "code": "ElastiCode. endAppTriggerWithGoalConversion(true)", "language": "swift" } ] } [/block] The following completion block is available as well: [block:code] { "codes": [ { "code": "[ElastiCode endAppTriggerWithGoalConversion:YES \n afterDismissBlock:(dispatch_block_t)dissmissBlock];\n", "language": "objectivec" }, { "code": "ElastiCode.endAppTriggerWithGoalConversion(completion: Bool, \nafterDismissBlock: dispatch_block_t)", "language": "swift" } ] } [/block]