Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Company custom data is incorrectly passed to Intercom API #1

Closed
olmeras opened this issue Apr 10, 2014 · 0 comments
Closed

Company custom data is incorrectly passed to Intercom API #1

olmeras opened this issue Apr 10, 2014 · 0 comments
Labels

Comments

@olmeras
Copy link
Contributor

olmeras commented Apr 10, 2014

The json the library generates for Company's custom properties is not working properly with Intercom API.

If your add email custom property the json generated is:

{
  "custom_data" : {
    "team_mates" : 7,
    "app_name" : "Genesis",
    "monthly_spend" : 155.5
  },
  "created_at" : 1270000000,
  "last_seen_user_agent" : "ie6",
  "email" : "john.doe@example.com",
  "user_id" : "abc123",
  "last_impression_at" : 1300000000,
  "last_seen_ip" : "1.2.3.4",
  "name" : "John Doe",
  "companies" : [
    {
      "id" : "6",
      "name" : "Intercom",
      "custom_data" : {
         "email" : "jhon@doe.com"
      }
    }
  ]
}

when it should be

{
  "custom_data" : {
    "team_mates" : 7,
    "app_name" : "Genesis",
    "monthly_spend" : 155.5
  },
  "created_at" : 1270000000,
  "last_seen_user_agent" : "ie6",
  "email" : "john.doe@example.com",
  "user_id" : "abc123",
  "last_impression_at" : 1300000000,
  "last_seen_ip" : "1.2.3.4",
  "name" : "John Doe",
  "companies" : [
    {
      "id" : "6",
      "name" : "Intercom",
      "email" : "jhon@doe.com"
    }
  ]
}
@oohira oohira closed this as completed in 18df587 Apr 20, 2014
@oohira oohira added the bug label Apr 20, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants