Validating Order Reporting

Order Reporting

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

New orders

Mobile Web

Steps

  1. Uninstall your app from the device.
  2. Create a Button Link via the instructions above.
  3. Go to the Button Link in a device's native browser.
  4. After landing on your mobile website, take note of the srctok-xxx value in the btn_ref parameter on the resulting link.
    • You can expect the format of the btn_ref value to be: ^srctok-[a-f0-9]{16}$ (e.g. srctok-abcdef0123456789).
  5. Make a purchase, taking note of the order ID. This is typically sent in a confirmation email or shown on the website after the purchase is made.
  6. Head to the Orders tab in the Button Dashboard.
  7. Search for the order ID or srctok-xxx
  8. value in the search bar at the top.
  9. The test is a success if the order shows with the correct order total.

App (iOS + Android)

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

  • Cold Start – an app that has been launched but is not currently running
  • App Running – an app that is running in the background

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

You will need to construct or receive a Button Universal link for your app that includes a valid "test" Attribution Token.

Example: https://yourbrand.bttn.io?btn_ref=fakesrctok-abcdef0123456789

Note: the format of the fake srctok is: ^fakesrctok-[a-f0-9]{16}$ (e.g.fakesrctok-abcdef0123456789). Do not use the same value multiple times.

Steps

  1. On iOS, paste this link into your notes app.
    1. Tapping on the resulting hyperlink should deeplink you directly into your app.
  2. On Android, paste this link into your native browser.
    1. Tapping the link should prompt you to open your app.
  3. After deeplinking into your app, ensure you were routed to the proper in-app destination.
  4. 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 Orders 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 Tests

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 a few tests that must be completed by Button’s QA team before launch; they will complete these for you and verify all functionality is working as expected.

Getting Help

Having trouble testing your apps? Reach out to your Button representative who can assist with any questions.