As part of your organization's information governance approach, you can control how long direct messages (DMs), group messages, and messages in spaces in Google Chat are retained. Use retention rules to set how long to keep messages and when to delete them, if ever.
To keep data that matches specific conditions for a set time, create a custom retention rule. To keep all service data for all licensed accounts for a set time, create a default retention rule.
Important information about Chat retention
Before you set retention rules, we strongly recommend you read about how retention works and review the Chat messages supported in Vault.
Covered:
- Messages and their attachments sent with history on, in Chat
- DMs sent by external users to your users
- Messages sent by external users in your organization’s group messages and spaces
Not covered:
- Messages sent with history off
- Linked files
- Messages in external Chat spaces
- Previewed messages
For details, see Supported services and data types.
The default retention rule applies to all DMs, group messages, and Chat spaces in your organization.
A custom retention rule can apply to different sets of messages:
Organizational unit-based retention rule | "All Chat spaces" retention rule |
---|---|
|
|
If more than one custom retention rule applies to a message, the message is retained according to the custom rule that expires last.
To retain all messages (DMs, group messages, and messages in spaces) with custom retention rules, you must create at least two rules. You create one rule for all Chat spaces to cover messages in spaces and certain group conversations, and create another rule for your top organizational unit to cover DMs and group messages.
Learn more about the differences between group messages and spaces.
Note: Unlike Gmail and Groups retention rules, you can’t use terms to target Chat retention rules to messages associated with specific accounts or that contain specific keywords.
Direct messages
1:1 Direct Messages (DMs) are owned by the organization of the chat participant who creates the conversation. This is often, but not necessarily the person who sends the first message.
When the participants in a chat are in the same organization but covered by different retention rules, the longer of the two retention rules applies. For example, participant 1 is in an organizational unit subject to a retention rule that purges DMs after 7 days and they chat with participant 2 who’s in an organizational unit subject to an indefinite retention rule for DMs. Both participants will have access to the direct messages indefinitely, and a Vault search for either participant will return messages for both users indefinitely.
DMs with external users
Regardless of ownership, when participants belong to different organizations, DMs are retained according to the retention rules of each organization.
For example, Company A retains DMs for 1 week and Company B retains DMs for 2 years. Vault will retain DMs for Company A’s admins for 1 week and Company B’s admins for 2 years. Chat has a 30-day retention period that keeps messages for 30 days after they're deleted by a retention or auto-deletion policy. During that period, the messages are still available in Vault. After the Chat retention period ends, the DM is no longer available in Vault for either company.
Note: The retention policy for the owning organization is applied to conversations in the product UI, while the policy for each organization applies to the messages in Vault. There may be cases where users would have longer visibility into messages than their admin, such as when the owning organization's user has a longer retention policy than the guest admin. In these cases, we will extend Vault visibility to match at least the user visibility.
Chat spaces
When you set a default retention rule or create a custom retention rule for Chat, Vault can retain messages only in spaces that have history turned on. Chat retention rules set for organizational units don’t apply to messages in spaces.
External users in Chat spaces
When participants belong to different organizations, the conversation is retained according to the rules of the organization of the space's creator. If users in your organization participate in spaces owned by another organization, those messages aren’t available to Vault for retention, holds, search, or export.
Chat retention rules don't have the option to purge only messages deleted by users. A retention rule with an expiration purges all messages when the retention period expires.
If you are using migration mode to migrate messages to Chat, all spaces must migrate within 30 days. If your migration takes longer than 30 days, the migration will be deleted from
Spaces in migration mode have a strict 30d ttl during which time a migration app must import all content to the space and exit the space out of migration mode. If a space hasn't exited migration mode by 30d, it will be auto-purged from storage. After a space exits migration mode, standard Vault retention rules will apply.
Set a custom retention rule for Chat
- Sign in to vault.google.com.
- Click Retention
Custom Rules
Create.
- For the service, select Chat and then click Continue.
- Choose an entity:
- To retain DMs and group conversations that were sent or received by accounts in an organizational unit, select Organizational unit. Click the organizational unit field and, in the dialog that opens, click the organizational unit. The rule doesn't apply to messages in spaces or group conversations in Chat created after early December 2020.
- To retain messages in all spaces in your organization, select All Chat spaces. The rule doesn't apply to direct messages or some group messages.
Review the differences between rule types.
- Choose how long to keep messages:
- To permanently retain messages covered by this rule, choose Indefinitely.
- To discard messages after a set time, choose Retention period and enter the number of days, from 1 to 36,500.
Warning: Vault allows Chat to immediately purge data that exceeds the retention period when you submit a new rule. The purged data can include data that users expect to keep. Don't proceed to the next step until you’re sure the rule is configured correctly.
- Click Create. If you set a retention period, check the confirmation box and click Accept.
Set the default retention rule for Chat
- Sign in to vault.google.com.
- Click Retention. The list of default rules opens.
- Click Chat
.
- Choose how long to keep messages:
- To permanently retain messages covered by this rule, choose Indefinitely.
- To discard all messages after a set time, choose Retention period and enter the number of days, from 1 to 36,500.
Warning: Vault allows Chat to immediately purge data that exceeds the retention period when you submit the rule. The purged data can include data that users expect to keep. Don't proceed to the next step until you’re sure the rule is configured correctly.
- Click Save. Vault asks you to confirm you understand the rule's effects. Check the boxes and click Accept to save the rule.