Skip to content

M7-S1 — Products: a second entity, a relation and a mapped field

Section titled “M7-S1 — Products: a second entity, a relation and a mapped field”
ModuleM7 — Connect the data
After this session you canConnect two entities so each shows the other, copy a value across the link, and change a live entity safely.
TimeFacilitated: 58 min · On your own: 58 min
Before you startM6-S1: the ticket Printer not found waits at Processing Ticket.
Go deeperLink entities · Reference field · Change an entity safely

◆ Orientation (1 min) — Which product is it about?

Section titled “◆ Orientation (1 min) — Which product is it about?”

The desk keeps asking customers which product a ticket concerns, and Premium customers expect faster help. In this session you add a Products entity, let the customer pick a product on the ticket, show each product’s tickets from the product’s side, and copy the product’s support level onto the ticket. Because Support Tickets is already in use, you also learn to change a live entity without breaking the tickets it holds.

▤ Concept (7 min) — Reference, relation, mapped field, and safe changes

Section titled “▤ Concept (7 min) — Reference, relation, mapped field, and safe changes”

In ACP a User field stored a link to a person, not a typed name. A Reference field does the same for a record of any entity.

PieceWhere you build itWhat it does
Reference field Product on Support Ticketsthe ticket’s Structure tabthe customer picks one product; the ticket stores which record, so renaming the product later does not break the link
Relation Tickets on Productsthe product’s Relations tab, Incomingthe same link seen from the product: every ticket whose Product points at it
Mapped field Support level on Support Ticketsthe ticket’s Structure tabcopies the chosen product’s Support level onto the ticket
flowchart LR
  T["Support Tickets"] -->|"Product (reference)"| P["Products"]
  P -. "Tickets (incoming relation)" .-> T
  P -->|"Support level, copied (mapped field)"| T

What to notice: there is one link, built once on the ticket. The relation is a way of reading it from the product’s side; the mapped field carries one value along it.

Outgoing relations are created for you from reference fields; you add Incoming ones yourself to see the link from the other end.

Update ModePeople can edit it?When the product changes later
From Parent OnlyNorefreshed automatically
NeverNonot refreshed: it keeps the value from when it was copied
Local UpdateYes, on this ticket onlynot refreshed
2 wayYes, and the edit is written back to the productrefreshed automatically

A ticket’s support level must always match the product’s current contract: From Parent Only. A signed order’s price must never change: Never.

Every ticket remembers the version of the entity it was saved with. Most changes are safe: adding an optional field, renaming. A breaking change, one existing records may not satisfy, creates a new version: making a field required, changing a field’s type, or changing the workflow (a step’s rules or time limit). Records saved before it become Obsolete. You met Draft, Active and Archived in ACP; Obsolete is the state a builder causes, and a builder fixes.

RecordWhat to do
Finished (closed or duplicate)Usually nothing: it opens, and it will never move again.
Still in progressUpgrade it, or it cannot go on through its workflow.

To upgrade, open the entity’s entries, filter to Obsolete entries, select the records, and choose Upgrade. For each field the new version needs, you choose where its value comes from (Fixed, Not Set, Default and others). If the workflow changed, tick Reset workflow if needed: the record restarts from the first step. That is why you make breaking changes in one go, and before go-live when you can.

When a breaking change has records, saving shows the Confirm Structure Changes dialog, listing each affected field and why. Read it before you select Save.

⛏ Lab (44 min) — Add Products and link the tickets

Section titled “⛏ Lab (44 min) — Add Products and link the tickets”

Goal. Create Products with three products; give tickets a Product and a Support level; add the Tickets relation; upgrade the obsolete ticket still in progress.

Before you start. Signed in as yourself.

Create Products

  1. In Customer Support System, on the Entities tab, select Add Data Entity. Name Products (Arabic المنتجات), Single Name Product, Plural Name Products, a box icon, Normal Entity. Select Create.
  2. On Structure, add Product name (Text, Required), Product line (Category: Software, Hardware, Service) and Support level (Category: Standard, Premium, Required). Select Save, Save Changes.
  3. Leave the designer (select Products in the path at the top). Select Add Product and add Help Desk Pro (Software, Premium); save.
  4. Add Router X2 (Hardware, Standard).
  5. Add Setup Visit (Service, Standard).

Link the tickets

  1. Edit Support Tickets and open Structure. Drag a Reference field and name it Product. In its data source settings choose the entity Products, one record only, Display format Flat, Display as Select list. Leave Required off.
  2. Drag a Mapped field and name it Support level. Choose the reference field Product, the source field Support level, and Update Mode From Parent Only.
  3. Select Workflows, and set the rules for Product: Mandatory at Open Ticket, Locked at the four other steps. Leave Support level as it comes (a copied value cannot be typed).
  4. Select Save. The Confirm Structure Changes dialog lists the workflow change. Read it and select Save.

Screenshot pending The Confirm Structure Changes dialog listing the change to the workflow steps What to notice: the dialog says what changed and why it matters. Adding the optional Product field alone would not have opened it; changing the steps’ rules does.

Add the relation

  1. Edit Products and select the Relations tab. Select Add Relation.
  2. Name Tickets, an icon; Relation Type Incoming; the entity Support Tickets and its field Product. Save. The Incoming card Tickets is listed.

Put Product on the customer’s form

  1. Edit Ticket Request: add Product and Support level under Type & source › Fields, to the Table view, to Entries details, and Product to Creating new entries and Editing entries. Save.
  2. Edit Incoming Requests the same way (no create form). Save.

Upgrade the ticket still in progress

  1. Open Support Tickets (leave the designer), open the list’s filters and include Obsolete entries. Printer not found and your earlier tickets are listed as obsolete.
  2. Select Printer not found only, and choose Upgrade (Entries 1) from the selection menu.
  3. For Product, choose Fixed, Help Desk Pro. Tick Reset workflow if needed. Select Upgrade.

Check it

  1. As Customer One, open a ticket in Ticket Request: Product is required. Pick Router X2, save: Support level shows Standard. Select Send Request.

Check.

  • Products has three records with their lines and support levels.
  • Support Tickets has Product (Reference to Products) and Support level (Mapped, From Parent Only).
  • Product is Mandatory at Open Ticket and Locked at the other steps.
  • Products shows the Incoming relation Tickets.
  • Printer not found is no longer obsolete, and a new ticket copies its product’s support level.

Pass condition. A new ticket cannot be sent without a product, and it shows the product’s support level, copied automatically.

If something goes wrong

What you seeWhat to do
The Reference field offers no productsIts data source is not Products, or Products has no records yet.
Support level stays empty on a ticketThe mapped field must follow Product and the source Support level; the ticket must have a product.
2 way is not offeredIt is unavailable when the two fields differ in being required. You do not need it here.
Upgrade refuses the ticketThe workflow changed: tick Reset workflow if needed.
The upgraded ticket is back at Open TicketThat is what Reset workflow if needed does. As Customer One, select Send Request again; the route restarts.
A relation cannot be edited or deletedIt is an outgoing relation made from a reference field; change the field instead.
Model answer

What you built, and the reasons:

  • Product is a Reference to Products, chosen from a list: the ticket stores which product, so renaming Router X2 later does not break any ticket.
  • Support level is Mapped with From Parent Only: it always matches the product’s current contract and nobody can type over it.
  • The Incoming relation Tickets lets a product show every ticket about it.
  • Product was added optional (a safe change), then made Mandatory at Open Ticket through the workflow, which is a breaking change: older tickets became obsolete. Closed ones were left; the one still in progress was upgraded, with a fixed product and a workflow reset.

✓ Practice (5 min) — Check your understanding

Section titled “✓ Practice (5 min) — Check your understanding”
PracticeChoose one answer.

An Orders entity copies the product’s Price when an order is placed. Prices change every quarter, and signed orders must keep the price agreed. Which Update Mode?

  1. Explanation for A

    ✗ Incorrect

    Not this one: it refreshes the copy when the product changes, so signed orders would change price. See Update modes.

  2. Explanation for B

    ✓ Correct

    Correct: the price is copied once and never refreshed, so the agreed price stays. See Update modes.

  3. Explanation for C

    ✗ Incorrect

    Not this one: it refreshes automatically and writes edits back to the product. See Update modes.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

On Products, you want a tab listing every ticket about the product. What do you add?

  1. Explanation for A

    ✗ Incorrect

    Not this one: that would be a second, separate link that someone would have to fill by hand. See Three ways two entities meet.

  2. Explanation for B

    ✗ Incorrect

    Not this one: a mapped field follows a reference on its own entity and copies one value. See Three ways two entities meet.

  3. Explanation for C

    ✓ Correct

    Correct: an incoming relation reads the existing link from the other side. See Three ways two entities meet.

Check your answer

The correct answer is C. Open the explanation under each option to see why.

Scenario

Support Tickets has 300 tickets: 280 closed, 20 in progress. The builder must add a required Channel field (Phone, Email, Portal).

PracticeChoose one answer.

What happens to the 300 tickets when the builder saves?

  1. Explanation for A

    ✗ Incorrect

    Not this one: a required field is a breaking change, because old tickets do not have a value. See Changing a live entity.

  2. Explanation for B

    ✓ Correct

    Correct: a breaking change creates a new version, and records saved before it are marked Obsolete. See Changing a live entity.

  3. Explanation for C

    ✗ Incorrect

    Not this one: obsolete records stay where they are and can still be opened. See Changing a live entity.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

Which upgrade plan is the most sensible?

  1. Explanation for A

    ✓ Correct

    Correct: in-progress tickets cannot continue while obsolete; closed ones will never move again. See Changing a live entity.

  2. Explanation for B

    ✗ Incorrect

    Not this one: the field change does not touch the workflow, and resetting would restart finished tickets. See Changing a live entity.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the business still needs the field, and the tickets already have a new version. See Changing a live entity.

Check your answer

The correct answer is A. Open the explanation under each option to see why.

You linked two entities with a reference, read the link from the other side with a relation, copied a value with a mapped field, and changed a live entity, upgrading the one ticket that needed it.

Next. In M7-S2 you reuse the tickets in a new shape: a read-only knowledge base of solved tickets, built as a virtual entity.