> ## 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.

# RecoverConfig

> The settings of one Recover step in a marketing automation: the outreach message it sends, how it answers the shopper's replies, and the discount it offers.

**Required scopes:** [`marketing_templates_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-marketing_templates_read), [`marketing_templates_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-marketing_templates_write)

**ageGateYears** `Int`

The minimum age a shopper must confirm before Recover sends replies: Recover asks for a birthdate first and replies once the shopper meets this age. Null when there is no age gate.

**agentOutreachEnabled** `Boolean!` *required*

Whether Commerce Agent writes each outreach message. When true, `outreachTemplate` is guidance for the agent and each shopper gets a personalized message. When false, `outreachTemplate` is sent as written.

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

When the config was created. Null for a config with no recorded time.

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

The discount that `{{ discount_code }}` and `{{ discount_link }}` in the messages resolve to. Null when the config has none. When the store gives each shopper a discount from its discount offer list, the offer list's pick is used instead: in the outreach only when `agentOutreachEnabled` is true, and always in the reply template. Reading it needs the `campaigns_read` scope, which Marketing access includes.

**Requires:** [`campaigns_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_read)

**fields**

**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.

**fallback** `[RecoverFallback!](/docs/api-reference/v3/reference/marketing/recover-fallback)` *required*

What Recover does with a reply that `replyTemplate` doesn't cover, or with every reply when there is no reply template.

**fields**

**mode** `[RecoverFallbackMode!](/docs/api-reference/v3/reference/marketing/recover-fallback-mode)` *required*

What Recover does with such a reply.

**template** `String!` *required*

The message sent as the reply when `mode` is TEMPLATE. It is kept when `mode` is another value, and used again if `mode` goes back to TEMPLATE.

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

The id of this Recover config. `recoverConfig` also accepts the `templateId` from a RECOVER step's params in an automation.

**name** `String!` *required*

The config's name in the Recover builder, which the merchant uses to tell their Recover configs apart.

**outreachTemplate** `String!` *required*

The first message to the shopper, or the agent's guidance for it when `agentOutreachEnabled` is true. It can use variables such as `{{ discount_code }}`.

**replyTemplate** `String`

The message sent as written when a shopper's reply fits the scenario the outreach set up. Null when there is none: every reply is handled by `fallback`.

**trigger** `[MarketingTrigger!](/docs/api-reference/v3/reference/marketing/marketing-trigger)` *required*

The trigger the config was created for, which decides the variables its messages can use. Set when the config is created and not changed. A config saved before triggers were recorded reads as MARKETING\_CHECKOUT\_ABANDONMENT. UNKNOWN when the stored trigger is not modeled in this API version.

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

When the config was last edited. Null for a config with no recorded time.


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