> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashduty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WeCom bot @ mention for responders

> Configure WeCom group chat bots to @ mention responders when pushing alert notifications, ensuring critical alerts are not overlooked

## Why @ mention

In busy WeCom group chats, responders can easily miss alert notifications. By enabling **@ mention**, the bot automatically @ mentions the corresponding responders when pushing incident notifications, ensuring they are alerted immediately.

Flashduty supports two approaches for WeCom bot @ mention. Here's how they compare:

| Comparison             | Default (phone number matching)                                            | Mapping table (user\_id matching)                                             |
| :--------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| **Matching logic**     | Matches WeCom members by the phone number bound to their Flashduty account | Matches via email-to-WeCom user\_id mapping table                             |
| **@ mention position** | Displayed separately at the bottom of the notification                     | Displayed inline within the notification content                              |
| **Maintenance effort** | No extra maintenance — just keep phone numbers consistent                  | Requires maintaining the email-to-user\_id mapping table                      |
| **Best for**           | Phone numbers are consistent between Flashduty and WeCom                   | Phone numbers differ, or you prefer inline @ mentions within the notification |

## Approach 1: Default (phone number matching)

This is the simplest approach with no extra configuration required. The system automatically matches WeCom members using the phone number bound to their Flashduty account.

### Prerequisites

* The phone number bound in Flashduty must **exactly match** the phone number on the WeCom account

### Configuration steps

<Steps>
  <Step title="Verify phone number consistency">
    Ensure Flashduty member phone numbers match their WeCom account phone numbers. You can view and edit member phone numbers in **Platform Management → Member Management**.
  </Step>

  <Step title="Enable @ mention">
    Go to the target channel's **Escalation Rules**, find the WeCom bot notification channel, expand **Advanced Configuration**, and enable the **@ Mention** toggle.
  </Step>
</Steps>

<Tip>
  With this approach, if a member's phone number differs between the two platforms, the @ mention will not work. Always verify phone number consistency first.
</Tip>

## Approach 2: Mapping table (user\_id matching)

If member phone numbers differ between the two platforms, or you prefer @ mentions to appear inline within the notification content, use the mapping table approach.

This approach requires you to maintain a mapping table between Flashduty member emails and WeCom user\_ids.

### Prerequisites

* You have obtained the WeCom user\_ids for your members (available from the WeCom admin console or API)

### Configuration steps

<Steps>
  <Step title="Obtain WeCom user_ids">
    Log in to the [WeCom admin console](https://work.weixin.qq.com/wework_admin/frame#contacts), go to **Contacts**, click on a member to view their details, and find the **Account** field — this is their user\_id.

    You can also obtain user\_ids in bulk via the WeCom API.
  </Step>

  <Step title="Create a mapping table">
    1. Go to Flashduty **Platform Management → Mapping Table Management**.
    2. Click **Create Mapping Table**, and select the **WeCom** type.
    3. Enter the Flashduty member emails and their corresponding WeCom user\_ids:

    | email                                   | wecom\_userid |
    | :-------------------------------------- | :------------ |
    | [bob@corp.com](mailto:bob@corp.com)     | bob\_wecom    |
    | [alice@corp.com](mailto:alice@corp.com) | alice\_wecom  |
  </Step>

  <Step title="Configure escalation rule and link the mapping table">
    Go to the target channel's **Escalation Rules**, find the WeCom bot notification channel:

    1. Expand **Advanced Configuration** and enable the **@ Mention** toggle.
    2. In the **User Info Mapping Table** dropdown, select the mapping table created in the previous step.
  </Step>
</Steps>

<Warning>
  You are responsible for maintaining the mapping table. When team members change, update the mapping table promptly — otherwise new members will not be @ mentioned.
</Warning>

## Verify the result

After completing the configuration, trigger a test alert to verify that @ mention works:

1. Confirm the target channel has a WeCom bot configured as a group chat notification channel.
2. Trigger a test alert and check the notification message in the WeCom group chat.
3. Verify that the responders are correctly @ mentioned.

If @ mention is not working, refer to the following troubleshooting checklist:

<AccordionGroup>
  <Accordion title="Default approach: @ mention not working">
    * Confirm the **@ Mention** toggle is enabled
    * Confirm the member's phone number in Flashduty **exactly matches** their WeCom account phone number (including country code)
    * Confirm the member is in the group chat where the bot is configured
  </Accordion>

  <Accordion title="Mapping table approach: @ mention not working">
    * Confirm the **@ Mention** toggle is enabled and the correct **User Info Mapping Table** is selected
    * Confirm the email-to-user\_id mappings in the table are correct
    * Confirm the WeCom user\_ids are accurate (verify in the WeCom admin console under Contacts)
    * Confirm the member is in the group chat where the bot is configured
  </Accordion>
</AccordionGroup>

## Further reading

<CardGroup cols={2}>
  <Card title="Notification channel configuration" icon="bell" href="/en/on-call/configuration/notifications">
    Learn about all bot types, configuration methods, and advanced options
  </Card>

  <Card title="Escalation rules" icon="route" href="/en/on-call/channel/escalation-rule">
    Learn about notification methods and group chat configuration in escalation rules
  </Card>
</CardGroup>
