younifyd
Menu

Get Customer Analytics

Get customer's analytics report

GET/v1/applications/{applicationId}/customers/{customerId}/analytics

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Get Customer Analytics action (under management).
  3. Fill in the fields below, then reference the result from later steps as {{getCustomerAnalytics.response.data}}.

Request

Path parameters

applicationIdinteger (int64)required

The ID of the Application. It is displayed in your Talon.One deployment URL.

customerIdinteger (int64)required

The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint.

Query parameters

pageSizeinteger (int64)

The number of items in the response.

Default 1000

skipinteger (int64)

The number of items to skip when paging through large result sets.

sortstring

The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations.

Response

Returns 200 with an object. Read it in later steps with {{getCustomerAnalytics.response.data.<field>}}.

acceptedCouponsinteger (int64)

Total accepted coupons for this customer.

createdCouponsinteger (int64)

Total created coupons for this customer.

freeItemsinteger (int64)

Total free items given to this customer.

totalOrdersinteger (int64)

Total orders made by this customer.

totalDiscountedOrdersinteger (int64)

Total orders made by this customer that had a discount.

totalRevenuenumber

Total Revenue across all closed sessions.

totalDiscountsnumber

The sum of discounts that were given across all closed sessions.

json
{
  "acceptedCoupons": 0,
  "createdCoupons": 0,
  "freeItems": 0,
  "totalOrders": 0,
  "totalDiscountedOrders": 0,
  "totalRevenue": 0,
  "totalDiscounts": 0
}

Need more? See the Talon.One guide for connection setup and behaviour shared by every action.