Transaction Cards
  • 29 Sep 2022
  • 8 Minutes To Read
  • PDF

Transaction Cards

  • PDF

Transactions represent a variable list of activities pertaining to the Customer (e.g., orders, hotel stays). As mentioned in the Auto-linking, Basic Search, and Detailed Lookup guide, transactions are an Array of transaction objects to be sent back in response to a Detailed Lookup request. These are presented as cards on the left side of the Customer Profile.

This guide gives detailed information on transactions and their use.

Overview

Implement multiple types of Transaction Cards to ingest and display Customer data. This also allows you to implement as many Transaction Cards as you need. Suppose you have five Shopify stores, you can display Customer transaction data from each Shopify store in their own, unique Transaction ORDER Card. 

You can also have different Transaction Cards. For example, a hotel business can have an ORDER card for their merchandise Shopify store and a STAY card to display hotel reservations. 

Choose a Transaction type

The choice of transaction type dictates how Gladly displays the data.

Note - Transactions and the Customer API

You cannot set or retrieve transactions via the GET Customer or PATCH Customer APIs. Transactions can only be set through a response to a Detailed Lookup request.

Example Transaction Types

  • ORDER: Orders
  • FLIGHT: Flights
  • STAY: Hotel stays
  • SUBSCRIPTION: Subscriptions
  • GENERIC: All other transactions

Transaction Card label

Each Transaction Type has a default card label:

  • ORDER: Orders
  • FLIGHT: Reservations
  • STAY: Stays
  • SUBSCRIPTION: Subscriptions
  • GENERIC: Transaction

By default, the label for each card reflects the number of records associated with each type. For example, if a Customer has 8 orders, the ORDER card label will say 8 Orders. If the Customer has one three-night reservation, the STAY card label will say 1 Stay

You may choose to change the card label to something that makes sense to your business (e.g, the name of your e-store brand). If you choose to customize the card label, it will no longer show the number of records for the card.

Availability

ORDER cards will appear automatically in the Customer Profile without Professional Services assistance when e-commerce apps like Shopify or BigCommerce are added through the Apps page. Other Transaction Types require Professional Services assistance for configuration before the card can appear in Gladly. Any additional customization beyond the first ORDER card also requires Professional Services assistance.

Visibility

Transaction Cards are not visible in the Customer Profile unless there's transaction data. For example, the ORDER Transaction Card will not be visible on a Customer's Profile if the Customer has no orders.

Use of custom Lookup Adaptors with Transaction Cards

Apps added through Gladly have default values to look up Customer data to display in Gladly. If you build a custom Lookup Adaptor to allow you to pull additional Customer data to Gladly not readily available with our integrated apps, make sure your Lookup Adaptor is passing the correct attributes to Gladly. Only then can our Professional Services team configure which card the attribute appears.

Multiple Transaction Cards

There's no additional action required if you only use one Transaction Type. For example, just one ORDER card for a single Shopify instance. To have multiple cards requires additional review:

  • If using a custom Lookup Adaptor, you must make sure the Lookup Adaptor is passing the correct attributes back to Gladly. You'll need to pass a transaction attribute that helps distinguish what data should be displayed in each card (e.g., brand name, geography, etc.). Work with Gladly Professional Services to add additional cards beyond the first. They can ensure the cards are pulling data from the correct instance and show in the correct card.
  • If you already have an out-of-the-box app in Gladly (e.g., Shopify) and you add another out-of-the-box app (e.g., another Shopify store), the transactions from both apps will be displayed on the same transaction card. If it makes sense for your business, work with Gladly Professional Services to add another Transaction Card for the newest app you've added in Gladly.

Transaction Attributes

Each transaction is an object within an array and can be extended to have its own set of single-level key value pairs.

An exception is made for ORDER type transactions that support an Array of product objects as documented below.

ORDER Transactions

When first displayed, orders are collapsed:

Agents can manually expand each order. 

new order card ui

To accomplish this, each ORDER type transaction object uses the following structure. You may extend each product or transaction object further with more attributes, though you will need to engage with Professional Services to configure them to display in the Gladly Customer Profile.

If any of the below reserved fields are not sent as part of your Detailed Lookup response, the spaces for them will be left blank.

{
  "type": "ORDER",
  "createdAt": "2020-08-01T12:00:00.000Z",
  "orderNumber": "1832",
  "itemCount": "5",
  "customerOrderUrl": "https://retail.com/edit/order/1832",
  "status": "Completed",
  "orderLink": "https://retail.com/admin/orders/1832",
  "orderTotal": "$50",
  "note": "This order is a gift purchase with an extended returns window.",
  "orderStatus": "Completed",
  "fulfillments": [
    {
      "productIds": ["12345", "54321"],
      "estimatedDeliveryDate": "2020-08-10T12:00:00.000Z",
      "trackingUrl": "http://track.dhl-usa.com/TrackByNbr.asp?ShipmentNumber=00064735172",
      "trackingNumber": "00064735172",
      "status": "delivered"
    }
  ],
  "products": [
    {
      "id": "12345",
      "name": "Socks",
      "status": "fulfilled",
      "productId": "alphanumeric values",
      "sku": "alphanumeric values",
      "imageUrl": "https://www.image.com/1"
    },
    {
      "id": "54321",
      "name": "Scarf",
      "status": "fulfilled",
      "sku": "alphanumeric values",
      "imageUrl": "https://www.image.com/2"
    }
  ]
}

Tip - The status and imageUrl fields
  • The status field can be fulfilled, pending, or cancelled.
  • The imageUrl field (if supplied) must be an HTTPS link to a product image.
  • Properties cannot have the same name between transactions and products.

This is how the above reserved keys map to the layout:
2_orders.png


For customer-facing Self-Service Thread in Sidekick, Customers will see the following: 


Any additional attributes you send in each product object in the products array will display under the product status so long as Gladly has allowed them to be displayed.

Order

Attribute NameTypeNotes
typestringMust be ORDER
createdAtdateThe date order was created
orderNumberstringThe order number and unique identifier for the order
statusurlCustomer-facing field representing the status of the order in a Self-Service Thread. Values may be LUA/Customer specific.
orderLinkstringURL for the order in your OMS for Agents to view / edit
orderTotalenumAmount formatted with the currency symbol
Is also customer-facing within a Self-Service thread
currencyCodenumberCurrency code for the order total, following https://en.wikipedia.org/wiki/ISO_4217 If this is not present, currency type will be inferred from the symbol provided in orderTotal
itemCounturlNumber of items in the order
customerOrderUrlstringCustomer-facing URL for managing the order - relevant for Self-Service Threads
products[]ProductList of products in the order
fulfillment[]FulfillmentList of fulfillments associated with the order. 

Product (nested within Order)

Attribute NameTypeNotes
namestringName of product displayed to agent
idstringProduct ID
statusstringStatus of line item
skustringSKU ID of line item displayed to agent
imageUrlurlImage URL of product displayed to agent

Fulfillment (nested within Order)

The following will be displayed to Customers who interact with you on your site via Self-Service Threads, but will not be viewable by Agents in Gladly unless the Customer interacted with a Thread.

Attribute NameTypeNotes
estimatedDeliveryDatedateCustomer-facing estimated delivery date of shipment N in this order
productIdsarray of StringsCustomer-facing list of product IDs in this shipment
trackingUrlurlCustomer-facing tracking URL that customer can click to track their order
trackingNumberstringCustomer-facing tracking number
statusstringCurrent status of fulfillment item

Tooltip

Hover over to view clipped text.

FLIGHT Transactions

When first displayed, flights are collapsed.

Each flight can be manually expanded by an Agent.

To accomplish this, each FLIGHT type transaction object uses the following structure. You can extend each transaction object further with more attributes, though you will need to engage with Professional Services to configure them to display in the Gladly Customer Profile.

If any of the below reserved fields are not sent as part of your Detailed Lookup response, the spaces for them will be left blank.

Text
Text
Text
Text
{
  "departureTime": "2017-04-01T08:00:00",
  "destination": "SFO",
  "flightNumber": "12345",
  "origin": "SEA",
  "pnrCode": "A12345",
  "status": "ON TIME",
  "type": "FLIGHT"
}

This is how the above reserved keys map to the layout:
flight_expanded_mapping.png

STAY Transactions

When first displayed, stays are collapsed.

Any stay that is current or in the future is grouped in the Current & Future panel. 

An Agent can manually expand each stay. Agents can also hover over each stay to view their image address and neighborhood

Current Stay

Other stays are in the Previous panel.

Tooltip

View clipped stay details.

stay_hover.png

To accomplish this, each STAY type transaction object uses the following structure. You can extend each product or transaction object further with more attributes, though you will need to engage with Professional Services to configure them to display in the Gladly Customer Profile. 

If any of the below reserved fields are not sent as part of your Detailed Lookup response, the spaces for them will be left blank.

Text
Text
Text
Text
{
    "type": "STAY",
    "checkInTime": "2021-01-01T00:00:00.000Z",
    "checkOutTime": "2021-10-01T00:00:00.000Z",
    "timezone": "Pacific Standard Time",
    "url": "https://www.gladly.com",
    "title": "Reservation 1",
    "address": "San Francisco",
    "neighborhood": "Financial District"
  }

This is how the above reserved keys map to the layout:
stay_mapping.png

SUBSCRIPTION Transactions

When first displayed, subscription transactions are collapsed:

Agents can expand each transaction to see details such as Status, Billing Frequency, Product, and more. The most recent cancelled transaction will be at the top of the list if there are multiple cancelled transactions.

Agents are also now empowered to update Customer subscriptions. When they hover over Product, they can see an associated image. Agents can also cancel active subscriptions and reactivate cancelled subscriptions.

To accomplish this, each SUBSCRIPTION type transaction object uses the following structure. You may extend each product or transaction object further with more attributes, though you will need to engage with Professional Services to configure them to display in the Gladly Customer Profile.

If any of the below reserved fields are not sent as part of your Detailed Lookup response, the spaces for them will be left blank.

Text
Text
{
    "type": "SUBSCRIPTION",
    "subscriptionId": "string",
    "status": "Active",
    "createdAt": "2020-08-01T12:00:00.000Z",
    "updatedAt": "2020-08-01T12:00:00.000Z",
    "billingIntervalUnit": "Days",
    "billingFrequencyNumber": "4",
    "nextBillingAt": "2020-08-01T12:00:00.000Z",
    "cancellationDate": "2020-08-01T12:00:00.000Z",
    "cancellationReason": "text",
    "quantity": "5",
    "price": "$10"
    "products": [
        {
          "name": "Shoes",
	      "productId": "alphanumeric values",
	      "sku": "alphanumeric values",
	      "imageUrl": "https://www.image.com/1"
        }
      ]
}

Note – Billing Fields
While billingIntervalUnit and billingIntervalNumber both exist as individual fields, if both are present and valid, they are combined into billingFrequency. 
This is how the above reserved keys map to the layout:

GENERIC Transactions

Generic transactions display as boxes that cannot be expanded or collapsed, like such:
generic.png

To accomplish this, each GENERIC type transaction object uses the following structure. You may extend each product or transaction object further with more attributes, though you will need to engage with Professional Services to configure them to display in the Gladly Customer Profile. If any of the below reserved fields are not sent as part of your Detailed Lookup response, the spaces for them will be left blank.

Text
Text
Text
Text
{
  "type": "GENERIC"
  ....
}

Any additional attributes you send in each GENERIC type object will display in the box so long as Gladly has allowed them to be displayed. For example, in the screenshot above, the transactions array looks like this:

Text
Text
Text
Text
[{
  "type": "GENERIC"
  "name": "RES 1"
}, {
  "type": "GENERIC"
  "name": "RES 2"
}]

Was this article helpful?

What's Next