Skip to content

Update readme about company in controller data attribute updates #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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