{"_id":"5944768326bbe6000f2b6b93","project":"5429beef1163360800ed31fa","version":{"_id":"5429beef1163360800ed31fd","__v":22,"project":"5429beef1163360800ed31fa","createdAt":"2014-09-29T20:19:59.904Z","releaseDate":"2014-09-29T20:19:59.904Z","categories":["5429beef1163360800ed31fe","55e74e1f5d36b32b002563fa","55e7500a73169617001f2e86","55e76b8196131b2f00bf4b72","55e89569cdbb8a350096df9c","55f8935eb089b71700a8364e","55f8a67d3bb4bb0d0022d093","55f9dbefc7ef770d00d9bf6d","5601c21a22ecf60d002b27b3","5601c21ff12aee0d001bb06e","5601c2256c7b610d00280db5","5601c22c22ecf60d002b27b4","5603738d0c78b00d0039af47","5626f70bfcbbc621004ebf52","566f7a1ae144ab0d00e9732f","566f85ca7820960d00c3b93d","56708ce43a32d20d00c45cbf","56708d436995210d003aad8e","5736471abe10a9200030732c","57a82c7aff9bd30e00a6f1c1","591b8500e3992319007190f4","5a3718305c66a60012d960ba"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"55e89569cdbb8a350096df9c","__v":14,"project":"5429beef1163360800ed31fa","pages":["55e896ac4535442d00ccacf3","55e8b205f0f1850d00d24a59","55e8b243720fde1700659a0e","55e8b4258c0c601700f978e0","55e8b5537cdf7119002d2e3a","55e8b5737cdf7119002d2e3c","55e8b5863fef5017000dbd9f","55e8b59ef0f1850d00d24a63","563b50349e3f2225009fd296","5640d891d4b2e00d00bb3d48","564cfd4e2248461700bd4021","5660e89689e82f0d008f6832","5668d3428ff3da0d0079092f","56abb944f25f160d00e17f40"],"version":"5429beef1163360800ed31fd","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-03T18:46:01.692Z","from_sync":false,"order":1,"slug":"sdk-integrations","title":"Integrating for Web"},"user":"56f305ac92cce10e00eaf0d9","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-17T00:23:31.381Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":17,"body":"[block:api-header]\n{\n  \"title\": \"CSV Structure\"\n}\n[/block]\nYou need to follow following structure for your CSV file. \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Format or Structure\",\n  \"body\": \"Each row should be in the following format\\n\\n[UUID],[APPEND,DELETE,UPDATE],[SEGMENT_TOKEN1::SEGMENT_TOKEN2]\\n\\nExample:\\n\\nf49620e3-b67c-44b8-9aee-c794849228c1,0,B0H6ZW40::TA4SZN27::PZKG61X2::KAEHR2OY\\ng45620e3-b67c-44b8-9aee-c794849228c,2,B0H6ZW40::TA4SZN27::PZKG61X2::KAEHR2OY\\nf49620e3-b67c-44b8-9aee-c794849228c1,1,B0H6ZW40::TA4SZN27::PZKG61X2::KAEHR2OY\"\n}\n[/block]\nUUID: Unique Identifier\nSegment_Token: Segment Identifier\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Action Flag Description\",\n    \"h-1\": \"Value\",\n    \"h-2\": \"Value\",\n    \"0-0\": \"APPEND\",\n    \"0-1\": \"0\",\n    \"1-0\": \"DELETE\",\n    \"1-1\": \"1\",\n    \"2-0\": \"UPDATE\",\n    \"2-1\": \"2\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\nHere's sample CSV file for audience segments - https://drive.google.com/file/d/16Zj8zdVt1ty9qd1BjlzYB4vRsnlh4wcb/view?usp=sharing\n[block:api-header]\n{\n  \"title\": \"CSV Upload to S3\"\n}\n[/block]\nYou can build audience segments in ProfileDB by directly uploading aforementioned CSV files. We will create unique S3 bucket for each publisher and provide you with S3 URL, access key id, and secret access key. \n\nOnce you receive this information then you can transfer CSV files using FTP or application like Cyberduck.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/b75a968-Screenshot_2018-01-08_17.29.22.png\",\n        \"Screenshot 2018-01-08 17.29.22.png\",\n        2542,\n        1438,\n        \"#edeeee\"\n      ]\n    }\n  ]\n}\n[/block]\nYour CSV file needs to be updated before 11:59pm UTC in the folder for said date that has format of YYYY-MM-DD for the automated system to process your files. Example : You need to upload the csv file for January 4th before January 3rd 11:59pm UTC. Folders for upto two days into the future are automatically created for you to upload your csv files, folders for days beyond two days can be created manually in the same format. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/c6d61f8-Screenshot_2018-01-08_17.26.42.png\",\n        \"Screenshot 2018-01-08 17.26.42.png\",\n        2548,\n        538,\n        \"#cfcfcd\"\n      ]\n    }\n  ]\n}\n[/block]\nOnce file is uploaded, the system will automatically process it to ensure it's in correct format and updates your segments accordingly. System will be updating the status whether file was valid and processed by 10:00AM UTC next day. Once it and processed, we will add another file with extension \"_VALID\" / \"_INVALID\" to the same folder (as shown below) so you are aware if the processing went through without any issues. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0942707-Screenshot_2018-01-08_17.27.15.png\",\n        \"Screenshot 2018-01-08 17.27.15.png\",\n        2556,\n        350,\n        \"#066cda\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"S3/CSV option for customer to build Audience Segments (ProfileDB) in Polymorph platform","slug":"audience-segments-s3-or-csv","type":"basic","title":"Audience Segments S3 or CSV"}

Audience Segments S3 or CSV

S3/CSV option for customer to build Audience Segments (ProfileDB) in Polymorph platform

[block:api-header] { "title": "CSV Structure" } [/block] You need to follow following structure for your CSV file. [block:callout] { "type": "info", "title": "Format or Structure", "body": "Each row should be in the following format\n\n[UUID],[APPEND,DELETE,UPDATE],[SEGMENT_TOKEN1::SEGMENT_TOKEN2]\n\nExample:\n\nf49620e3-b67c-44b8-9aee-c794849228c1,0,B0H6ZW40::TA4SZN27::PZKG61X2::KAEHR2OY\ng45620e3-b67c-44b8-9aee-c794849228c,2,B0H6ZW40::TA4SZN27::PZKG61X2::KAEHR2OY\nf49620e3-b67c-44b8-9aee-c794849228c1,1,B0H6ZW40::TA4SZN27::PZKG61X2::KAEHR2OY" } [/block] UUID: Unique Identifier Segment_Token: Segment Identifier [block:parameters] { "data": { "h-0": "Action Flag Description", "h-1": "Value", "h-2": "Value", "0-0": "APPEND", "0-1": "0", "1-0": "DELETE", "1-1": "1", "2-0": "UPDATE", "2-1": "2" }, "cols": 2, "rows": 3 } [/block] Here's sample CSV file for audience segments - https://drive.google.com/file/d/16Zj8zdVt1ty9qd1BjlzYB4vRsnlh4wcb/view?usp=sharing [block:api-header] { "title": "CSV Upload to S3" } [/block] You can build audience segments in ProfileDB by directly uploading aforementioned CSV files. We will create unique S3 bucket for each publisher and provide you with S3 URL, access key id, and secret access key. Once you receive this information then you can transfer CSV files using FTP or application like Cyberduck. [block:image] { "images": [ { "image": [ "https://files.readme.io/b75a968-Screenshot_2018-01-08_17.29.22.png", "Screenshot 2018-01-08 17.29.22.png", 2542, 1438, "#edeeee" ] } ] } [/block] Your CSV file needs to be updated before 11:59pm UTC in the folder for said date that has format of YYYY-MM-DD for the automated system to process your files. Example : You need to upload the csv file for January 4th before January 3rd 11:59pm UTC. Folders for upto two days into the future are automatically created for you to upload your csv files, folders for days beyond two days can be created manually in the same format. [block:image] { "images": [ { "image": [ "https://files.readme.io/c6d61f8-Screenshot_2018-01-08_17.26.42.png", "Screenshot 2018-01-08 17.26.42.png", 2548, 538, "#cfcfcd" ] } ] } [/block] Once file is uploaded, the system will automatically process it to ensure it's in correct format and updates your segments accordingly. System will be updating the status whether file was valid and processed by 10:00AM UTC next day. Once it and processed, we will add another file with extension "_VALID" / "_INVALID" to the same folder (as shown below) so you are aware if the processing went through without any issues. [block:image] { "images": [ { "image": [ "https://files.readme.io/0942707-Screenshot_2018-01-08_17.27.15.png", "Screenshot 2018-01-08 17.27.15.png", 2556, 350, "#066cda" ] } ] } [/block]