Introduction
Line is one of the world’s most popular instant messaging platforms, used by millions of engaged users. Through LINE, brands can easily engage their customers with rich messaging.
MoEngage <> Line
MoEngage and Line integration allows you to leverage advanced segmentation, predictive capabilities, personalization, and triggering features to message your users in Line.
Integration
library_add_check |
Prerequisites
|
Line allows you to send promotional and non-promotional messages to users, provided your brand has secured their consent. To send to your users, one of the following conditions must be fulfilled:
- Users who have added your Line official account as a friend
- Group chats or multi-person chats in which your Line official account has been joined
- Users who have sent a message to your Line official Account within 7 days in the one-to-one chat (*)
Step 1: Collect User Line IDs
To send messages in Line, you must collect your users’ Line IDs to consistently identify and interact with them. Line IDs are not the same as the user’s Line usernames. Line IDs are generated by Line and can be used when interacting with Line APIs.
You can obtain Line IDs using the Line User ID API. This endpoint returns a list of Line IDs for all users who have added your Line official account as a friend or sent your account a message and have not blocked you.
When making a GET request to the endpoint https://api.line.me/v2/bot/followers/ids
, you will get the followers' Line IDs.
Step 2: Save the User's Line ID on MoEngage
After obtaining a list of Line IDs, you must add them to MoEngage as a line_id, a custom-tracked user attribute or property. You can do one of the following:
- Pass this data to MoEngage using the User Data API.
- Upload it using User Imports inside MoEngage.
Step 3: Integrate Line with MoEngage
To integrate Line with MoEngage, perform the following steps:
- On the left navigation menu in the MoEngage dashboard, click App marketplace.
- On the App Marketplace page, search for Line.
- Click the Line tile.
- On the Line page, go to the Integrate tab and click + Add connection.
- Enter the following details:
Field Description Connection name Name of the Line connection. Channel Access Token The Channel Access Token lets you send messages to users who have added your Line official account as a friend. It is located in the Line Developer Console under the Messaging API tab.
- Click Connect. Your Line connection is now integrated.
You can now use Line to start creating campaigns.
Step 4: Create a Campaign on MoEngage to Send a Line Message
To create a campaign on MoEngage:
- On the left navigation menu in the MoEngage dashboard, click Engage, and then click Campaigns.
- On the All campaigns page, click + Create campaign.
- On the Create campaign dialog box, under Connected Apps, click Line and then click the most suitable delivery type.
- Under Select audience, click Filter users by.
- On the User property tab, select the segment of users for whom line_id exists (you can combine it with other segment criteria).
- In step 2 of the Campaign Creation, select the pre-configured connectors and specify the content you want to send out. Enter the following details:
Field Description Connector Select a pre-configured connector you want to use. Connections Select the connection you added to the MoEngage App marketplace. LINE ID Enter the LINE ID. It is a unique identifier assigned to each user on the Line messaging platform. You can also use personalization here. Message Enter the message content you want to send. You can also use personalization here. - Your campaign is now ready to be tested and sent. Using the Test functionality, you can also test your connector configuration.
If your test user successfully receives the message, your setup is ready. - Publish the campaign.
Send a Line Message to the Groups or Rooms
Perform the following steps to send campaigns to your LINE group or room:
- Create a new user in MoEngage to message a group or a room. Ensure the LINE ID here is your group ID or room ID. For more information on these IDs, refer here.
- Select the user by creating a segment for it. Ensure only one user is included in the segment. When multiple users are selected for the campaign, the message gets sent to the group or room many times.
- In Step 2 of Create Campaign, enter the LINE ID of your group or room. You can also use personalization here.
Campaign Analytics
MoEngage campaigns provide powerful analytics that allow you to analyze your campaign performances. Each channel in MoEngage provides in-depth metrics that help you quantify your campaign goals. For more information on the MoEngage Analytics functionalities refer to Campaign Analytics.
By default, we provide the following metrics for LINE campaigns:
- Attempted: After removing the users who breached the frequency capping (FC), is calculated as the number of users who qualified for the LINE campaigns and to whom we attempted to send messages.
- Failed: Number of users for whom Line did not send any message or the users for whom we failed to find any value against the user or event attributes used in the campaign.
- Successfully sent: The campaign is marked as successful when LINE APIs accept the request to send the message to users/groups/rooms (with a 200 status code). For more information on LINE Message API responses, refer to their help documentation.