{"_id":"55a44d8b1fd6fb0d00d6fb2a","project":"53844557a43e08da4677be0e","user":"5384345d90c19d5e43a8170c","__v":6,"category":{"_id":"53844558a43e08da4677be13","pages":["53844558a43e08da4677be14","54211ad2f980dee664db9fc5","54212689f980dee664db9fc9","5421d851f980dee664db9ffe","54504d643c6f700800a9b4de","548f7589a8f6730b004b34b3","554a9af6b4322819002b6a1b","55a44d8b1fd6fb0d00d6fb2a"],"project":"53844557a43e08da4677be0e","version":"53844558a43e08da4677be12","__v":14,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-05-27T07:57:12.144Z","from_sync":false,"order":0,"slug":"general-api-documentation","title":"General API Documentation"},"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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-13T23:45:15.354Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"Knowtify supports various types of data that can be used to segment your messages or as content to insert into your messages. These data types can be managed on the Data tab of your account.\n\nThe data types we support include:\n\n- Strings\n- Numbers\n- Dates\n- Enumerated (coming soon)\n- [Nested](http://api.knowtify.io/docs/nested-data-structrues) \n\nEach one of these different data-types drive different logic in the Knowtify rule setting engine. \n\nKnowtify automatically assigns each piece of data a Type upon receiving it. If you would ever like to change the data type for any one of your keys, you can do so on the Data tab of your account.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Dates\"\n}\n[/block]\nWhen you ship over Dates as data points, you will be able to use the following operators in your segmentation:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/If3MqEoDRVaWim0A4EOX_skitch.png\",\n        \"skitch.png\",\n        \"534\",\n        \"284\",\n        \"#406491\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n*=*:               Equals. Use this to target a specific date. You must use the proper format (see below)\n*&#x2260;*:           Does not equal (see proper format)\n**>**:                  Greater than. This is to specify any date AFTER a specific date (see proper format)\n**<**:                   Less than. This is to specify any date BEFORE a specific date (see proper format)\n**days ago**:       An exact number of days since that date.\n**greater than days ago**:      This will segment contacts who's activity took place X days more than the date in this data point.\n**less than days ago**:          This will segment contacts who's activity took place X days less than the date in this data point.\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"ACCEPTED FORMAT FOR DATES\",\n  \"body\": \"In order to use dates in Knowtify, they have to be formatted one of two ways:\\n\\nyyyy-mm-dd\\n\\nOR\\n\\nyyyy-mm-dd hh:mm:ss\\n\\nIf you do not use one of these formats, you will not be able properly segment contacts or set rules based on this value in Knowtify.\"\n}\n[/block]","excerpt":"Some information on the supported formats of certain kind of data","slug":"data-formats","type":"basic","title":"DATA TYPES & FORMATS"}

DATA TYPES & FORMATS

Some information on the supported formats of certain kind of data

Knowtify supports various types of data that can be used to segment your messages or as content to insert into your messages. These data types can be managed on the Data tab of your account. The data types we support include: - Strings - Numbers - Dates - Enumerated (coming soon) - [Nested](http://api.knowtify.io/docs/nested-data-structrues) Each one of these different data-types drive different logic in the Knowtify rule setting engine. Knowtify automatically assigns each piece of data a Type upon receiving it. If you would ever like to change the data type for any one of your keys, you can do so on the Data tab of your account. [block:api-header] { "type": "basic", "title": "Dates" } [/block] When you ship over Dates as data points, you will be able to use the following operators in your segmentation: [block:image] { "images": [ { "image": [ "https://files.readme.io/If3MqEoDRVaWim0A4EOX_skitch.png", "skitch.png", "534", "284", "#406491", "" ] } ] } [/block] *=*: Equals. Use this to target a specific date. You must use the proper format (see below) *&#x2260;*: Does not equal (see proper format) **>**: Greater than. This is to specify any date AFTER a specific date (see proper format) **<**: Less than. This is to specify any date BEFORE a specific date (see proper format) **days ago**: An exact number of days since that date. **greater than days ago**: This will segment contacts who's activity took place X days more than the date in this data point. **less than days ago**: This will segment contacts who's activity took place X days less than the date in this data point. [block:callout] { "type": "danger", "title": "ACCEPTED FORMAT FOR DATES", "body": "In order to use dates in Knowtify, they have to be formatted one of two ways:\n\nyyyy-mm-dd\n\nOR\n\nyyyy-mm-dd hh:mm:ss\n\nIf you do not use one of these formats, you will not be able properly segment contacts or set rules based on this value in Knowtify." } [/block]