Skip to main content

How to set up a Data Exchange Method

There are two options for you to set up a Data Exchange Method.

  • we can have an S3 Bucket set up (either on your side or on wappier’s side)
  • or if you are using AppsFlyer, we can directly integrate with it.

Using an S3 Bucket

Data Exchange using an S3 Bucket on your side

If you choose to place data in an S3 bucket on your AWS account, two of the following steps will need to be performed and validated from the wappier Data Engineering team prior to launch. The goal here is for the wappier Revenue Management Platform to automatically ingest the historical data extracts from your S3 bucket and perform any necessary ETL in order to finalize the program scope.

① Create a new S3 bucket

  • Sign-in to the AWS Management Console and open S3
  • Click on Create bucket
  • In the Bucket name field, enter a DNS-compliant name (Bucket naming rules)
  • In the Region field, choose the closest to your region so that latency and costs are minimized (List of S3 regions)
  • In the Bucket settings for Block Public Access, keep the defaults
  • Choose Create bucket
  • Create the S3 bucket on your side

② Create a dedicated user that has the following policy

tip

This step is optional if you already have a user accessing the data. In this case, please proceed the next step.

If you need a specific user to have access to the shared bucket, you need to create that user and apply the following policy to that entity. As an alternative, you can use an existing user for this purpose.

③ Granting user permissions

In case you already had a user in place, and you skipped Step 2, go to your Amazon Identity and Access Management console and select the user to which you will be granting the necessary permissions.

  • Under Permissions tab, select Add permissions.
  • Choose Attach existing policies directly.
  • Click Create policy.
  • Select JSON.
  • Attach the following policy
{ 
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:PutAccountPublicAccessBlock",
"s3:GetAccountPublicAccessBlock",
"s3:ListAllMyBuckets"
],
"Resource": [
"arn:aws:s3:::BUCKETNAME"
]
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::BUCKETNAME",
"arn:aws:s3:::BUCKETNAME/*"
]
}
]
}
  • Click on Review Policy.
  • Give a name & description and click Create policy.
  • Click Next: Tags
  • Click Next: Review
  • Click Create User

④ Provide wappier with the following details

  • Bucket name
  • Bucket region

⑤ wappier creates the role which is assigned to the user who will access data in your bucket

A resource ARN like the following will be provided to you:

arn:aws:iam::WAPPIER_ACCOUNT_NUMBER:role/ROLENAME

⑥ Configure the S3 bucket

Proceed based on the following:

{ 
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::WAPPIER_ACCOUNT_NUMBER:role/ROLENAME"
},
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:ListBucket",
"S3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::BUCKETNAME/*",
"arn:aws:s3:::BUCKETNAME"
]
},
{
"Sid": "AllowAnyone",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::WAPPIER_ACCOUNT_NUMBER:role/ROLENAME"
},
"Action": "s3:*",
"Resource": "arn:aws:s3:::BUCKETNAME/*"
}
]
}

Data Exchange using an S3 Bucket on wappier side

In case the data will be uploaded on wappier’s S3 account, you will be granted access to a new S3 bucket that will be used for that purpose. wappier will provide the bucket name & bucket region. You need to create a new role which will be assigned to the user that will have read/write access to it.

The assigned policy will look like this:

{ 

"Version": "2012-10-17",

"Statement": [

{

"Effect": "Allow",

"Action": [

"s3:GetObject",

"s3:PutObject",

"s3:PutObjectAcl"

],

"Resource": "arn:aws:s3:::bucket_name/*"

}

]

}

To complete the setup, wappier needs the resource ARN for that role (or user) that looks like the following:

arn:aws:iam::CUSTOMERS_ACCOUNT_NUMBER:role/ROLENAME

or

arn:aws:iam::CUSTOMERS_ACCOUNT_NUMBER:USERNAME

Using AppsFlyer

If you are using AppsFlyer, you can enable wappier to access your data via the AppsFlyer APIs. This decreases the overhead on you and allows wappier to easily access all the data needed for the program to run successfully.

Requirements for using AppsFlyer

  • App's App IDs (for API usage)
  • API token v2.0 (for API usage)
  • Events to be tracked for the past 13 months

Retrieving the App's App ID

We would need you to provide us with the App IDs, both Android and iOS, that you used to setup the applications in the AppsFlyer portal.

Retrieving the AppsFlyer API token

  • From the menu bar, access the user menu (email address drop-down at the top right corner).
  • Select Security center.
  • In the AppsFlyer API tokens section, click Manage your AppsFlyer API tokens.
  • The available tokens (v1.0, v2.0 or both) are displayed.
  • Copy the required token.
  • Share the token with wappier
tip

Only admins can view the API tokens page. This means that account users and partners have no access to this page.

Events that need to be tracked

We need the following events to have been tracked for the past 13 months:

  • af_login for activity
  • af_purchase for transactions