intercom / intercom-dotnet

Intercom API client library for .NET
https://developers.intercom.io/reference
Apache License 2.0
63 stars 53 forks source link

It's impossible to increment company web session #105

Closed puwalowski closed 6 years ago

puwalowski commented 6 years ago

Company web session increments only when user and company data are send together in the same request along with attribute new_session = true.

Currently User model does not contain attribute new_session thus it's impossible to increment company session.

Example of the correct request:

{
  "user_id": "123456789",
  "new_session": true,
  "update_last_request_at": true,
  "companies": [
    {
      "company_id": "1234"
    }
  ]
}
kmossco commented 6 years ago

You're definitely right, I'll be adding this soon! Reference for this feature.

kmossco commented 6 years ago

@puwalowski I have now rolled a fix for this in #97, where you can either increase a user session + company by sending an Update call with the new_session = true or using the IncrementUserSessions by passing the user id and a list of companies.