{"__v":8,"_id":"55b0cf69b3171b3700b15404","category":{"__v":2,"_id":"55afb28ec8a85321007a5462","pages":["55b0cf51f202b12100cda2ff","55b0cf69b3171b3700b15404"],"project":"559a61d2dbcfd20d00710b39","version":"559a61d2dbcfd20d00710b3c","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-07-22T15:11:10.650Z","from_sync":false,"order":11,"slug":"experiences","title":"Experiences"},"parentDoc":null,"project":"559a61d2dbcfd20d00710b39","user":"55a54dde9c32760d00ca78a8","version":{"__v":23,"_id":"559a61d2dbcfd20d00710b3c","project":"559a61d2dbcfd20d00710b39","createdAt":"2015-07-06T11:09:06.510Z","releaseDate":"2015-07-06T11:09:06.510Z","categories":["559a61d3dbcfd20d00710b3d","55a589ddaaf9cf1900114dd0","55a589e30f354f0d00fd0312","55a589ea80c8a30d00b323cc","55a589f6aaf9cf1900114dd1","55a58d4e80c8a30d00b323e6","55a8e7a227a17d21005251a2","55a93098cf45e1390093f351","55afb085f202b12100cd9e83","55afb22e902fd51700f5f8bf","55afb260902fd51700f5f8c2","55afb28ec8a85321007a5462","55afb294f202b12100cd9e95","55afb29b902fd51700f5f8c5","55afb2a1c8a85321007a5463","55afb2a7902fd51700f5f8c7","55afb2ad902fd51700f5f8c8","55afb2b5902fd51700f5f8ca","55b74b2131bccb190081bedc","55bb441b54f9640d006e6cf2","565711085cb2420d00d70071","5681681330018c0d006bf7ff","588f38b5923d610f00c72dad"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"Version 1.0","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-23T11:26:33.575Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":2,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"EnterPlaceTrigger\"\n}\n[/block]\nTriggered when a user has not previously entered the place, and the first beacon from any zone that compose the place is detected.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\":::at:::type\\\": \\\"EnterPlaceTrigger\\\",\\n  \\\"placeId\\\": \\\"8Q9mI6TyKhGXIMvlz1jr7g\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PlaceProximityTrigger\"\n}\n[/block]\nTriggered when a user gets in range of any beacon that belongs to the place and its proximity value changes to the indicated `proximity` for the first time.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"@type\\\": \\\"PlaceProximityTrigger\\\",\\n  \\\"placeId\\\": \\\"8Q9mI6TyKhGXIMvlz1jr7g\\\",\\n  \\\"proximity\\\": \\\"Near\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Proximity\",\n  \"body\": \"Valid proximity values are `Far`, `Near` and `Inmediate`, in descending order of distance to the beacon.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ExitPlaceTrigger\"\n}\n[/block]\nTriggered when the user has entered a place and then left. The place is considered as left when all the beacons within it are out of reach.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"@type\\\": \\\"ExitPlaceTrigger\\\",\\n  \\\"placeId\\\": \\\"8Q9mI6TyKhGXIMvlz1jr7g\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"EnterZoneTrigger\"\n}\n[/block]\nTriggered when a user has not previously entered the zone, and the first beacon that compose the zone is detected.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"@type\\\": \\\"EnterZoneTrigger\\\",\\n  \\\"zoneId\\\": \\\"8Q9mI6TyKhGXIMvlz1jr7g\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ZoneProximityTrigger\"\n}\n[/block]\nTriggered when a user gets in range of any beacon that belongs to the zone and its proximity value changes to the indicated ´proximity´ for the first time.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"@type\\\": \\\"ZoneProximityTrigger\\\",\\n  \\\"zoneId\\\": \\\"8Q9mI6TyKhGXIMvlz1jr7g\\\",\\n  \\\"proximity\\\": \\\"Near\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ExitZoneTrigger\"\n}\n[/block]\nTriggered when the user has entered a zone and then left. The zone is considered as left when all the beacons within it are out of reach.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"@type\\\": \\\"ExitZoneTrigger\\\",\\n  \\\"zoneId\\\": \\\"8Q9mI6TyKhGXIMvlz1jr7g\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"EnterBeaconTrigger\"\n}\n[/block]\nTriggered when a user has not previously entered the beacon range, and the beacon is detected.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"@type\\\": \\\"EnterBeaconTrigger\\\",\\n  \\\"beaconId\\\": \\\"8Q9mI6TyKhGXIMvlz1jr7g\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"BeaconProximityTrigger\"\n}\n[/block]\nTriggered when a user gets in range of a beacon and its proximity value changes to the indicated ´proximity´ for the first time.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"@type\\\": \\\"BeaconProximityTrigger\\\",\\n  \\\"zoneId\\\": \\\"8Q9mI6TyKhGXIMvlz1jr7g\\\",\\n  \\\"proximity\\\": \\\"Near\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ExitBeaconTrigger\"\n}\n[/block]\nTriggered when the user has entered a beacon's range and then left.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"@type\\\": \\\"ExitBeaconTrigger\\\",\\n  \\\"beaconId\\\": \\\"8Q9mI6TyKhGXIMvlz1jr7g\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"CustomTrigger\"\n}\n[/block]\nWhen checked, this trigger invokes an app-provided custom callback. The callback is invoked with a provided string attribute and returns a boolean value of whether the trigger has been activated or not.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"@type\\\": \\\"CustomTrigger\\\",\\n  \\\"customArgument\\\": \\\"CustomTriggerCallback\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"CompositeTrigger\"\n}\n[/block]\nA collection of triggers, fired when ALL children triggers are active.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"@type\\\": \\\"CompositeTrigger\\\",\\n  \\\"list\\\": [\\n    {\\n      \\\"@type\\\": \\\"ZoneProximityTrigger\\\",\\n      \\\"zoneId\\\": \\\"8Q9mI6TyKhGXIMvlz1jr7g\\\",\\n      \\\"proximity\\\": \\\"Near\\\"\\n    },\\n    {\\n      \\\"@type\\\": \\\"CustomTrigger\\\",\\n      \\\"customArgument\\\": \\\"CustomTriggerCallback\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"Defines when an experience is activated based on proximity.","slug":"triggers","type":"basic","title":"Triggers"}

Triggers

Defines when an experience is activated based on proximity.

[block:api-header] { "type": "basic", "title": "EnterPlaceTrigger" } [/block] Triggered when a user has not previously entered the place, and the first beacon from any zone that compose the place is detected. [block:code] { "codes": [ { "code": "{\n \"@type\": \"EnterPlaceTrigger\",\n \"placeId\": \"8Q9mI6TyKhGXIMvlz1jr7g\"\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "PlaceProximityTrigger" } [/block] Triggered when a user gets in range of any beacon that belongs to the place and its proximity value changes to the indicated `proximity` for the first time. [block:code] { "codes": [ { "code": "{\n \"@type\": \"PlaceProximityTrigger\",\n \"placeId\": \"8Q9mI6TyKhGXIMvlz1jr7g\",\n \"proximity\": \"Near\"\n}", "language": "json" } ] } [/block] [block:callout] { "type": "info", "title": "Proximity", "body": "Valid proximity values are `Far`, `Near` and `Inmediate`, in descending order of distance to the beacon." } [/block] [block:api-header] { "type": "basic", "title": "ExitPlaceTrigger" } [/block] Triggered when the user has entered a place and then left. The place is considered as left when all the beacons within it are out of reach. [block:code] { "codes": [ { "code": "{\n \"@type\": \"ExitPlaceTrigger\",\n \"placeId\": \"8Q9mI6TyKhGXIMvlz1jr7g\"\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "EnterZoneTrigger" } [/block] Triggered when a user has not previously entered the zone, and the first beacon that compose the zone is detected. [block:code] { "codes": [ { "code": "{\n \"@type\": \"EnterZoneTrigger\",\n \"zoneId\": \"8Q9mI6TyKhGXIMvlz1jr7g\"\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "ZoneProximityTrigger" } [/block] Triggered when a user gets in range of any beacon that belongs to the zone and its proximity value changes to the indicated ´proximity´ for the first time. [block:code] { "codes": [ { "code": "{\n \"@type\": \"ZoneProximityTrigger\",\n \"zoneId\": \"8Q9mI6TyKhGXIMvlz1jr7g\",\n \"proximity\": \"Near\"\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "ExitZoneTrigger" } [/block] Triggered when the user has entered a zone and then left. The zone is considered as left when all the beacons within it are out of reach. [block:code] { "codes": [ { "code": "{\n \"@type\": \"ExitZoneTrigger\",\n \"zoneId\": \"8Q9mI6TyKhGXIMvlz1jr7g\"\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "EnterBeaconTrigger" } [/block] Triggered when a user has not previously entered the beacon range, and the beacon is detected. [block:code] { "codes": [ { "code": "{\n \"@type\": \"EnterBeaconTrigger\",\n \"beaconId\": \"8Q9mI6TyKhGXIMvlz1jr7g\"\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "BeaconProximityTrigger" } [/block] Triggered when a user gets in range of a beacon and its proximity value changes to the indicated ´proximity´ for the first time. [block:code] { "codes": [ { "code": "{\n \"@type\": \"BeaconProximityTrigger\",\n \"zoneId\": \"8Q9mI6TyKhGXIMvlz1jr7g\",\n \"proximity\": \"Near\"\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "ExitBeaconTrigger" } [/block] Triggered when the user has entered a beacon's range and then left. [block:code] { "codes": [ { "code": "{\n \"@type\": \"ExitBeaconTrigger\",\n \"beaconId\": \"8Q9mI6TyKhGXIMvlz1jr7g\"\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "CustomTrigger" } [/block] When checked, this trigger invokes an app-provided custom callback. The callback is invoked with a provided string attribute and returns a boolean value of whether the trigger has been activated or not. [block:code] { "codes": [ { "code": "{\n \"@type\": \"CustomTrigger\",\n \"customArgument\": \"CustomTriggerCallback\"\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "CompositeTrigger" } [/block] A collection of triggers, fired when ALL children triggers are active. [block:code] { "codes": [ { "code": "{\n \"@type\": \"CompositeTrigger\",\n \"list\": [\n {\n \"@type\": \"ZoneProximityTrigger\",\n \"zoneId\": \"8Q9mI6TyKhGXIMvlz1jr7g\",\n \"proximity\": \"Near\"\n },\n {\n \"@type\": \"CustomTrigger\",\n \"customArgument\": \"CustomTriggerCallback\"\n }\n ]\n}", "language": "json" } ] } [/block]