> For the complete documentation index, see [llms.txt](https://documentation.opencrvs.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.opencrvs.org/v2.1/technical/guides/configuration/events/summary.md).

# Summary

The `summary` config defines the **event overview page** — the record summary a user sees when they open a record. It has two parts:

* `fields` — the rows of the summary.
* `banners` — optional info boxes shown above the fields.

```typescript
// src/events/birth/index.ts
export const birthEvent = defineConfig({
  // id, label, declaration, actions, flags, ...
  summary: {
    banners: [ /* info boxes — see Banners */ ],
    fields: [ /* rows — see Summary fields */ ]
  }
})
```

## Summary fields

Each entry in `fields` is a row. There are two kinds.

### Reference an existing declaration field

Point at a declaration field by `fieldId` to show its value. Optionally override its `label`, provide an `emptyValueMessage` for when it has no value, and gate it with `conditionals`.

```typescript
{
  fieldId: 'child.dob',
  emptyValueMessage: {
    id: 'event.birth.summary.child.dob.empty',
    defaultMessage: 'No date of birth',
    description: 'Shown when the child has no recorded date of birth'
  }
}
```

### Define a custom field

A custom row has its own `id`, `label` and a templated `value`. The `value` template can reference:

* **declaration data** by field id — e.g. `{informant.phoneNo} {informant.email}`;
* **event metadata** via the `event.` prefix — e.g. `{event.legalStatuses.REGISTERED.acceptedAt, date, ::dd MMMM yyyy}`.

Metadata date fields are timestamps, so format them with the ICU `date` syntax as shown, rather than printing them raw.

```typescript
{
  id: 'event.registeredAt',
  label: {
    id: 'event.adoption.summary.event.registeredAt.label',
    defaultMessage: 'Registration date',
    description: 'Label for the registration date row'
  },
  value: {
    id: 'event.adoption.summary.event.registeredAt.value',
    defaultMessage:
      '{event.legalStatuses.REGISTERED.acceptedAt, date, ::dd MMMM yyyy}',
    description: 'The date the record was registered'
  },
  emptyValueMessage: {
    id: 'event.adoption.summary.event.registeredAt.empty',
    defaultMessage: 'No registration date',
    description: 'Shown before the record is registered'
  }
}
```

### Show or hide a row

Both kinds accept an array of [Conditionals](/v2.1/technical/guides/configuration/events/conditionals.md). When omitted, the row is always shown. This is how, for example, [Sealed records](/v2.1/technical/guides/use-cases/sealed-records.md) hides sensitive rows with `not(flag('sealed'))`:

```typescript
{
  fieldId: 'child.nid',
  conditionals: [
    {
      type: ConditionalType.SHOW,
      conditional: and(not(field('child.nid').isFalsy()), not(flag('sealed')))
    }
  ]
}
```

## Banners

`banners` is an array of **info boxes** displayed above the summary fields. Use one to surface a state or a suggested next step — for example a "Record is protected" notice on a sealed record.

Each banner is an `InfoBox`:

| Property       | Required | Description                                                                             |
| -------------- | -------- | --------------------------------------------------------------------------------------- |
| `type`         | yes      | Semantic tint: `info` (blue), `positive` (green), `warning` (orange), `negative` (red). |
| `heading`      | yes      | Primary message. Short, sentence-case.                                                  |
| `description`  | no       | Secondary copy below the heading, typically a suggested next step.                      |
| `icon`         | no       | Icon shown in the block. Defaults to `FileSearch`.                                      |
| `background`   | no       | `tinted` (default) reads as a recessed empty state; `white` reads as a standalone card. |
| `conditionals` | no       | `SHOW` conditions. When omitted, the banner is always shown.                            |

**Example — a banner shown only while the record carries the `sealed` flag:**

```typescript
summary: {
  banners: [
    {
      type: 'negative',
      icon: 'FileLock',
      heading: {
        id: 'event.birth.summary.banner.sealed.title',
        defaultMessage: 'Record is protected',
        description: 'Heading of the banner shown when a record is sealed'
      },
      description: {
        id: 'event.birth.summary.banner.sealed.description',
        defaultMessage: 'Request to unseal to view this record',
        description: 'Description of the banner shown when a record is sealed'
      },
      conditionals: [
        { type: ConditionalType.SHOW, conditional: flag('sealed') }
      ]
    }
  ],
  fields: [ /* ... */ ]
}
```

## SummaryConfig schema

## The SummaryConfig object

```json
{"openapi":"3.1.0","info":{"title":"OpenCRVS API","version":"2.0.0"},"components":{"schemas":{"SummaryConfig":{"type":"object","properties":{"banners":{"description":"Info boxes displayed above the summary fields in the event overview.","default":[],"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["info","positive","warning","negative"],"description":"Semantic tint of the icon block: info (blue), positive (green), warning (orange), negative (red)."},"background":{"description":"tinted reads as a recessed empty state; white reads as a standalone card.","default":"tinted","type":"string","enum":["tinted","white"]},"icon":{"description":"Icon displayed inside the icon block. Defaults to FileSearch.","type":"string","enum":["Archived","Assigned","Briefcase","Certified","Close","Collapse","Draft","DuplicateYellow","Expand","ExternalValidate","FilledCheck","InReview","Offline","Registered","RequiresUpdates","Sent","Validated","WaitingApproval","ChartActivity","Activity","Archive","ArchiveTray","ArrowLeft","ArrowRight","Buildings","Circle","CaretDown","CaretLeft","CaretRight","ChartBar","ChartLine","ChatCircle","CheckSquare","Compass","Check","Copy","Database","DotsThreeVertical","ArrowCounterClockwise","MagnifyingGlassMinus","MagnifyingGlassPlus","Export","Eye","EyeSlash","Envelope","File","FileLock","FileSearch","FileMinus","FilePlus","FileText","FileX","Handshake","Gear","GitBranch","IdentificationCard","List","ListBullets","Lock","MagnifyingGlass","MapPin","Medal","NotePencil","Paperclip","PaperPlaneTilt","Pen","PenNib","Pencil","PencilSimpleLine","Phone","Plus","Printer","SignOut","Stamp","Star","Target","TextT","Trash","UploadSimple","User","UserPlus","Users","WarningCircle","X","ChatText","CircleWavyCheck","CircleWavyQuestion","ArchiveBox","ArrowCircleDown","FileArrowUp","FileDotted","Files","PencilLine","PencilCircle","UserCircle","Clock","QrCode","Webcam","Sun","DeviceTabletCamera","Globe","Fingerprint","PushPin","Timer"]},"heading":{"description":"Primary message. Short, sentence-case.","$ref":"#/components/schemas/TranslationConfigOutput"},"description":{"description":"Secondary copy displayed below the heading, typically a suggested next step.","$ref":"#/components/schemas/TranslationConfigOutput"},"conditionals":{"description":"Conditions under which the info box is shown. When omitted, it is always shown.","default":[],"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"SHOW"},"conditional":{"$ref":"#/components/schemas/Conditional"}},"required":["type","conditional"],"additionalProperties":false,"description":"If 'SHOW' conditional is defined, the component is shown to the user only if the condition is met"}}},"required":["type","heading"],"additionalProperties":false,"description":"A compact icon-block + heading + description block displayed above the summary fields in the event overview."}},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"emptyValueMessage":{"description":"Default message displayed when the field value is empty.","$ref":"#/components/schemas/TranslationConfigOutput"},"conditionals":{"default":[],"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"SHOW"},"conditional":{"$ref":"#/components/schemas/Conditional"}},"required":["type","conditional"],"additionalProperties":false,"description":"If 'SHOW' conditional is defined, the component is shown to the user only if the condition is met"}},"id":{"type":"string","description":"Identifier of the summary field."},"value":{"description":"Field value template supports variables from configuration (e.g. \"{informant.phoneNo} {informant.email}\") and EventMetadata (e.g. \"{event.legalStatuses.REGISTERED.acceptedAt, date, ::dd MMMM yyyy}\").","$ref":"#/components/schemas/TranslationConfigOutput"},"label":{"$ref":"#/components/schemas/TranslationConfigOutput"}},"required":["id","value","label"],"additionalProperties":false,"description":"Custom field defined for the summary view."},{"type":"object","properties":{"emptyValueMessage":{"description":"Default message displayed when the field value is empty.","$ref":"#/components/schemas/TranslationConfigOutput"},"conditionals":{"default":[],"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"SHOW"},"conditional":{"$ref":"#/components/schemas/Conditional"}},"required":["type","conditional"],"additionalProperties":false,"description":"If 'SHOW' conditional is defined, the component is shown to the user only if the condition is met"}},"fieldId":{"type":"string"},"label":{"description":"Overrides the default label from the referenced field when provided.","$ref":"#/components/schemas/TranslationConfigOutput"}},"required":["fieldId"],"additionalProperties":false,"description":"Field referencing existing event data by field ID."}]},"description":"Fields displayed in the event summary view."}},"required":["fields"],"additionalProperties":false,"description":"Configuration of the event overview page. Defines which declaration fields appear in the record summary, optionally with custom labels, empty-value messages, and templated values."},"TranslationConfigOutput":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the translation referred in translation CSV files"},"defaultMessage":{"type":"string","description":"Default translation message"},"description":{"type":"string","description":"Describe the translation for a translator to be able to identify it."}},"required":["id","defaultMessage","description"],"additionalProperties":false,"description":"Translation configuration"},"Conditional":{"description":"JSON schema conditional configuration"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.opencrvs.org/v2.1/technical/guides/configuration/events/summary.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
