A/B Test

A/B Test with 2mee messages is an experiment conducted to figure out the message that could possibly give higher CTR.

Prerequisites

  • Create Message A and Message B to be sent out by following the message creation process provided in the 2mee message creation section. Note the message Ids as messageIdA and messageIdB respectively.

  • From the list of User Segments available, pick the id of the segment that contains more than 8 devices. Note the segment id as filterId.

  • Note : Messages can also be created from Templates which is provided under Template Section.

Create A/B Test

POST https://exchange-prod-g.2mee.com/abtest/create

Creates an A/B Test with the two messages provided.

Request Body

{
    "id": "f14f9a37-c149-444c-913d-6f9167e37c60",
    "abTestName": "2mee A/B Test Message",
    "description": "2mee A/B Test Message",
    "filterId": "9e862fc2-e3b6-4420-bf63-80ad4368ec88",
    "messageIdA": "f4aaf517-ede6-493f-b09c-8d764c0949fb",
    "messageIdB": "13b9dfd1-4f1d-4a3a-9b82-922f0bff3274",
    "appId": "bacb37d0-a51f-491b-bd68-489c245b8c16",
    "companyId": "6c445333-bac9-4ab0-a0b6-cc6838902abb",
    "playTime": 1628078324313,
    "expiry": 1440,
    "afilterId": "82f067b6-0d74-4c48-a5a6-1e35686595f2",
    "bfilterId": "1b3d9949-5eb2-4f4c-850a-d15ee91070ab",
    "validated": false,
    "state": "NEW"
}
curl -X POST 'https://exchange-prod-g.2mee.com/abtest/create' -H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0aW5ndGVhbUAybWVlLmNvbSIsImV4cCI6MTYwNDA3MzczOSwiaWF0IjoxNjA0MDU1NzM5fQ.ZS06eeAkGHqXVJN2WQndVsl6e1GWOPHKNnBKnzxyhwG-0HoPlzaKX06ENO2E5FQ4kAvfChmcU-iSYWQHBzEPig" -H "accept: */*" -H "Content-Type: application/json" -d '{
    "appId": "bacb37d0-a51f-491b-bd68-489c245b8c16",
    "description": "2mee A/B Test for API Documentation",
    "abTestName": "2mee A/B Test",
    "filterId": "9e862fc2-e3b6-4420-bf63-80ad4368ec88",
    "expiry": 1440
}'

Update A/B Test

PUT http://server-v1.2mee.com/abtest/update

Update the contents of an A/B Test. The fields that can be updated are abTestName, description, messageIdA, messageIdB , filterId(Audience), expiry and playTime.

Request Body

{
    "id": "f14f9a37-c149-444c-913d-6f9167e37c60",
    "abTestName": "2mee A/B Test Message",
    "description": "2mee A/B Test Message",
    "filterId": "9e862fc2-e3b6-4420-bf63-80ad4368ec88",
    "messageIdA": "f4aaf517-ede6-493f-b09c-8d764c0949fb",
    "messageIdB": "13b9dfd1-4f1d-4a3a-9b82-922f0bff3274",
    "appId": "bacb37d0-a51f-491b-bd68-489c245b8c16",
    "companyId": "6c445333-bac9-4ab0-a0b6-cc6838902abb",
    "playTime": 1628078324313,
    "expiry": 1440,
    "afilterId": "82f067b6-0d74-4c48-a5a6-1e35686595f2",
    "bfilterId": "1b3d9949-5eb2-4f4c-850a-d15ee91070ab",
    "validated": false,
    "state": "NEW"
}
curl -X PUT 'https://exchange-prod-g.2mee.com/abtest/update' 
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0aW5ndGVhbUAybWVlLmNvbSIsImV4cCI6MTYwNDA3MzczOSwiaWF0IjoxNjA0MDU1NzM5fQ.ZS06eeAkGHqXVJN2WQndVsl6e1GWOPHKNnBKnzxyhwG-0HoPlzaKX06ENO2E5FQ4kAvfChmcU-iSYWQHBzEPig" -H "accept: */*" -H "Content-Type: application/json" -d '{
    "id": "1402602b-25d7-4af2-9002-b258aeeb2fe4",
    "abTestName": "2mee A/B Test",
    "description": "2mee A/B Test for API Documentation",
    "filterId": "9e862fc2-e3b6-4420-bf63-80ad4368ec88",
    "templateIdA": "6807cbf4-be0b-4fd6-a39c-5a7e52422c74",
    "templateIdB": "e5130ede-91d8-4237-b0e3-21f4c48ecf51",
    "appId": "bacb37d0-a51f-491b-bd68-489c245b8c16",
    "companyId": "6c445333-bac9-4ab0-a0b6-cc6838902abb",
    "state": "NEW",
    "playTime": "2021-08-17T11:23:29.876+0000",
    "expiry": 1440
}'

Validate the A/B Test

POST https://exchange-prod-g.2mee.com/abtest/validate

Validate API validates the contents of A message and B message and ensures

Query Parameters

{
    "id": "f14f9a37-c149-444c-913d-6f9167e37c60",
    "abTestName": "2mee A/B Test Message",
    "description": "2mee A/B Test Message",
    "filterId": "9e862fc2-e3b6-4420-bf63-80ad4368ec88",
    "messageIdA": "f4aaf517-ede6-493f-b09c-8d764c0949fb",
    "messageIdB": "13b9dfd1-4f1d-4a3a-9b82-922f0bff3274",
    "templateIdA": "7efaeaf3-3e57-449d-bee6-a43edb9014c9",
    "templateIdB": "f38735f8-82ee-4d60-bd57-fda19916bf6f",
    "appId": "bacb37d0-a51f-491b-bd68-489c245b8c16",
    "companyId": "6c445333-bac9-4ab0-a0b6-cc6838902abb",
    "state": "VALIDATED",
    "playTime": "2021-08-04T11:58:44.000+0000",
    "expiry": 1440,
    "afilterId": "82f067b6-0d74-4c48-a5a6-1e35686595f2",
    "bfilterId": "1b3d9949-5eb2-4f4c-850a-d15ee91070ab",
    "validated": true
}
curl -X PUT 'https://exchange-prod-g.2mee.com/abtest/validate?id=1402602b-25d7-4af2-9002-b258aeeb2fe4&appId=bacb37d0-a51f-491b-bd68-489c245b8c16' 
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0aW5ndGVhbUAybWVlLmNvbSIsImV4cCI6MTYwNDA3MzczOSwiaWF0IjoxNjA0MDU1NzM5fQ.ZS06eeAkGHqXVJN2WQndVsl6e1GWOPHKNnBKnzxyhwG-0HoPlzaKX06ENO2E5FQ4kAvfChmcU-iSYWQHBzEPig" -H "accept: */*"

Schedule A/B Test

POST https://exchange-prod-g.2mee.com/abtest/schedule

Scheduling A/B Test will send Message A and Message B to 25% of the selected Audience.

Query Parameters

{
    "id": "f14f9a37-c149-444c-913d-6f9167e37c60",
    "abTestName": "2mee A/B Test Message",
    "description": "2mee A/B Test Message",
    "filterId": "9e862fc2-e3b6-4420-bf63-80ad4368ec88",
    "messageIdA": "f4aaf517-ede6-493f-b09c-8d764c0949fb",
    "messageIdB": "13b9dfd1-4f1d-4a3a-9b82-922f0bff3274",
    "appId": "bacb37d0-a51f-491b-bd68-489c245b8c16",
    "companyId": "6c445333-bac9-4ab0-a0b6-cc6838902abb",
    "state": "SCHEDULED",
    "playTime": "2021-08-04T11:58:44.000+0000",
    "expiry": 1440,
    "afilterId": "82f067b6-0d74-4c48-a5a6-1e35686595f2",
    "bfilterId": "1b3d9949-5eb2-4f4c-850a-d15ee91070ab",
    "validated": true
}
curl -X PUT 'https://exchange-prod-g.2mee.com/abtest/schedule?id=1402602b-25d7-4af2-9002-b258aeeb2fe4&appId=bacb37d0-a51f-491b-bd68-489c245b8c16' 
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0aW5ndGVhbUAybWVlLmNvbSIsImV4cCI6MTYwNDA3MzczOSwiaWF0IjoxNjA0MDU1NzM5fQ.ZS06eeAkGHqXVJN2WQndVsl6e1GWOPHKNnBKnzxyhwG-0HoPlzaKX06ENO2E5FQ4kAvfChmcU-iSYWQHBzEPig" -H "accept: */*"

Last updated