Salesperson management
The Aptean Apparel Salesperson Management feature provides a complete, priority-driven way to assign salespersons to customers and have the correct salesperson codes applied to sales documents automatically. It replaces manual, error-prone salesperson entry on each order with flexible assignment at three levels of granularity — Ship-to Address, Customer Division, and Customer — backed by a per-user fallback in User Setup, all within Microsoft Dynamics 365 Business Central. Every level supports two salespersons, a primary Salesperson Code and a secondary Salesperson 2 Code, so shared or split sales responsibility (for example, for commission purposes) is captured on the document from the moment it is created.
Whenever the customer, the ship-to address, or the division on a Sales Order, Sales Invoice, Sales Credit Memo, or Sales Return Order changes, the system re-evaluates a fixed priority sequence — Ship-to Address first, then Customer Division, then the sell-to Customer, and finally the current user's User Setup — and applies both salesperson codes from the highest-priority source that has one. Changing the bill-to customer never disturbs the salespersons, blocked and privacy-blocked salespersons can never be selected or assigned, and the same validation rules are enforced identically on every page where the codes are maintained.
Salesperson Management is typically used to:
-
Assign a primary and a secondary salesperson per Customer + Division combination on the new Customer Division page.
-
Assign a primary and a secondary salesperson per ship-to address, so orders delivered to different locations are credited to different salespersons.
-
Assign a second salesperson on the Customer Card, defaulted from the creating user's User Setup.
-
Define a per-user salesperson pair in User Setup as the final fallback for sales documents.
-
Populate both salesperson codes on sales documents automatically, using the Ship-to → Customer Division → Customer → User Setup priority sequence.
-
Re-derive the salespersons automatically whenever the Sell-to Customer No., Ship-to Code, or Division Code on a document changes.
-
Keep the salespersons unchanged when the Bill-to Customer on a document changes.
-
Prevent blocked and privacy-blocked salespersons from being selected anywhere the codes are maintained.
Setup salespersons by customer division
The Customer Division page holds the salesperson assignments per Customer + Division combination. Each combination can exist only once, and both the customer and the division are mandatory. The page is available from the Administration menu and, filtered to a single customer, from the Customer Card.
The following procedure outlines how to set up division salespersons:
-
Select the Search icon
, enter Customer Division, and then choose the related link. The Customer Division page opens. -
On a new line, fill in the Customer No. and Division Code fields.
-
Fill in the Salesperson Code and, optionally, the Salesperson 2 Code fields.

| Field | Description |
|---|---|
| Customer No. | Specifies the customer for which the division-specific salespersons apply. This field is mandatory and cannot be blank. |
| Division Code | Specifies the division for which the salesperson assignment applies. This field is mandatory and cannot be blank. |
| Salesperson Code | Specifies the primary salesperson assigned to this customer/division combination. Blocked salespersons are excluded from the lookup, and a privacy-blocked salesperson is rejected with an error. Clearing this field also clears the Salesperson 2 Code. |
| Salesperson 2 Code | Specifies the secondary salesperson assigned to this customer/division combination. It can only be entered after the Salesperson Code is filled in, and it must differ from the Salesperson Code; violating either rule is rejected with an error. |
- Each Customer No. + Division Code combination can exist only once; the combination is the primary key of the page.
- When the page is opened from the Customer Card it is filtered to that customer and the Customer No. column is hidden. When it is opened directly from the Administration menu, the Customer No. column is visible.
Open customer division from the customer card
Division salespersons for a single customer are most conveniently maintained from the customer itself. The Customer Card carries a dedicated action that opens the Customer Division page pre-filtered to the current customer.
The following procedure outlines how to open the page from the customer:
-
Open the customer on the Customer Card.
-
On the action bar, select Related → Customer Division. The action is positioned above the History menu item.
-
The Customer Division page opens filtered to the current customer's number, with the Customer No. column hidden. Maintain the division assignments as described in the previous section.
Assign salespersons to a ship-to address
When different delivery locations of the same customer belong to different salespersons, assign the salespersons directly on the ship-to address. The Salesperson Code field is visible on the Ship-to Address page, and a new Salesperson 2 Code field is displayed directly after it. Because the ship-to address is the highest priority in the automatic assignment sequence, these values win over the customer division and the customer whenever a ship-to code is selected on a document.
The following procedure outlines how to assign ship-to salespersons:
-
Open the customer on the Customer Card and select Customer → Ship-to Addresses.
-
Open the ship-to address you want to assign.
-
Fill in the Salesperson Code and, optionally, the Salesperson 2 Code fields.
| Field | Description |
|---|---|
| Salesperson Code | Specifies the primary salesperson assigned to this ship-to address. Blocked and privacy-blocked salespersons cannot be selected. Clearing this field also clears the Salesperson 2 Code. |
| Salesperson 2 Code | Specifies the secondary salesperson assigned to this ship-to address, displayed directly after Salesperson Code. It requires the Salesperson Code to be filled in first and must differ from it. |
Assigning a second salesperson to a customer
The Customer Card is extended with a Salesperson 2 Code field, so the customer itself carries a full salesperson pair. The customer is the third priority in the automatic assignment sequence: it applies whenever neither the ship-to address nor a customer division yields a salesperson.
When a new customer is created, the Salesperson 2 Code is defaulted automatically from the creating user's User Setup — provided the customer already carries a primary Salesperson Code and the user's second salesperson differs from it. This keeps data entry to a minimum without ever producing an invalid pair.
| Field | Description |
|---|---|
| Salesperson Code | Specifies the primary salesperson for the customer (standard field). Clearing it also clears the Salesperson 2 Code. |
| Salesperson 2 Code | Specifies the second salesperson for this customer. It requires the Salesperson Code to be filled in first, must differ from it, and cannot be a blocked or privacy-blocked salesperson. Defaulted from the creating user's User Setup on customer creation. |
Setup user salespersons in user setup
User Setup provides the final fallback of the priority sequence. When a sales document cannot derive a salesperson from the ship-to address, a customer division, or the customer, the salesperson pair of the user entering the document is applied. A new Salespers./Purch. 2 Code field is displayed directly after the standard Salespers./Purch. Code field.
The following procedure outlines how to set up the user salespersons:
-
Select the Search icon
, enter User Setup, and then choose the related link. The User Setup page opens. -
On the line for the user, fill in the Salespers./Purch. Code and, optionally, the Salespers./Purch. 2 Code fields.
| Field | Description |
|---|---|
| Salespers./Purch. Code | Specifies the salesperson linked to this user (standard field). Clearing it also clears the Salespers./Purch. 2 Code. |
| Salespers./Purch. 2 Code | Specifies the secondary salesperson assigned to this user. It requires the Salespers./Purch. Code to be filled in first, must differ from it, and cannot be a privacy-blocked salesperson. Used as the Priority 4 fallback on sales documents and to default the Salesperson 2 Code on new customers created by this user. |
Automatic salesperson assignment on sales documents
When you create or edit a Sales Order, Sales Invoice, Sales Credit Memo, or Sales Return Order, the Salesperson Code and Salesperson 2 Code on the document are set automatically. The system evaluates four sources in a fixed priority order and applies both codes from the first source that carries at least a primary Salesperson Code — the pair is always taken from a single source, never mixed across sources.
The priority sequence is evaluated as follows:
-
Priority 1 — Ship-to Address: If a Ship-to Code is selected on the document and the corresponding Ship-to Address record has at least a Salesperson Code, both the Salesperson Code and the Salesperson 2 Code from the ship-to address are applied.
-
Priority 2 — Customer Division: If a Division Code is set on the document and a Customer Division record exists for the sell-to customer and that division with at least a Salesperson Code, both codes from the customer division are applied.
-
Priority 3 — Customer: If neither the ship-to address nor the customer division yields a match, the Salesperson Code and Salesperson 2 Code from the sell-to customer are applied — never from the bill-to customer.
-
Priority 4 — User Setup (fallback): If no salesperson was found in the three priorities above, the Salespers./Purch. Code and Salespers./Purch. 2 Code from the current user's User Setup are applied.
The lookup is triggered — and both salesperson codes are updated — whenever any of the following fields on the document is changed:
-
Sell-to Customer No. — changing the customer re-runs the full priority lookup and updates both codes.
-
Ship-to Code — selecting or changing the ship-to address re-runs the lookup.
-
Division Code — selecting or changing the division re-runs the lookup.
The system applies the result as follows:
-
Both codes are applied together from the winning source. If the winning source has a primary salesperson but no secondary, the document's Salesperson 2 Code is cleared — a pair is never assembled from two different sources.
-
A salesperson that is blocked or privacy-blocked is skipped silently during automatic assignment (mirroring standard Business Central behavior), so ordinary document editing never hard-errors on stale setup data.
-
When no source yields a salesperson at all, a manually entered Salesperson Code on the document is left untouched, so a deliberate manual choice is never overwritten with a blank.
-
The Salesperson 2 Code is carried through to the posted documents — Posted Sales Shipment, Posted Sales Invoice, Posted Sales Credit Memo, and Posted Return Receipt — and to the sales document archives.
- Changing the Bill-to Customer No. on a sales document does not affect the Salesperson Code or the Salesperson 2 Code — the salespersons always reflect the sell-to relationship.
- The Salesperson 2 Code field is also visible on the Sales Quote and Blanket Sales Order pages.
- On the document itself, the same validation rules apply as everywhere else: Salesperson 2 Code requires a Salesperson Code, the two codes must differ, and blocked or privacy-blocked salespersons cannot be entered manually.
Salesperson validation rules
The same rules are enforced identically on every page where the salesperson pair is maintained — Customer Division, Customer Card, Ship-to Address, User Setup, and the sales documents:
-
A Salesperson 2 Code cannot be entered unless the primary Salesperson Code is filled in first. Otherwise the error “You must enter a Salesperson Code before entering a Salesperson 2 Code.” is shown.
-
The Salesperson Code and the Salesperson 2 Code cannot be the same person. Otherwise an error such as “Salesperson 2 Code 'XX' must not be the same as Salesperson Code 'XX'.” is shown.
-
Blocked salespersons are excluded from the selection lookup and cannot be chosen.
-
Privacy-blocked salespersons are rejected with an error when entered.
-
Clearing the primary Salesperson Code automatically clears the Salesperson 2 Code, so an orphaned secondary salesperson can never remain behind.