> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CustomerEventAiAction

> What the AI agent did, as the help desk lists it in the conversation: the values the action's event recorded.

**cancellationReason** `String`

Why the agent canceled the order, the reason it gave the store's platform (such as CUSTOMER). Null for another action.

**discount** `[DiscountCode](/docs/api-reference/v3/reference/marketing/discount-code)`

The store's discount the agent made a code from. Null for another action, or a discount the store no longer has.

**fields**

**category** `[DiscountCodeCategory](/docs/api-reference/v3/reference/marketing/discount-code-category)`

What the discount is used for, such as `RECOVER` for the discounts the Recover builder lists. Null when no category is stored.

**code** `String!` *required*

The code customers enter at checkout.

**createdAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the discount was created.

**description** `String!` *required*

A short human-readable summary of what the code does.

**expiration** `[DiscountCodeExpiration!](/docs/api-reference/v3/reference/marketing/discount-code-expiration)` *required*

When this code stops working.

**fields**

**date** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

The expiry instant when `type` is ON\_DATE.

**days** `Int`

Days after creation when `type` is AFTER\_DAYS.

**type** `[DiscountCodeExpirationType!](/docs/api-reference/v3/reference/marketing/discount-code-expiration-type)` *required*

Whether the code never expires, expires on a date, after a number of days, or on delivery.

**externalId** `String!` *required*

The platform's id for this discount (a Shopify GID or a BigCommerce promotion id).

**groupType** `[DiscountCodeGroupType!](/docs/api-reference/v3/reference/marketing/discount-code-group-type)` *required*

Whether this is one fixed code or a unique code per customer.

**id** `ID!` *required*

The id of this discount code.

**kind** `[DiscountCodeKind](/docs/api-reference/v3/reference/marketing/discount-code-kind)`

How the discount reduces the order. Null when the config has no settings type.

**legacyId** `String!` *required*

The discount's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.

**provider** `[DiscountCodeProvider!](/docs/api-reference/v3/reference/marketing/discount-code-provider)` *required*

The commerce platform that hosts this code.

**settings** `[DiscountCodeSettings](/docs/api-reference/v3/reference/marketing/discount-code-settings)`

How the discount reduces the order.

**title** `String!` *required*

The merchant-facing name of the discount.

**updatedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the discount was last edited.

**discountCode** `String`

The code the agent made for this shopper from `discount`. The discount itself holds no per-shopper code, so the event's is the only record of it. Null for another action.

**orderValueChange** `[Money](/docs/api-reference/v3/reference/common/money)`

How much the order's total changed when the agent edited its items: positive when the shopper owes more, negative when they got money back. Null for another action, or when the edit recorded none.

**fields**

**amount** `[Decimal!](/docs/api-reference/v3/reference/common/decimal)` *required*

The exact amount as a decimal string (e.g. "19.99").

**currency** `String!` *required*

ISO 4217 currency code (e.g. USD).

**refundAmount** `[Money](/docs/api-reference/v3/reference/common/money)`

What canceling the order refunded. Null for another action, or when the cancel recorded no refund.

**fields**

**amount** `[Decimal!](/docs/api-reference/v3/reference/common/decimal)` *required*

The exact amount as a decimal string (e.g. "19.99").

**currency** `String!` *required*

ISO 4217 currency code (e.g. USD).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.