Line

Introduction 

Line is one of the world’s most popular instant messaging platforms, used by millions of highly engaged users. Through Line, brands can engage with their customers with rich messaging that they can easily engage with.

MoEngage <> Line

MoEngage and Line integration via MoEngage Connectors allows you to leverage advanced segmentation, predictive capabilities, personalization, and triggering features to message your users in Line through the Line messaging API 

Integration

Prerequisites

Line allows both promotional and non-promotional messaging to users as long your brand has secured users’ consent. To send messages to users, you must meet one of two conditions:

  • Users who have added your Line official account as a friend
  • Users who haven’t added your Line official account as a friend but have sent a message to your Line official account (excluding users who have blocked your LINE official account).

REQUIREMENT DESCRIPTION
Line business account A Line official business account is required to use this integration

When sending Line messages, your messages will all be associated with your Line official account, resulting in users seeing your account name and page.
Messaging API channel When enabling the use of the messaging API in the LINE official account manager , a messaging API channel is created. This will be the channel you use to communicate with your customers.
Channel access tokens The channel access token  will allow you to send messages to users that have added your Line official account as a friend. This token can be found in the Line Developer Console under the Messaging API tab.
Line user IDs You will need to have users’ Line IDs (this ID is different from users’ usernames) to send messages on Line.

Once a user adds your Line official account as a friend, you can access the user’s Line ID through Line’s Users API.

Step 1: Collect customer Line IDs

To send messages in Line, you need to collect your users’ Line IDs to identify your user and interact with them consistently. 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’s APIs.

Line IDs can be obtained using the Line User ID API . This endpoint will return a list of Line IDs for all users who have friended your LINE official account 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 line IDs of followers.

Step 2: Save user's Line ID on MoEngage

Once you obtain a list of Line IDs, you will send them to MoEngage as a line_id - custom tracked user attribute/property. You can save this data to MoEngage either using:

Step 3: Create Connector Campaign on MoEngage to send Line Message

To create a connector campaign on MoEngage, 

1. Navigate to Create Campaign >> Connectors >> Custom and choose delivery type most suitable to your needs 

Screenshot_2022-02-21_at_10.48.46_PM.png

 

2. Choose Segment of users for whom line_id exists (You can combine with other Segment criteria)

Screen_Shot_2022-02-22_at_4.45.12_PM.png

 

3. On step 2 of the campaign, 

Screen_Shot_2022-02-22_at_4.34.34_PM.png

Here are few content samples for different message types:

Text Message Image Message Video Message

 

{
    "to": "{{UserAttribute['line_id']}}",
    "messages":[
        {
            "type":"text",
            "text":"Hello, world1"
        }
    ]
}

 

4. At this point, your campaign should be ready to test and send. You can also test your connector configuration using the Test functionality available on Step 2 of Create Connector Campaign

Screen_Shot_2022-02-22_at_11.12.42_AM.png

If your test user successfully receives the message, your set-up is good to go. You can go ahead and Publish the campaign.

 

Previous

Next

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?