{"action":"created","issue":{"url":"https://api.github.com/repos/LivePersonInc/developers-community/issues/7","repository_url":"https://api.github.com/repos/LivePersonInc/developers-community","labels_url":"https://api.github.com/repos/LivePersonInc/developers-community/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/LivePersonInc/developers-community/issues/7/comments","events_url":"https://api.github.com/repos/LivePersonInc/developers-community/issues/7/events","html_url":"https://github.com/LivePersonInc/developers-community/issues/7","id":237829059,"number":7,"title":"Agent Workspace Widget SDK: Data Structure of Authenticated SDEs different from unauthenticated SDEs","user":{"login":"timster83","id":17312022,"avatar_url":"https://avatars1.githubusercontent.com/u/17312022?v=3","gravatar_id":"","url":"https://api.github.com/users/timster83","html_url":"https://github.com/timster83","followers_url":"https://api.github.com/users/timster83/followers","following_url":"https://api.github.com/users/timster83/following{/other_user}","gists_url":"https://api.github.com/users/timster83/gists{/gist_id}","starred_url":"https://api.github.com/users/timster83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timster83/subscriptions","organizations_url":"https://api.github.com/users/timster83/orgs","repos_url":"https://api.github.com/users/timster83/repos","events_url":"https://api.github.com/users/timster83/events{/privacy}","received_events_url":"https://api.github.com/users/timster83/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"lpbarber","id":12851618,"avatar_url":"https://avatars2.githubusercontent.com/u/12851618?v=3","gravatar_id":"","url":"https://api.github.com/users/lpbarber","html_url":"https://github.com/lpbarber","followers_url":"https://api.github.com/users/lpbarber/followers","following_url":"https://api.github.com/users/lpbarber/following{/other_user}","gists_url":"https://api.github.com/users/lpbarber/gists{/gist_id}","starred_url":"https://api.github.com/users/lpbarber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpbarber/subscriptions","organizations_url":"https://api.github.com/users/lpbarber/orgs","repos_url":"https://api.github.com/users/lpbarber/repos","events_url":"https://api.github.com/users/lpbarber/events{/privacy}","received_events_url":"https://api.github.com/users/lpbarber/received_events","type":"User","site_admin":false},"assignees":[{"login":"lpbarber","id":12851618,"avatar_url":"https://avatars2.githubusercontent.com/u/12851618?v=3","gravatar_id":"","url":"https://api.github.com/users/lpbarber","html_url":"https://github.com/lpbarber","followers_url":"https://api.github.com/users/lpbarber/followers","following_url":"https://api.github.com/users/lpbarber/following{/other_user}","gists_url":"https://api.github.com/users/lpbarber/gists{/gist_id}","starred_url":"https://api.github.com/users/lpbarber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpbarber/subscriptions","organizations_url":"https://api.github.com/users/lpbarber/orgs","repos_url":"https://api.github.com/users/lpbarber/repos","events_url":"https://api.github.com/users/lpbarber/events{/privacy}","received_events_url":"https://api.github.com/users/lpbarber/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2017-06-22T12:27:41Z","updated_at":"2017-07-06T15:14:35Z","closed_at":null,"body":"The public model for engagement attributes exposed via the Agent Workspace Widget SDK follows below (as detailed in the documentation).\r\n\r\n`SDE: {\r\n        customerDetails: [],\r\n        personalInfo: [],\r\n        marketingSource: [],\r\n        leadGeneration: [],\r\n        transaction: [],\r\n        viewedProducts: [],\r\n        shoppingCart: [],\r\n        serviceActivity: [],\r\n        error: []\r\n    },\r\n    authenticatedData: {\r\n        customerDetails: [],\r\n        personalInfo: [],\r\n    }`\r\n\r\nHowever, when implemented, the structure of the SDEs in the authenticatedData.* namespace is different than the structure of the SDEs in the SDE.* namespace. This means that it is necessary to create different handlers for each namespace.\r\n\r\nThe structure we have observed is as follows.\r\n\r\nSDE.customerDetails: data.newValue[0].[attribute-name]\r\nauthenticatedData.customerDetails: data.newValue.[attribute-name]\r\n\r\nSDE.personalInfo: data.newValue[0].[attribute-name]\r\nauthenticatedData.personalInfo: data.newValue.[attribute-name]\r\n\r\n**Screenshot of SDE.customerDetails**\r\n![sde customerdetails](https://user-images.githubusercontent.com/17312022/27433838-3a2a6854-574e-11e7-9aca-e080370e1b58.png)\r\n\r\n**Screenshot of authenticatedData.customerDetails**\r\n![authenticateddata customerdetails](https://user-images.githubusercontent.com/17312022/27433837-3a1eaf0a-574e-11e7-8991-129ca7d9f314.png)\r\n\r\n**Screenshot of SDE.personalInfo**\r\n![sde personalinfo](https://user-images.githubusercontent.com/17312022/27433840-3a4267e2-574e-11e7-9986-d61577302d64.png)\r\n\r\n**Screenshot of authenticatedData.personalInfo**\r\n![authenticateddata personalinfo](https://user-images.githubusercontent.com/17312022/27433839-3a373f5c-574e-11e7-80e6-014cd64c25e7.png)\r\n"},"comment":{"url":"https://api.github.com/repos/LivePersonInc/developers-community/issues/comments/313426625","html_url":"https://github.com/LivePersonInc/developers-community/issues/7#issuecomment-313426625","issue_url":"https://api.github.com/repos/LivePersonInc/developers-community/issues/7","id":313426625,"user":{"login":"meirotstein","id":2209844,"avatar_url":"https://avatars2.githubusercontent.com/u/2209844?v=3","gravatar_id":"","url":"https://api.github.com/users/meirotstein","html_url":"https://github.com/meirotstein","followers_url":"https://api.github.com/users/meirotstein/followers","following_url":"https://api.github.com/users/meirotstein/following{/other_user}","gists_url":"https://api.github.com/users/meirotstein/gists{/gist_id}","starred_url":"https://api.github.com/users/meirotstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meirotstein/subscriptions","organizations_url":"https://api.github.com/users/meirotstein/orgs","repos_url":"https://api.github.com/users/meirotstein/repos","events_url":"https://api.github.com/users/meirotstein/events{/privacy}","received_events_url":"https://api.github.com/users/meirotstein/received_events","type":"User","site_admin":false},"created_at":"2017-07-06T15:14:35Z","updated_at":"2017-07-06T15:14:35Z","body":"@timster83 \r\n\r\nI reexamine our code and you are right - we always send a single object with the latest SDE values.\r\n\r\nHowever we do save the data in an array due to some historic reasons - unfortunately this cannot be  change due to backward compatibility.\r\n\r\nAnyhow, according to your code - it seems that you handled it wisely :)\r\n\r\nBest Regards,\r\nMeir."}}
{"actor":{"display_login":"meirotstein"}}