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”| Module | M7 — Connect the data |
| After this session you can | Connect two entities so each shows the other, copy a value across the link, and change a live entity safely. |
| Time | Facilitated: 58 min · On your own: 58 min |
| Before you start | M6-S1: the ticket Printer not found waits at Processing Ticket. |
| Go deeper | Link 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”Three ways two entities meet
Section titled “Three ways two entities meet”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.
| Piece | Where you build it | What it does |
|---|---|---|
| Reference field Product on Support Tickets | the ticket’s Structure tab | the customer picks one product; the ticket stores which record, so renaming the product later does not break the link |
| Relation Tickets on Products | the product’s Relations tab, Incoming | the same link seen from the product: every ticket whose Product points at it |
| Mapped field Support level on Support Tickets | the ticket’s Structure tab | copies 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 modes: when the copy refreshes
Section titled “Update modes: when the copy refreshes”| Update Mode | People can edit it? | When the product changes later |
|---|---|---|
| From Parent Only | No | refreshed automatically |
| Never | No | not refreshed: it keeps the value from when it was copied |
| Local Update | Yes, on this ticket only | not refreshed |
| 2 way | Yes, and the edit is written back to the product | refreshed 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.
Changing a live entity
Section titled “Changing a live entity”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.
| Record | What to do |
|---|---|
| Finished (closed or duplicate) | Usually nothing: it opens, and it will never move again. |
| Still in progress | Upgrade 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
- 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.
- On Structure, add Product name (Text, Required), Product line (Category: Software, Hardware, Service) and Support level (Category: Standard, Premium, Required). Select Save, Save Changes.
- Leave the designer (select Products in the path at the top). Select Add Product and add Help Desk Pro (Software, Premium); save.
- Add Router X2 (Hardware, Standard).
- Add Setup Visit (Service, Standard).
Link the tickets
- 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.
- 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.
- 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).
- 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
- Edit Products and select the Relations tab. Select Add Relation.
- 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
- 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.
- Edit Incoming Requests the same way (no create form). Save.
Upgrade the ticket still in progress
- 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.
- Select Printer not found only, and choose Upgrade (Entries 1) from the selection menu.
- For Product, choose Fixed, Help Desk Pro. Tick Reset workflow if needed. Select Upgrade.
Check it
- 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 see | What to do |
|---|---|
| The Reference field offers no products | Its data source is not Products, or Products has no records yet. |
| Support level stays empty on a ticket | The mapped field must follow Product and the source Support level; the ticket must have a product. |
| 2 way is not offered | It is unavailable when the two fields differ in being required. You do not need it here. |
| Upgrade refuses the ticket | The workflow changed: tick Reset workflow if needed. |
| The upgraded ticket is back at Open Ticket | That is what Reset workflow if needed does. As Customer One, select Send Request again; the route restarts. |
| A relation cannot be edited or deleted | It 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”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?
Check your answer
The correct answer is B. Open the explanation under each option to see why.
On Products, you want a tab listing every ticket about the product. What do you add?
Check your answer
The correct answer is C. Open the explanation under each option to see why.
Support Tickets has 300 tickets: 280 closed, 20 in progress. The builder must add a required Channel field (Phone, Email, Portal).
What happens to the 300 tickets when the builder saves?
Check your answer
The correct answer is B. Open the explanation under each option to see why.
Which upgrade plan is the most sensible?
Check your answer
The correct answer is A. Open the explanation under each option to see why.
↺ Recap (1 min) — What you can do now
Section titled “↺ Recap (1 min) — What you can do now”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.