Skip to content

Commit b388d38

Browse files
author
Dzmitry Kremez
committed
Update readme about company in controller data attribute updates
1 parent 0e654be commit b388d38

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,23 @@ config.company.custom_data = {
240240
}
241241
```
242242

243+
In some situations you'll want to set some custom company data attribute specific to a request.
244+
You can do this similarly to user data attribute set by using the `intercom_custom_data` helper available in your controllers:
245+
246+
```ruby
247+
class AppsController < ActionController::Base
248+
def activate
249+
intercom_custom_data.company[:app_activated_at] = Time.now
250+
...
251+
end
252+
253+
def destroy
254+
intercom_custom_data.company[:app_deleted_at] = Time.now
255+
...
256+
end
257+
end
258+
```
259+
243260
### Messenger
244261
Intercom includes an in-app messenger which allows a user to read messages and start conversations.
245262

0 commit comments

Comments
 (0)