Post Purchase Campaign

Now that we know what a Standalone campaign is, let’s take a look at one more type of Talkable campaign — Post Purchase. It is used to convert your existing customers into Advocates after they make a purchase. It has the same flow as a basic Standalone campaign except this is gated by a purchase and shown to a customer immediately after it.

Post Purchase campaign usually looks like a pop up right after a user made a purchase. This campaign initializes on the order confirmation page and captures order details parameters. You need to pass order data that includes your customer’s email address, order id, subtotal, coupon codes used at checkout in order to close a referral loop. This allows Talkable to detect and close the loop on a referral.

Here is an example of a Purchase capturing, this action should be triggered on the order confirmation page:

import com.talkable.sdk.Talkable;
Double price = 10.99;
Integer quantity = 1;
String productId = "1";
Item item = new Item(subtotal, quantity, productId);
item.setTitle("Item Title"); // Optional
item.setUrl(""); // Optional
item.setImageUrl(""); // Optional

Double subtotal = price * quantity; // Required
String orderNumber = "123456"; // Required
String[] coupons = {"EXAMPLE-CODE-1", "EXAMPLE-CODE-2"}; // Optional

HashMap<String, String> customProperties = new HashMap<String, String>();
customProperties.put("property_key", "property_value");

Customer customer = new Customer(email);

Purchase purchase = new Purchase(subtotal, orderNumber, coupons);
purchase.setCustomer(customer); // Required
purchase.addItem(item); // Optional

String campaignTag = "android-post-purchase";
purchase.setCampaignTag(campaignTag); // Optional

Activity activity = this;
Talkable.showOffer(activity, purchase, new TalkableErrorCallback<TalkableOfferLoadException>() {
    public void onError(TalkableOfferLoadException error) {
        // Error handling. Note that it runs on non UI thread


If Post Purchase campaign does not show up when testing make sure you have it live with android-post-purchase tag on the Campaigns listing.