diff --git a/source/includes/shopper_activity/_order_activity.md b/source/includes/shopper_activity/_order_activity.md
index 7657fd6578f..4cadb622349 100644
--- a/source/includes/shopper_activity/_order_activity.md
+++ b/source/includes/shopper_activity/_order_activity.md
@@ -1,11 +1,55 @@
# Order Activity
-Order Activity will show up on a person's activity timeline as an event. The event is based on the action sent with the order payload. For example, sending placed will result in a "Placed an order" event and sending updated will result in an "Updated an order" event.
+Order Activity will show up on a person's activity timeline as an event. The event is based on the action sent with the order payload. There are six supported actions: placed ("Placed an order"), updated ("Updated an order"), paid ("Paid an order"), fulfilled ("Fulfilled an order"), refunded ("Refunded an order"), and canceled ("Canceled an order"). Each action creates the corresponding event on the person's timeline.
Order Activity places special value on action with the placed value. This event will determine when an order is considered to have originated based on the occurred_at. If you send an Order Activity "action": "placed" event without including a valid occurred_at value, the order will be considered to have originated at the current time. If you send Order Activity events without previously sending placed, the order will be considered to have originated at the current time the first event was received.
Drip will keep a person’s Lifetime Value (LTV) up-to-date with their orders. For example, if a customer places an order with a grand_total of $100, their LTV will be incremented by $100. If the order is then updated, paid, or fulfilled with a grand_total value of $105, the customer’s LTV will increase by $5. If the order is then canceled or refunded with a refund_amount of $105, the customer’s LTV will decrease by $105.
+### Action Reference
+
+
| Action | +When to use | +LTV effect | +
|---|---|---|
placed |
+ Initial order creation. Sets the order’s origination time via occurred_at. |
+ Increments LTV by grand_total. |
+
updated |
+ Order details changed (e.g., items added or removed). | +LTV adjusts to match the new grand_total. |
+
paid |
+ Payment has been confirmed. | +LTV adjusts to match grand_total. |
+
fulfilled |
+ Order has been shipped or delivered. | +LTV adjusts to match grand_total. |
+
refunded |
+ Full or partial refund issued. Set refund_amount to the refund value and keep grand_total unchanged. |
+ LTV decreases by refund_amount. |
+
canceled |
+ Order canceled. Set refund_amount to the amount to return and keep grand_total unchanged. |
+ LTV decreases by refund_amount. |
+
provider and order_id for that order in the payload.
@@ -173,6 +217,71 @@ end
}
```
+> To record a refund event for an existing order:
+
+```shell
+curl -X POST "https://api.getdrip.com/v3/YOUR_ACCOUNT_ID/shopper_activity/order" \
+ -H "Content-Type: application/json" \
+ -H 'User-Agent: Your App Name (www.yourapp.com)' \
+ -u YOUR_API_KEY: \
+ -d @- << EOF
+ {
+ "provider": "my_custom_platform",
+ "email": "user@gmail.com",
+ "action": "refunded",
+ "occurred_at": "2019-01-20T14:30:00Z",
+ "order_id": "456445746",
+ "grand_total": 22.99,
+ "refund_amount": 22.99,
+ "currency": "USD",
+ "items": [
+ {
+ "product_id": "B01J4SWO1G",
+ "name": "The Coolest Water Bottle",
+ "price": 11.16,
+ "quantity": 2
+ }
+ ]
+ }
+EOF
+```
+
+```ruby
+require 'drip'
+
+client = Drip::Client.new do |c|
+ c.api_key = "YOUR API KEY"
+ c.account_id = "YOUR_ACCOUNT_ID"
+end
+
+response = client.create_order_activity_event(
+ provider: "my_custom_platform",
+ email: "user@gmail.com",
+ action: "refunded",
+ occurred_at: "2019-01-20T14:30:00Z",
+ order_id: "456445746",
+ grand_total: 22.99,
+ refund_amount: 22.99,
+ currency: "USD",
+ items: [
+ {
+ product_id: "B01J4SWO1G",
+ name: "The Coolest Water Bottle",
+ price: 11.16,
+ quantity: 2
+ }
+ ]
+)
+
+if response.success?
+ puts "Request accepted"
+else
+ puts "Error occurred"
+end
+```
+
+> Note: Set refund_amount to the amount being refunded and keep grand_total at the original order total. The person's LTV will decrease by the refund_amount.
+
### HTTP Endpoint
`POST /v3/:account_id/shopper_activity/order`