{ "id": "171507", "key": "AC-5702", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2018-04-12T20:58:48.000+0000", "created": "2018-04-12T18:51:02.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-04-12T20:58:49.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "15000", "name": "Hyperloop" } ], "description": "I have integrated Intercom iOS SDK (https://github.com/intercom/intercom-ios) using Hyperloop. I have found one issue and it looks like it's Hyperloop fault: Linking Intercom User to a Company. \r\n\r\nIn order to do that I need to create an object ICMCompany with two attributes (companyId and name) and then an attribute ICMUserAttributes that includes an attribute companies with an array of one object ICMCompany.\r\n\r\nHere you have the code:\r\n\r\n var Intercom = require('Intercom/Intercom');\r\n var ICMCompany = require(\"Intercom/ICMCompany\");\r\n var ICMUserAttributes = require(\"Intercom/ICMUserAttributes\");\r\n \r\n Intercom.logout();\r\n Intercom.registerUserWithEmail(userInfo.email);\r\n\r\n var company = new ICMCompany();\r\n company.name = orgName;\r\n company.companyId = orgId;\r\n\r\n var userAttributes = new ICMUserAttributes();\r\n userAttributes.userId = userId;\r\n userAttributes.name = name;\r\n userAttributes.customAttributes = {\r\n \"language_override\": language,\r\n \"dashboard_url\": url\r\n \"is_coach\": coach\r\n }\r\n\r\n var companies = NSArray.arrayWithObject(company);\r\n console.log(\"companies.count \" + companies.count);\r\n\r\n userAttributes.companies = companies;\r\n console.log(\"userAttributes.companies count \" + userAttributes.companies.count);\r\n\r\n Intercom.updateUser(userAttributes);\r\n\r\nAnd the output is \r\n\r\n[INFO] companies.count 1\r\n[INFO] userAttributes.companies count 0\r\n\r\nIt looks like companies are not stored properly in the userAttributes Object. And the final result is that the user gets all the attributes except the companies.\r\n\r\nHere you have also the documentation on Intercom: https://developers.intercom.com/docs/ios-configuration\r\n\r\n", "attachment": [], "flagged": false, "summary": "Hyperloop + iOS + Intercom Issue", "creator": { "name": "borjagomez", "key": "borjagomez", "displayName": "Borja Gomez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "borjagomez", "key": "borjagomez", "displayName": "Borja Gomez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "436852", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "If the native call goes through, it cannot be a Hyperloop issue. Otherwise you would have received an error log indicating the issue during build / metabase generation. A hint: Try to use the property setters (e.g. {{setName(name)}}) to see if it makes a difference or compare it with the native samples. Resolving for now.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-04-12T20:58:44.000+0000", "updated": "2018-04-12T20:58:44.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }