Testing Your Integration

Testing Your Integration

This guide walks you through how to test your Button integration. It’s suggested you perform these tests as you complete each component of the integration; and if something doesn’t work as expected, reach out to your Technical Project Manager for assistance.

In this guide, we’ll test:

Note: Button must still complete their own QA in order to launch your integration into the Button Marketplace


Order Attribution Test

Each time a Publisher drives a purchase, they generate a commission. This section tests to make sure Button attribution is properly tracking these orders.

Prerequisites: The tests outlined in this section require the Button Partner test app (App Store / Play Store). It’s purpose is to mimic a Publisher app so you can test each flow a user might encounter. After downloading the apps, login using your Button Dashboard login (Note: if you do not have access to this, please reach out to your Technical Project Manager).

Mobile Web

Note: this test will only work on mobile devices that have not already installed your test app

  1. Uninstall your app from the device.
  2. Open up the Button Partner test app.
  3. Select your campaign by tapping Run.
  4. Tap your Button from the list. It will typically say Shop with <Your Brand Name>.
  5. On the bottom, tap Continue to <Your Brand Name>.com.
  6. After landing into your mobile website within the embedded webview, make a purchase.
  7. Obtain the order ID. This is typically sent in a confirmation email or shown in-app after the purchase is made.
  8. Head to the Orders tab in the Button Dashboard.
  9. Search for the order ID in the search bar at the top.
  10. The test is a success if the order shows with the correct order total.

iOS & Android

Make sure to test each of the following scenarios with the steps outlined below:

  • A freshly installed app that's never been launched
  • An app that has been launched but is not currently running
  • An app that is running in the background

Note: this test will work on mobile devices that already have installed your test app

  1. Open up the Button Partner test app.
  2. Select your campaign by tapping Run.
  3. Tap your Button from the list. It will typically say Shop with <Your Brand Name>.
  4. After deep linking into your app, make a purchase.
  5. Obtain the order ID. This is typically sent in a confirmation email or shown in-app after the purchase is made.
  6. Head to the Transactions tab in the Button Dashboard.
  7. Search for the Order ID in the search bar at the top.
  8. The test is a success if the order shows with the correct order total.

Adjustments Test

Note: it’s easiest to use one of the test orders in one of the previous sections

  1. Modify an order that was placed through Button. For example, increase the quantity of purchased items for 1 to 2
  2. Head to the Transactions tab in the Button Dashboard.
  3. Search for the Order ID in the search bar at the top.
  4. The test is a success if the order shows with the correct order total.

Cancellations Test

Note: it’s easiest to use one of the test orders in one of the previous sections

  1. Cancel an order that was placed through Button.
  2. Head to the Transactions tab in the Button Dashboard.
  3. Search for the Order ID in the search bar at the top.
  4. The test is a success if the order shows with the correct order total and Status of deleted.

Button Links Test

Mobile web Publishers add static Button Links to their mobile website that drive users to your app or mobile website. This section tests to make sure your Button Links are properly routing users and attributing.

Prerequisites: Construct a Button Link - https://track.bttn.io/<YOUR-BUTTON-LINKS-SUBDOMAIN>?btn_ref=org-3eec44df0966f6f0 - and place within a webpage. Note: Button Links will not work correctly within apps that open within an embedded webview (e.g. Slack, Facebook) or an email client.

Button Links Deferred Deep Linking

Note: this test will only work on mobile devices that have not already installed your app

  1. Uninstall your app from the device.
  2. Tap on the Button Link constructed.
  3. You will be redirected to an interstitial. Tap Open In App.
  4. Upon landing in the App/Play Store, install your test app (i.e. install it directly from Xcode, Android Studio, or an APK).
  5. After deep linking into your app, make a purchase.
  6. Obtain the order ID. This is typically sent in a confirmation email or shown in-app after the purchase is made.
  7. Head to the Transactions tab in the Button Dashboard.
  8. Search for the Order ID in the search bar at the top.
  9. The test is a success if the order shows with the correct order total.

Button Links Order Affiliation

Note: this test will work on mobile devices that already have installed your app

  1. Tap on the Button Link constructed.
  2. After deep linking into your app, make a purchase.
  3. Obtain the order ID. This is typically sent within a confirmation email or shown in-app after the purchase is made.
  4. Head to the Transactions tab in the Button Dashboard.
  5. Search for the Order ID in the search bar at the top.
  6. The test is a success if the order shows with the correct order total.

Order Payload Validation

Button requires the following list of fields be reported for all orders. Note: some of these fields may not yet be a technical requirement of Button’s Order API, i.e. may not be needed to receive an HTTP 200 response code.

  • order_id
  • total
  • currency
  • purchase_date
  • btn_ref
  • customer_order_id
  • line_items[].identifier
  • line_items[].total
  • line_items[].quantity
  • line_items[].description
  • line_items[].sku
  • line_items[].upc
  • line_items[].category

Tests Completed by Button

There are some tests that must be completed by Button’s Partner Engineering team before launch. They will complete these for you and verify they are working appropriately.


Getting Help

Having trouble testing your apps? Reach out to your Technical Project Manager who can assist with any questions.