Skip to content

Commit

Permalink
Update readme about company in controller data attribute updates (#345)
Browse files Browse the repository at this point in the history
Co-authored-by: Dzmitry Kremez <dzmitry.kremez@intercom.io>
  • Loading branch information
dkremez and Dzmitry Kremez authored Feb 13, 2024
1 parent 9becd8e commit bfdd914
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,23 @@ config.company.custom_data = {
}
```

In some situations you'll want to set some custom company data attribute specific to a request.
You can do this similarly to user data attribute set by using the `intercom_custom_data` helper available in your controllers:

```ruby
class AppsController < ActionController::Base
def activate
intercom_custom_data.company[:app_activated_at] = Time.now
...
end

def destroy
intercom_custom_data.company[:app_deleted_at] = Time.now
...
end
end
```

### Messenger
Intercom includes an in-app messenger which allows a user to read messages and start conversations.

Expand Down

0 comments on commit bfdd914

Please sign in to comment.