---
id: object/table/5076
type: object
title: Table 5076 "Segment Header"
summary: Table 5076 "Segment Header" in Base Application (Microsoft.CRM.Segment). 27 fields, 16 public procedures, 17 events. Present since at least BC23, still in BC30, changed in BC24, BC27-28.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "28"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 10cc4c5930f3a2d46c3529c6bbfbf9d806e1492b1c1f4334dccadb19ad9ec2d0
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/CRM/Segment/SegmentHeader.Table.al
    title: src/Layers/W1/BaseApp/CRM/Segment/SegmentHeader.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/marketing-add-contact-segment
    - https://learn.microsoft.com/dynamics365/business-central/marketing-how-create-segment
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/relationship-management/manage-segments
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 5076
name: Segment Header
namespace: Microsoft.CRM.Segment
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 27
  procedures: 37
  events: 17
  subscribers: 0
relations:
  out: 15
  referenced_by: 9
  pages: 2
  extended_by: 0
  event_subscribers: 0
  calls: 8
  called_by: 0
  implements: 0
---

# Table 5076 "Segment Header"

> Table 5076 "Segment Header" in Base Application (Microsoft.CRM.Segment). 27 fields, 16 public procedures, 17 events. Present since at least BC23, still in BC30, changed in BC24, BC27-28.

Base Application · Microsoft.CRM.Segment · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/CRM/Segment/SegmentHeader.Table.al) · facts from BC29

Learn documents this table through its pages: [Page 5091 "Segment"](../page/5091.md) (2 Learn pages), [Page 5093 "Segment List"](../page/5093.md) (2).

## Properties

| Property | Value |
|---|---|
| Caption | Segment Header |
| DataClassification | CustomerContent |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | No. | Code[20] | Specifies the number of the involved entry or record, according to the specified number series. |  |
| 2 | Description | Text[100] | Specifies the description of the segment. |  |
| 3 | Campaign No. | Code[20] | Specifies the number of the campaign for which the segment has been created. | TableRelation [Table 5071 "Campaign"](../table/5071.md) |
| 4 | Salesperson Code | Code[20] | Specifies the code of the salesperson responsible for this segment and/or interaction. | TableRelation [Table 13 "Salesperson/Purchaser"](../table/13.md) ("Salesperson/Purchaser" where(Blocked = const(false))) |
| 5 | Correspondence Type (Default) | Enum "Correspondence Type" | Specifies the preferred type of correspondence for the interaction. NOTE: If you use the Web client, you must not select the Hard Copy option because printing is not possible from the web client. <small>via [Page 5091 "Segment"](../page/5091.md)</small> | enum [Enum 5076 "Correspondence Type"](../enum/5076.md) |
| 6 | Interaction Template Code | Code[10] | Specifies the interaction template code of the interaction involving the segment. | TableRelation [Table 5064 "Interaction Template"](../table/5064.md) ("Interaction Template".Code) |
| 7 | Unit Cost (LCY) | Decimal | Specifies the cost, in LCY, of one unit of the item or resource on the line. <small>via [Page 5091 "Segment"](../page/5091.md)</small> |  |
| 8 | Unit Duration (Min.) | Decimal | Specifies the duration of a single interaction created for this segment. <small>via [Page 5091 "Segment"](../page/5091.md)</small> |  |
| 9 | Attachment No. | Integer | — | FlowField: lookup("Segment Interaction Language"."Attachment No." where("Segment No." = field("No."), "Segment Line No." = const(0), "Language Code" = field("Language Code (Default)"), "Word Template Code" = const(''))) |
| 10 | Date | Date | Specifies the date that the segment was created. |  |
| 11 | Campaign Target | Boolean | Specifies that the segment is part of the target of the campaign to which it is linked. |  |
| 12 | Information Flow | Option | Specifies the direction of the information that is part of the interaction created for the segment. There are two options: Inbound and Outbound. | OptionCaption: ,Outbound,Inbound |
| 13 | Initiated By | Option | Specifies whether the interaction recorded for this segment was initiated by your company or by one of your contacts. The Us option indicates that your company was the initiator; the Them option indicates that a contact was the initiator. | OptionCaption: ,Us,Them |
| 14 | No. Series | Code[20] | — | TableRelation [Table 308 "No. Series"](../table/308.md) (No. Series); not editable |
| 15 | Campaign Response | Boolean | Specifies that the interaction created for the segment is the response to a campaign. |  |
| 16 | No. of Lines | Integer | Specifies the number of lines within the segment. | FlowField: count("Segment Line" where("Segment No." = field("No."))); not editable |
| 17 | Cost (LCY) | Decimal | — | FlowField: sum("Segment Line"."Cost (LCY)" where("Segment No." = field("No."))); not editable |
| 18 | Duration (Min.) | Decimal | — | FlowField: sum("Segment Line"."Duration (Min.)" where("Segment No." = field("No."))); not editable |
| 19 | Language Code (Default) | Code[10] | Specifies the language code for the segment. <small>via [Page 5091 "Segment"](../page/5091.md)</small> | TableRelation [Table 8 "Language"](../table/8.md) |
| 20 | Interaction Group Code | Code[10] | — | TableRelation [Table 5063 "Interaction Group"](../table/5063.md) (Interaction Group) |
| 21 | No. of Criteria Actions | Integer | Specifies the number of actions you have taken when modifying the segmentation criteria, that is, when adding contacts to the segment, refining, or reducing it. | FlowField: count("Segment Criteria Line" where("Segment No." = field("No."), Type = const(Action))); not editable |
| 22 | Send Word Docs. as Attmt. | Boolean | Specifies that the Microsoft Word document should be sent as an attachment in the e-mail message. |  |
| 23 | Ignore Contact Corres. Type | Boolean | Specifies that the correspondence type that you select in the Correspondence Type (Default) field should be used. If there is no check mark, the program uses the correspondence type selected on the Contact Card. |  |
| 24 | Subject (Default) | Text[100] | Specifies the subject of the segment. The text in the field is used as the subject in e-mails and in Word documents. <small>via [Page 5091 "Segment"](../page/5091.md)</small> |  |
| 25 | Campaign Description | Text[100] | Specifies a description of the campaign to which the segment is related. The description is copied from the campaign card. | FlowField: lookup(Campaign.Description where("No." = field("Campaign No."))); not editable |
| 26 | Word Template Code | Code[30] | Specifies the Word Template code to use for merging. | TableRelation [Table 9988 "Word Template"](../table/9988.md) ("Word Template".Code where("Table ID" = const(5106))) |
| 27 | Modified Word Template | Integer | — | FlowField: lookup("Segment Interaction Language"."Attachment No." where("Segment No." = field("No."), "Segment Line No." = const(0), "Language Code" = field("Language Code (Default)"), "Word Template Code" = field("Word Template Code"))) |

## Keys

- Key1: No. (clustered)
- Key2: Salesperson Code
- Key3: Campaign No.

## Events published

- `OnAfterReuseLogged(var SegmentHeader: Record "Segment Header"; LoggedSegment: Record "Logged Segment")` (integration)
- `OnReuseLoggedOnBeforeFindInteractLogEntries(var SegmentHeader: Record "Segment Header"; LoggedSegment: Record "Logged Segment"; var InteractionLogEntry: Record "Interaction Log Entry")` (integration)
- `OnAfterUpdateSegHeader(var SegmentHeader: Record "Segment Header")` (integration)
- `OnAfterUpdateSegLinesByFieldNo(var SegmentHeader: Record "Segment Header"; CalledByFieldNo: Integer)` (integration)
- `OnBeforeReuseCriteria(var SegmentHeader: Record "Segment Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateSegHeader(var SegmentHeader: Record "Segment Header"; InteractTmplCode: Code[10]; InteractTmplChange: Boolean; var IsHandled: Boolean; CurrentFieldNo: Integer)` (integration)
- `OnBeforeUpdateSegLinesByFieldNo(SegmentHeader: Record "Segment Header"; ChangedFieldNo: Integer; var AskQuestion: Boolean; var IsHandled: Boolean)` (integration)
- `OnReuseCriteriaSavedSegmentCriteriaLineCaseElse(var SegmentHeader: Record "Segment Header"; var SavedSegmentCriteriaLine: Record "Saved Segment Criteria Line")` (integration)
- `OnAfterInsertSegmentLine(var SegmentLine: Record "Segment Line"; InteractionLogEntry: Record "Interaction Log Entry")` (integration)
- `OnBeforeSaveCriteria(var SegmentHeader: Record "Segment Header"; var IsHandled: Boolean)` (integration)
- `OnReuseContactsOnBeforeAddContactsRun(var AddContacts: Report "Add Contacts"; var SavedSegCriteriaLineAction: Record "Saved Segment Criteria Line")` (integration)
- `OnReuseContactsOnBeforeReduceContactsRun(var ReduceContacts: Report "Remove Contacts - Reduce"; var SavedSegCriteriaLineAction: Record "Saved Segment Criteria Line")` (integration)
- `OnReuseContactsOnBeforeRefineContactsRun(var RefineContacts: Report "Remove Contacts - Refine"; var SavedSegCriteriaLineAction: Record "Saved Segment Criteria Line")` (integration)
- `OnUpdateSegHeaderOnBeforeSecondModify(var SegmentHeader: Record "Segment Header")` (integration)
- `OnBeforeValidateSubjectDefault(var SegmentHeader: Record "Segment Header"; xSegmentHeader: Record "Segment Header"; var IsHandled: Boolean)` (integration)
- `OnCreateSegInteractionsOnAfterDeleteAll(InteractionTemplateCode: Code[10]; SegmentNo: Code[20]; SegmentLineNo: Integer; var IsHandled: Boolean)` (integration)
- `OnSaveCriteriaOnBeforeInsertSegmentCriteriaLine(var SegmentCriteriaLine: Record "Segment Criteria Line"; var SavedSegmentCriteriaLine: Record "Saved Segment Criteria Line")` (integration)

## Procedures

- `AssistEdit(OldSegHeader: Record "Segment Header"): Boolean`
- `CreateOpportunities()`
- `CreateSegInteractions(InteractionTemplateCode: Code[10]; SegmentNo: Code[20]; SegmentLineNo: Integer)`
- `UpdateSegLinesByFieldNo(ChangedFieldNo: Integer; AskQuestion: Boolean)`
- `SegLinesExist(ChangedFieldName: Text[100]): Boolean`
- `ReuseLogged(LoggedSegEntryNo: Integer)`
- `ReuseCriteria()`
- `SaveCriteria()`
- `MaintainAttachment()`
- `CreateAttachment()`
- `CreateWordTemplateAttachment()` (internal)
- `OpenAttachment()`
- `ImportAttachment()`
- `ExportAttachment()`
- `RemoveAttachment(Prompt: Boolean)`
- `UpdateSegHeader(InteractTmplCode: Code[10]; InteractTmplChange: Boolean)`

Plus 4 local procedures.

## Triggers

OnDelete, OnInsert

## Relations

- lookup page [Page 5093 "Segment List"](../page/5093.md)
- Salesperson Code: TableRelation [Table 13 "Salesperson/Purchaser"](../table/13.md)
- No. Series: TableRelation [Table 308 "No. Series"](../table/308.md)
- Interaction Group Code: TableRelation [Table 5063 "Interaction Group"](../table/5063.md)
- Interaction Template Code: TableRelation [Table 5064 "Interaction Template"](../table/5064.md)
- Campaign Description: CalcFormula [Table 5071 "Campaign"](../table/5071.md)
- Campaign No.: TableRelation [Table 5071 "Campaign"](../table/5071.md)
- Cost (LCY): CalcFormula [Table 5077 "Segment Line"](../table/5077.md)
- Duration (Min.): CalcFormula [Table 5077 "Segment Line"](../table/5077.md)
- No. of Lines: CalcFormula [Table 5077 "Segment Line"](../table/5077.md)
- No. of Criteria Actions: CalcFormula [Table 5097 "Segment Criteria Line"](../table/5097.md)
- Attachment No.: CalcFormula [Table 5104 "Segment Interaction Language"](../table/5104.md)
- Modified Word Template: CalcFormula [Table 5104 "Segment Interaction Language"](../table/5104.md)
- Language Code (Default): TableRelation [Table 8 "Language"](../table/8.md)
- Word Template Code: TableRelation [Table 9988 "Word Template"](../table/9988.md)

## Referenced by

9 fields in 9 objects relate to this table (TableRelation or CalcFormula).

- [Table 5072 "Campaign Entry"](../table/5072.md): Segment No.
- [Table 5077 "Segment Line"](../table/5077.md): Segment No.
- [Table 5078 "Segment History"](../table/5078.md): Segment No.
- [Table 5080 "To-do"](../table/5080.md): Segment No.
- [Table 5092 "Opportunity"](../table/5092.md): Segment No.
- [Table 5096 "Segment Wizard Filter"](../table/5096.md): Segment No.
- [Table 5097 "Segment Criteria Line"](../table/5097.md): Segment No.
- [Table 5104 "Segment Interaction Language"](../table/5104.md): Segment No.
- [Table 9063 "Relationship Mgmt. Cue"](../table/9063.md): Segments

## Pages and codeunits on this table

- [Page 5091 "Segment"](../page/5091.md) (source table)
- [Page 5093 "Segment List"](../page/5093.md) (source table)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 4100 "Temp Blob"](../codeunit/4100.md) (3 calls: `CreateWordTemplateAttachment → CreateOutStream`, `ModifyWordTemplateAttachment → CreateInStream`, `ModifyWordTemplateAttachment → CreateOutStream`)
- [Page 456 "No. Series"](../page/456.md) (2 calls: `AssistEdit → (object)`, `OnInsert → (object)`)
- [Codeunit 5052 "AttachmentManagement"](../codeunit/5052.md) (1 call: `CreateSegInteractions → InsertAttachment`)
- [Codeunit 5061 "SegHistoryManagement"](../codeunit/5061.md) (1 call: `ReuseLogged → InsertLine`)
- [Codeunit 5062 "SegCriteriaManagement"](../codeunit/5062.md) (1 call: `ReuseLogged → InsertReuseLogged`)
- [Codeunit 9510 "Document Service Management"](../codeunit/9510.md) (1 call: `ModifyWordTemplateAttachment → EditInOneDrive`)
- [Page 5139 "Logged Segments"](../page/5139.md) (1 call: `ReuseLogged → (object)`)
- [Page 5141 "Saved Segment Criteria List"](../page/5141.md) (1 call: `ReuseCriteria → (object)`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC27-28

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "table", object_name: "Segment Header")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
