Workflow

How to Create a Commercial Record

Verified end to end. Demo run create-business-20260519T032902Z created commercial record [15] AI Demo Commercial 20260519T032902Z and verified it through DT_Select on represnt and the Sel2_Select_v2 representative selector.

Evidence Summary

Route
/entidades/comerciais
Page title
OG - Business
Workflow run
create-business-20260519T032902Z
Created record
[15] AI Demo Commercial 20260519T032902Z
Final URL
/entidades/comerciais/view/MTU=
Evidence file
raw/playwright/workflows/latest-create-business.json

Verified commercial record creation workflow

When to Use This

Use this workflow for commercial/sales representative records shown under Entities / Business. These records appear in representative selectors, have entity contact data, can be linked to customers and sales zones, and use entity type code R in related entity/contact requests.

Step-by-Step

  1. Open Entities / Business, or navigate directly to /entidades/comerciais.
  2. Click New Commercial. OfficeGest opens modal nuevocomerciai with form form_nuevocomerciai.
  3. Enter the required VAT Number.
  4. Enter the required identity and address fields: Name, Address, Location, and Zip Code.
  5. Confirm Country. The verified run used Portugal, stored as CodPais=PT.
  6. Optionally enter Email, Phone, and Cell phone.
  7. Click Save. OfficeGest posts createNovoComercial.
  8. OfficeGest redirects to the commercial detail page. The verified final URL was /entidades/comerciais/view/MTU=.
  9. Confirm the record through the Business grid. The grid uses DT_Select with table=represnt.

Required and Default Fields

FieldVerified behavior
VAT NumberRequired. Stored as NContrib.
NameRequired. Stored as Nome.
AddressRequired. Stored as Morada.
LocationRequired. Stored as Localidade.
Zip CodeRequired. Stored as CodPostal.
CountryRequired. The modal defaulted to Portugal / PT.
EmailOptional in the visible form. The detail page retained the full address; the grid display truncated it to the visible column width/data payload.
Phone and Cell phoneOptional. Saved values include the country prefix, for example +351.244000006 and +351.969032902.

Verified Created Record

FieldValue
Commercial id15
NameAI Demo Commercial 20260519T032902Z
VAT590329022
AddressRua Comercial Demo 19
LocationLeiria
Zip Code2400-006
Emailai-demo-commercial-20260519t032902z@example.invalid
Phone+351.244000006
Cell phone+351.969032902
StatusActivo: T

Backend Calls Observed

Action or endpointPurpose
DT_Select&table=represntLoads the Business grid. The verified list response contained row CodRepres: 15.
loadFormTriggered when the modal opens. The full form is also present in the route DOM as form_nuevocomerciai.
createNovoComercialCreates the commercial record. The payload included NContrib, Nome, Morada, Localidade, CodPostal, CodPais, EMail, phone, and mobile.
entidades&option=entityContactsLoads contact cards on the created commercial detail page with entity_type=R and entity_id=15.
Sel2_Select_arraysResolves the commercial in the all-entities selector with aent.tipo=R.
Sel2_Select_v2Resolves the representative selector with table=represnt, id=CodRepres, and value=Nome.
NameEntidadesLookup probes with tabla=Represnt, tabla=Repres, and tabla=Comercial returned []; representative data was verified through DT_Select and selectors instead.

Raw evidence: raw/playwright/workflows/create-business-20260519T032902Z.json. Screenshots: assets/screenshots/create-business-20260519T032902Z-01-business-list.png through assets/screenshots/create-business-20260519T032902Z-05-verified-list.png.

Detail View Context

After save, the detail page showed tabs/areas for General, Sales Zones, Customers, Extra Fields, Tags, Loyalty, Tickets, Attachments, and GDPR. The general area showed active state, name, VAT number, address, location, zip code, state, country, commission type, GDPR authorization fields, observations, and entity contact cards.