# LINE Rich Menu Switching LINE Rich Menus are interactive navigation menus displayed at the bottom of LINE chat screens. While Engage Studio does not currently provide a built-in interface for creating and managing LINE Rich Menus, you can implement Rich Menu switching functionality using Audience Studio segmentation combined with LINE's Messaging API connector. ## Overview This guide explains how to switch LINE Rich Menus based on user segments using the following workflow: 1. Create user segments in Audience Studio 2. Design and configure Rich Menus using a third-party tool 3. Set up LINE Messaging API connector with Rich Menu IDs 4. Activate the segment to apply Rich Menus to specific users ## Prerequisites Before you begin, ensure you have: - **LINE Official Account** - An active LINE Official Account for your business - **LINE Developers Console Access** - Access to the LINE Developers Console to obtain credentials - **Channel Access Token** - A valid Channel Access Token from your LINE channel - **Treasure Data Account** - Active Audience Studio and Engage Studio access - **User Segments** - User data in Treasure Data with a column containing LINE user IDs ## Rich Menu Design Tool Currently, Rich Menu creation requires a third-party tool. As a reference, the **LINE Rich Menu Editor** is an open-source tool available that can integrate with Treasure Data: **Tool Website**: [LINE Rich Menu Editor](https://toru-takahashi.github.io/line-richmenu-editor/) This tool provides: - Visual Rich Menu designer - Image upload and tap area configuration - Direct LINE API integration - Rich Menu ID generation for Treasure Data activation Note: This is provided as reference information only. You may use any tool or method that can create LINE Rich Menus and obtain Rich Menu IDs. ## Setup: Configure LINE Authentication in Integration Hub Before implementing Rich Menu switching, you need to set up LINE authentication credentials in Integration Hub: 1. Navigate to **Integration Hub** from the main menu 2. In the left sidebar, select **Catalog** 3. Search for "line" or scroll to find LINE integrations 4. Locate **LINE Messaging** in the catalog 5. Click **Create Authentication** to configure your LINE credentials ![LINE Integration Hub Catalog](/assets/integration-hub-line-catalog.135b3cc00631dd7f77c9ec5ee205860f9d421e1f2a3bccf834326a6ca68058d5.345ee177.png) 1. In the authentication dialog: - **Authentication Name**: Enter a descriptive name for this credential (e.g., "LINE Official Account - Production") - **Channel Access Token**: Paste your Channel Access Token from LINE Developers Console 2. Click **Save** to store the authentication This authentication will be used when configuring the LINE Messaging API connector in later steps. ## Implementation Steps ### Step 1: Create User Segments in Audience Studio 1. Navigate to **Audience Studio** in the Treasure Data CDP 2. Create segments based on your targeting criteria (e.g., user behavior, attributes, lifecycle stage) 3. Ensure your segment includes a column containing LINE user IDs (e.g., `line_uid`) for proper user identification 4. Save and activate your segment ### Step 2: Design Rich Menus Using a third-party tool or the LINE API directly, design your Rich Menu: 1. Create your Rich Menu layout: - Upload background image (recommended size: 2500x1686 pixels) - Configure tap areas for each menu item - Set actions for each tap area (URL links, postback actions, etc.) 2. Export the Rich Menu configuration as JSON If using the [LINE Rich Menu Editor](https://toru-takahashi.github.io/line-richmenu-editor/) as a reference tool, follow the tool's documentation for the design process. ### Step 3: Upload Rich Menu to LINE 1. Obtain your **Channel Access Token** from the LINE Developers Console 2. Using your chosen tool or the LINE API directly: - Upload the Rich Menu to LINE's servers - Obtain the **Rich Menu ID** (format: `richmenu-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`) 3. Store the Rich Menu ID securely - you'll need it for the activation step ### Step 4: Configure LINE Messaging API Activation In Audience Studio, configure an activation to apply the Rich Menu to your segment: 1. Navigate to your created segment in **Audience Studio** 2. Click **Create Activation** 3. In the activation configuration dialog, configure the following parameters: ![LINE Messaging Activation Configuration](/assets/line-activation-config.75deaa942ec55a304df5ecab7ac339adf4daaebe38cf750dc714fdf469179475.345ee177.png) **Required Parameters:** - **Activation name**: Enter a descriptive name for this activation (e.g., "line_segment1") - **Description**: (Optional) Add notes about the purpose of this activation - **Authentication**: Select the LINE authentication you created in Integration Hub (e.g., "toru_line_segmentation") - **Target**: Select **Rich Menu** from the dropdown - **Rich Menu Action**: Select **Link Rich Menu** from the dropdown - **Rich Menu ID**: Enter the Rich Menu ID obtained from Step 3 (format: `richmenu-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`) **Optional Settings:** - **Use existing Rich Menu ID for this action?**: Check this box if you want to use an existing Rich Menu ID that's already uploaded to LINE - **Skip invalid users?**: Check this box to continue processing even if some users in the segment are invalid - When enabled, the activation will skip invalid users and continue - Leave unchecked if you want the activation to stop when encountering invalid users 1. Click **Next** to proceed to the **Output Mapping** configuration **Output Mapping Configuration:** - **line_uid**: Map this required field to the column in your segment that contains LINE user IDs - This is a required field for LINE activations - Select the column from your segment that contains valid LINE user IDs (the column can have any name, such as `line_uid`, `line_user_id`, or any custom column name) - Ensure the selected column contains valid LINE user IDs in the correct format 1. Click **Next** to configure the schedule settings 2. Review all settings and click **Create** to save the activation configuration ### Step 5: Activate and Deploy 1. Configure the delivery schedule (immediate or scheduled) 2. Review the segment size and targeting criteria 3. Activate the audience segment 4. Monitor the activation status in the Activation logs ## Use Cases Rich Menu switching based on segments enables various personalization scenarios: - **New vs. Returning Users** - Show different menu options for first-time users and loyal customers - **Seasonal Campaigns** - Switch menus based on active promotions or seasonal events - **User Lifecycle Stages** - Customize menus for onboarding, engagement, and retention phases - **Behavioral Targeting** - Display menus based on purchase history, browsing behavior, or engagement level - **A/B Testing** - Test different menu designs with segmented user groups ## Testing and Verification Before deploying to your entire audience: 1. Create a small test segment with known LINE user IDs 2. Apply a test Rich Menu to the segment 3. Verify that: - The Rich Menu displays correctly on LINE - Tap actions work as expected - User transitions occur properly 4. Monitor activation logs for any errors ## Troubleshooting ### Rich Menu Not Displaying - **Verify Line User ID Mapping**: Ensure the column you mapped to `line_uid` in your segment contains valid LINE user IDs - **Check Token Validity**: Confirm your Channel Access Token is valid and has the necessary permissions - **Review Segment Size**: Check that users exist in the segment and are active LINE followers ### Image Upload Issues - **Image Format**: Use PNG or JPEG format - **Image Dimensions**: Follow LINE's recommended size (2500x1686 pixels) - **File Size**: Keep image file size under 1MB for optimal loading ### Tap Actions Not Working - **Validate Tap Area Configuration**: Ensure tap areas don't overlap and cover the intended menu regions - **Check Action URLs**: Verify that URLs are properly formatted and accessible - **Review Postback Settings**: Confirm postback data is correctly configured if using webhook actions ## Limitations - Rich Menu creation and design must be performed outside of Engage Studio - Real-time menu switching is not available; activation timing depends on the connector schedule - Maximum of 1,000 Rich Menus per LINE Official Account (LINE platform limitation) ## Additional Resources - [LINE Rich Menu Editor](https://toru-takahashi.github.io/line-richmenu-editor/) - [LINE Messaging API Reference](https://developers.line.biz/en/reference/messaging-api/) - [LINE Messaging Export Integration](/int/line-messaging-export-integration) - [Audience Studio Documentation](/products/customer-data-platform/audience-studio)