Skip to main content

VFP Views

Visual FoxPro webnet.prg — Client-Side Structure Map

File: C:\inetpub\wwwroot\FOXISAPI\webnet.prg
Size: 161,252 lines | Procedures: 379
Architecture: URL-routed CGI entry point → procedure dispatcher → HTML form generator


Overview: Navigation & Authorization

Entry Points

  • STARTPOINT (line 685): Main dispatcher; checks authorization (z01/z02/z03, z06), routes to requested procedure via bzp parameter
  • MAINMENU (line 14651): Homepage; shows nav menu, featured titles, error messages
  • INIT (line 33): Pre-initialization hook

Authorization Parameters

  • z01: Username
  • z02: Password (hashed)
  • z03: Customer Key (account ID) — persists session
  • z04: Transaction/Order ID
  • z06: Master password (admin/staff only)
  • bzp: Target procedure name (routing parameter)

Core Menus

  • MENU_LEFT: Dynamic navigation sidebar (upcoming titles, categories)
  • BRUTUS_MENU: Primary horizontal menu bar
  • HEADER_MENU: Secondary tier
  • NEW_TD_SECONDARY_MENU: Catalog/specialized section menus

Domain 1: INVENTORY & CATALOG

Primary Views

TD_TITLE_VIEW (line 15019)

Purpose: Catalog browser; search/filter titles; view details; add to cart (if logged in)

Entry Point:
/SGZ?bzp=TD_TITLE_VIEW[&INVQUERY=ONSPOT|CHOICE|TRADE|BACKLIST][&PROMONAME=...][&INVLMNT=CP|TR]

Key Parameters:

  • INVQUERY: Catalog segment (ONSPOT=featured, CHOICE=customer choice, TRADE=trade/wholesale, BACKLIST=older)
  • INVLMNT: Inventory limit (CP=Center Point, TR=Trade Publishers, CPBACK=CP backlist, TRBACK=Trade backlist)
  • PROMONAME: Promotion filter
  • SINGLEISBN: Direct ISBN lookup
  • SEARCH_INPUT: Title/author/ISBN search string
  • FULLVIEW: Toggle expanded detail (ON/OFF)
  • CREATELISTE: Flag to create a new list

Displays:

  • Title search results (picture grid or table)
  • Individual title detail card: cover image, synopsis, author, pricing
  • Purchase options (if logged in & available)
  • Related titles / recommendations
  • Availability status (In Stock, Out of Print, Backlist, Coming Soon)

User Actions:

  • Search by title, author, ISBN, keyword
  • Filter by publication date, category, subject
  • View full detail / synopsis
  • Add to cart (route to GENERAL_VIEW if logged in; redirect to login if not)
  • Click through to related Standing Orders / Choice plans if applicable
  • Switch between view modes (grid/list)
  • TD_TITLE_WRITE (line 19405): Save catalog edits (admin/staff)
  • TD_AT_DISPLAY: Render title grid/list on MAINMENU
  • PICTURE_DISPLAY: Render photo gallery
  • GENERAL_VIEW_ACCESS_MARC (line 20272): MARC record viewer
  • INV_READ, INV_WRITE, INV_DELETE: Direct inventory admin

INV_READ / INV_WRITE / INV_DELETE (lines 84028, 111719, 112936)

Purpose: Inventory admin (staff only); add/edit/delete titles from catalog

Entry Point: bzp=INV_READ|INV_WRITE|INV_DELETE (z06 required)

Parameters:

  • SINGLEISBN: ISBN to edit
  • WHATACTION: CREATE, EDIT, DELETE
  • Form fields: title, author, list price, sale price, pub date, status, etc.

Displays: Admin form with all title fields

User Actions:

  • Create new catalog entry
  • Bulk update pricing, pub dates, availability
  • Delete deprecated titles
  • Manage pricing overlays

Secondary Inventory Views

NOSTOCK_READ / NOSTOCK_WRITE (lines 112766, 112845)

Purpose: Manage out-of-stock titles; mark items as unavailable; backorder notifications

OPEN_STANDARD_SHEETS / OPEN_SPECIAL_SHEETS (lines 104041, 104099)

Purpose: Downloadable worksheets (printable order forms)


Domain 2: ORDERS (Web Cart & Transactional)

Primary Views

GENERAL_VIEW (line 61606)

Purpose: Shopping cart manager; order entry; order modification; line-item editor; applies pricing/discounts

Entry Point:
/SGZ?bzp=GENERAL_VIEW[&WHATACTION=CREATENEWORDER|CREATENEWRETURN|MANAGENEWORDER|MANAGENEWRETURN][&z04=TRANSNO][&HEADER_FILE=WEBHEAD|BROHEAD|BACKHEAD|ALLHEAD][&DETAIL_FILE=WEBDETAIL|BRODETAIL|BACKDETAIL|ALLDETAIL]

Key Parameters:

  • CREATENEWORDER: Create new wholesale order (new TRANSNO, init WEBHEAD/WEBDETAIL)
  • CREATENEWRETURN: Create return (NEW RMA, new BROHEAD/BRODETAIL)
  • MANAGENEWORDER: Edit in-progress order
  • MANAGENEWRETURN: Edit in-progress return
  • WHATACTION: Secondary action (CHANGEMA=update item, DELETEITEM=remove line, etc.)
  • SEARCHBY: BYTITLE or BYISBN for item lookup
  • HEADER_FILE / DETAIL_FILE: Which order tables to use (WEB=web orders, BRO=broker returns, BACK=backorders, ALL=consolidated)
  • NEEDSAPO: Require PO# before checkout
  • TPOTHREE: Age filter (3-day old orders)

Displays:

  • Order header: customer name, billing address, date, status, total
  • Order line items: ISBN, title, qty, unit price, extended price, status per item
  • Search panel: find titles by ISBN or title to add
  • Pricing breakdown: subtotal, discounts, shipping calc, tax, final total
  • Order status flags: Open, In Process, Paid, Shipped, Returned, Archived

User Actions:

  • Create new order / return
  • Search & add titles to order
  • Change quantities, unit prices, line discounts
  • Remove line items
  • Update PO# / order special instructions
  • Submit order (POST to ORDER_POST_FINAL)
  • View order history / previous orders
  • Mark items as shipped (fulfillment staff)
  • Apply promotional discounts
  • Split order into multiple shipments
  • GENERAL_VIEW_SPECIAL (line 55562): View order history / special searches
  • GENERAL_VIEW_WINDOW_DESTROY (line 56376): Close order (archive/finalize)
  • GENERAL_VIEW_ORDER_ADJUST (line 59154): Price override / manual adjustments
  • GENERAL_VIEW_SHOW_HISTORY (line 64749): Show archived orders
  • GEN_ORDER_MENU (line 120589): Staff order entry interface
  • GEN_ORDER_MENU_WRITE (line 122054): Process order form submission
  • GEN_ORDER_MENU_INVPROJECT (line 122921): Special inventory project orders
  • ORDER_DELETE (line 32708): Remove entire order
  • ORDER_POST_FINAL (line 34507): Submit order; create transaction record; update DBF

ORDER_DELETE (line 32708)

Purpose: Cancel/delete order; reverse charges; mark as voided

Entry Point: bzp=ORDER_DELETE[&z04=TRANSNO]

User Actions:

  • Confirm order cancellation
  • Refund applied (if paid)
  • Return inventory to available

ORDER_POST_FINAL (line 34507)

Purpose: Finalize & submit order; validate all required fields; create transaction; update inventory; trigger email confirmation

Entry Point: bzp=ORDER_POST_FINAL[&z04=TRANSNO]

Validation:

  • Customer key present
  • Billing address complete
  • At least one line item
  • Payment method specified (if required)

Actions on Submit:

  1. Write transaction record (TRANSACT table)
  2. Update WEBHEAD/WEBDETAIL status to "In Process"
  3. Trigger inventory hold (if on-demand)
  4. Generate order confirmation email
  5. Route to FOH if fulfillment needed
  6. Redirect to GENERAL_VIEW with confirmation

FOH_DETAIL (line 27031)

Purpose: Line-item detail viewer; shows item-level status during fulfillment

Entry Point: bzp=FOH_DETAIL[&z04=TRANSNO]


Domain 3: STANDING ORDERS (Subscription & Auto-Ship)

Primary Views

STANDING_PROFILE (line 25895)

Purpose: View standing order summary; subscription settings; auto-renewal options; customer profile photos

Entry Point:
/SGZ?bzp=STANDING_PROFILE[&z03=CUSTKEY][&SEE_CONTROLS=YES][&HIDE_BUTTONS=YES]

Key Parameters:

  • z03: Customer key
  • SEE_CONTROLS: Show admin buttons (YES for staff, omit for customers)
  • HIDE_BUTTONS: Suppress checkout buttons
  • TSENDPROFILE: Email profile (staff action)

Displays:

  • Account holder name, address, contact info
  • Standing order plan type (Club A, Club B, Choice, etc.)
  • Subscription status (Active, Paused, Cancelled, Expired)
  • Plan details: # of selections per month, format, pricing tier
  • Account photos (staff pic, email, title, phone)
  • Customer class / promotional tier (Class A, Class B, etc.)

User Actions:

  • View profile details (read-only for customers)
  • Edit profile (route to AM_NEWMHEAD if admin)
  • Email profile (staff action)
  • Manage standing order settings
  • STANDING_WRITE (line 88165): Edit standing order header fields
  • STANDING_HEAD (line 89282): Create new standing order / change plan
  • STANDING_CLEAN (line 95495): Billing consistency review / cleanup
  • STANDING_RENEW (line 96021): Renew expiring subscription
  • STANDING_CONFIRMATION (line 114317): Confirm standing order after edit
  • STANDING_NOTE_DISPLAY (line 27603): View account notes & communications
  • STANDING_DESTINATION (line 139622): Manage shipping address for standing order
  • CLEARSOWRITE (line 95959): Archive/close standing order

STANDING_HEAD (line 89282)

Purpose: Standing order creation; plan selection; billing setup

Entry Point: bzp=STANDING_HEAD[&z03=CUSTKEY]

Displays:

  • Plan type selector (Club A, Club B, Choice, etc.)
  • Billing address form
  • Selection preference (automatic, manual, hybrid)
  • Frequency selector (monthly, quarterly, etc.)
  • Payment method

User Actions:

  • Select plan type
  • Set up billing
  • Choose auto-ship options
  • Save & activate plan → STANDING_CONFIRMATION

STANDING_CLEAN (line 95495)

Purpose: Billing consistency audit; find orphaned/duplicate records; fix account state

Entry Point: bzp=STANDING_CLEAN (staff only, z06 required)

Displays:

  • Account billing state (summary)
  • Orphaned standing order entries
  • Duplicate payment records
  • Mismatch warnings

User Actions:

  • Review billing anomalies
  • Consolidate / merge records
  • Archive stale entries

Secondary Standing Order Views

VIEW_BACKORDERS (line 95149)

Purpose: Show backorder items on customer's standing order; when they'll ship

STANDING_NOTE_DISPLAY (line 27603)

Purpose: View account notes & communications history


Domain 4: TRADE HOUSE (B2B Wholesale Orders)

Primary Views

TRADE_HOUSE_CUSTOMER_VIEW (line 49592)

Purpose: Trade/wholesale customer dashboard; show plan participation, order history, inventory for upcoming titles, manage selections

Entry Point:
/SGZ?bzp=TRADE_HOUSE_CUSTOMER_VIEW[&z03=CUSTKEY][&SORTMETHOD=...][&MONTHLIMIT=...][&SHOWBACKLIST=ON|OFF]

Key Parameters:

  • SORTMETHOD: Sort display by title, author, publication date, etc.
  • MONTHLIMIT: Show only titles within N months
  • SHOWBACKLIST: Include backlist titles (ON/OFF)
  • TEMPFULL: Show full detail (OFF to compact)
  • CHANGELISTING: Pagination control

Displays:

  • Trade publisher customer account name & location
  • Upcoming trade titles (publication schedule)
  • Per-title information: cover, ISBN, title, author, pub date, list price, trade discount %
  • Selection checkboxes / quantity fields (if plan allows custom selections)
  • Order history summary
  • Account rep contact info

User Actions:

  • Browse upcoming trade titles
  • Select titles for standing order / shipment
  • Change quantities per title
  • Sort/filter display
  • Submit selections → TRADE_HOUSE_SELECT_DISPLAY
  • View backorders & in-process shipments
  • TRADE_HOUSE_SELECT_DISPLAY (line 52522): Save selections; confirm order
  • NEW_TRADE_HOUSE_CUSTOMER_VIEW_WRITE (line 50800): Write selection changes
  • TRADE_HOUSE_SELECT_HEADER (line 40911): Header tier for selection flow
  • TRADE_HOUSE_ADMIN_ORDER_UPDATE (line 131884): Staff-side order adjustment
  • TRADE_HOUSE_GENERAL_SCREEN (line 130316): Admin view of all orders
  • TRADE_HOUSE_PLAN_PRINT_LOOK (line 134685): Print-ready order summary
  • TRADE_HOUSE_LOAD_LEVEL (line 133536): Load inventory tier/allocation
  • TRADE_HOUSE_PUBDATE (line 131884): Filter titles by pub date range
  • TRADE_HOUSE_PICTURES_COPY (line 42679): Cache cover images
  • TRADE_HOUSE_ZEBRA (line 42875): Barcode/shipping label integration
  • TRADE_HOUSE_EMAIL_SUBSYSTEM (line 41943): Bulk email to trade customers

TRADE_HOUSE_SELECT_DISPLAY (line 52522)

Purpose: Confirm & save trade customer selections before checkout

Entry Point: bzp=TRADE_HOUSE_SELECT_DISPLAY[&z03=CUSTKEY][&SWITCHVALUE=...]

Displays:

  • Selected titles (list with qty, total)
  • Order total (with trade discounts applied)
  • Billing address (confirm)
  • Shipping address

User Actions:

  • Review selections
  • Adjust quantities (back to TRADE_HOUSE_CUSTOMER_VIEW)
  • Confirm & submit → creates transaction

REVIEW_TRADE_PLANS (line 152822)

Purpose: Staff view; review all trade plans, allocations, customer participation

Entry Point: bzp=REVIEW_TRADE_PLANS (z06 required)


Secondary Trade Views

TRADE_HOUSE_SWITCH_WRITE / TITLE (lines 130020, 130088)

Purpose: Switch between trade publishers (staff function); manage plan routing

TRADE_PREPAID_DATE / PREPAIDS (lines 151951, 142157)

Purpose: Track trade customer prepayments; aging; collection status

NEW_TRADE_SUMMARY (line 32106)

Purpose: Summary view of new trade orders in process


Domain 5: FULFILLMENT & BACK-ORDER MANAGEMENT

Primary Views

FOH (line 56387)

Purpose: Fulfillment Operations Hub; staff view of all orders needing shipment; fulfillment status tracking; shipment creation

Entry Point:
/SGZ?bzp=FOH[&z04=TRANSNO|ORDER_TRANSNO=...][&HEADER_FILE=...][&DETAIL_FILE=...][&TPOTHREE=...|SHOWARCH|SHOWPAY|CANARCH|TRADEBO|BTPAID|BTUNCONFIRMED|INCURRENT|INPAID|FORARCH]

Key Parameters:

  • ORDER_TRANSNO: Specific order to show
  • TPOTHREE: Filter by age (3+ days old)
  • SHOWARCH: Include archived orders
  • SHOWPAY: Show unpaid orders
  • TRADEBO: Trade orders only
  • BTPAID: Paid orders ready to ship
  • BTUNCONFIRMED: Orders awaiting payment confirmation

Displays:

  • Order list (WEBHEAD/WEBDETAIL or BROHEAD/BRODETAIL or BACKHEAD/BACKDETAIL)
  • For each order:
    • Customer name, account number
    • Order date, PO#
    • Line items with qty ordered vs. qty allocated vs. qty shipped
    • Status per line (Open, Partial, Complete, Back-ordered, On-hold)
    • Total books/units, dollar value
    • Fulfillment notes / special instructions

User Actions:

  • Filter orders by status (open, paid, unpaid, archived, etc.)
  • View order detail
  • Mark items as shipped (create fulfillment record)
  • Apply fulfillment holds
  • Merge orders into single shipment
  • Generate packing slips / labels
  • Archive completed orders
  • FOH_DETAIL (line 27031): Item-level fulfillment detail
  • FOH_BT_MARK_WOULD (line 128660): Mark item for fulfillment
  • FOH_BT_LINE_ITEMS (line 128701): Edit fulfillment quantities
  • CPBACKORDERS (line 60095): Backorder-specific fulfillment
  • BACKMANAGEMENT (line 154206): Backorder aging, reneging, cancellation
  • BACKMANAGEMENT_MARK (line 155330): Mark backorder action
  • BACKMANAGEMENT_WRITE (line 155753): Write backorder changes

CPBACKORDERS (line 60095)

Purpose: Backorder dashboard; show all unfulfilled items; aging; projected fulfillment dates

Entry Point: bzp=CPBACKORDERS[&SHOWARCH=ON]

Displays:

  • Backorder line items (customer, ISBN, title, qty, date ordered, expected ship date)
  • Backorder age (days outstanding)
  • Projected availability (from INVENT.pubdate for future titles)
  • Customer contact info (for follow-up)

User Actions:

  • Sort by age, customer, title
  • View fulfillment status
  • Mark as shipped (when inventory arrives)
  • Renege / cancel (if title cancelled / unlikely to restock)
  • Bulk email to customers with status updates
  • BACKMANAGEMENT (line 154206): Backorder admin
  • BACKMANAGEMENT_MARK / WRITE (lines 155330, 155753): Change backorder status
  • MAKE_AVAILABLE (line 145548): Trigger fulfillment when stock arrives

BACKMANAGEMENT (line 154206)

Purpose: Comprehensive backorder management; aging reports; collection workflow

Entry Point: bzp=BACKMANAGEMENT (z06 required)

Displays:

  • Backorder inventory by ISBN (total demand vs. available qty)
  • Backorder customer list (name, qty on order, date ordered)
  • Aging buckets (0–30 days, 30–60, 60–90, 90+)
  • Alert flags (titles unlikely to be published; customers unresponsive)

User Actions:

  • Bulk mark items as shipped
  • Bulk cancel backorders
  • Generate aging reports
  • Email customers with updates

Domain 6: ACCOUNT MANAGEMENT & PROFILES

Primary Views

ACCOUNT_MANAGEMENT_FULLVIEW (line 76615)

Purpose: Complete account admin dashboard; staff view for customer profiles; notes, contact info, subscription status, history

Entry Point:
/SGZ?bzp=ACCOUNT_MANAGEMENT_FULLVIEW[&z06=MASTERPASS][&z03=CUSTKEY][&MENUMODE=LESS|FULL][&RETURNPAGE=...][&NOTELIMIT=...][&NOTEACTION=...]

Key Parameters:

  • MENUMODE: LESS (summary) or FULL (detailed; default)
  • RETURNPAGE: Redirect after edit
  • NOTELIMIT: Show N most recent notes
  • NOTEACTION: Note operation (NEW, EDIT, DELETE, VIEWIT)
  • SUBLEVEL: Tab selection (PROFILE, NOTES, CONTACTS, BILLING, STANDING_ORDERS, etc.)

Displays:

  • PROFILE tab: Name, address, email, phone, contact history
  • NOTES tab: Customer communication log (internal memos, follow-ups, service requests)
  • CONTACTS tab: Multiple shipping/billing addresses
  • BILLING tab: Payment history, account balance, payment method
  • STANDING ORDERS tab: Current subscriptions, plan details, renewal dates
  • PURCHASES tab: Order history, lifetime value
  • CLASS tab: Account classification (A/B/C/D/F/G/K/L/Q/R/S), promotional tier
  • BONUSES tab: Free/gift books earned, bonus selections

User Actions:

  • View all account data
  • Add note (internal comment, follow-up flag)
  • Edit address (EDTSETLINK)
  • Change contact info
  • Update account classification
  • View order history
  • Manage linked contacts
  • Archive / close account
  • ACCOUNT_DISPLAY (line 24783): Customer card view (summary)
  • AM_CONTACTS (line 25567): Manage secondary addresses
  • AM_WORK (line 29646): Account edit form (detailed entry)
  • AM_WORK_DETAILS (line 30024): Address details editor
  • AM_WORK_SPECIAL (line 30670): Special handling flags
  • AM_BASE_LETTER (line 31611): Account communication letter
  • AM_COMMCODE (line 23926): Set customer comm code (sales rep assignment)
  • AM_SETCALL (line 24379): Set call priority
  • ACCOUNT_KEYED_ACCESS (line 97212): Direct key lookup
  • EDTLINKPUB (line 25312): Link account to publisher
  • EDTSETLINK (line 25460): Set primary address
  • NEWMCHANGECOMMCODE (line 68305): Change comm code
  • AM_NEWMHEAD (line 68318): Staff account edit form (new style)
  • AM_NEWMHEAD_TARGETS (line 74669): Account targeting / segmentation

AM_NEWMHEAD (line 68318)

Purpose: Comprehensive account editor (newer UI); customer class, promotions, preferences, contact mgmt

Entry Point: bzp=AM_NEWMHEAD[&z06=MASTERPASS][&z03=CUSTKEY]

Displays:

  • Account header (customer name, key, type)
  • Tabs:
    • Basic info (name, address, phone, email)
    • Contact mgmt (ship-to addresses, contacts)
    • Account settings (call priority, comm code, promotional flags)
    • Standing orders (if applicable)
    • Special handling
    • Account history

User Actions:

  • Edit customer details
  • Manage addresses
  • Assign sales rep
  • Set promotional flags (promote_western, promote_romance, etc.)
  • Mark inactive / do-not-contact

ACCOUNT_LOG_ON (line 35395)

Purpose: Customer login; authentication; session creation

Entry Point:
/SGZ?bzp=ACCOUNT_LOG_ON[&THISUSERNAME=...][&THISPASSWORD=...][&WHERETOGO=MAINMENU|GENERAL_VIEW|...]

Parameters:

  • THISUSERNAME: Customer username (email or account number)
  • THISPASSWORD: Password
  • WHERETOGO: Redirect target after login (default: MAINMENU)

Flow:

  1. Validate credentials against PASSWORD table (z01, z02 hash, z03 key)
  2. Create session (persisted in z03)
  3. Redirect to WHERETOGO

Error Handling:

  • Invalid username/password → show login form with error
  • Expired session → force re-login
  • Locked account → show message; contact staff
  • ACCOUNT_LOG_OFF (line 46709): Customer logout; clear session
  • ACCOUNT_LOG_OFF_WRITE (line 47106): Finalize logout

ACCOUNT_LOG_OFF (line 46709)

Purpose: Customer logout; session cleanup

Entry Point: bzp=ACCOUNT_LOG_OFF[&z03=CUSTKEY]

Actions:

  • Clear z03 session
  • Redirect to MAINMENU
  • Show "logged out" confirmation

Secondary Account Views

ACCOUNT_ACCESS (line 22453)

Purpose: Account lookup; select customer from list

ACCOUNT_DISPLAY (line 24783)

Purpose: Condensed customer card; summary info

ACCOUNT_MANAGEMENT_ONESCREEN_WRITE (line 78214)

Purpose: Single-screen account edit form submission

ACCOUNT_MANAGEMENT_READ (line 78576)

Purpose: Account lookup / search interface

ACCOUNT_MANAGEMENT_KICKBACK (line 81219)

Purpose: Referral / kickback commission tracking

ACCOUNT_MANAGEMENT_CALLSTAT (line 81744)

Purpose: Call history / follow-up tracking

AM_DELETEBASES (line 83457)

Purpose: Account cleanup; archive old accounts

AM_REVIEW_DETAILS (line 114744)

Purpose: Review account details before finalizing changes

AM_WORK_CHOICE (line 113456)

Purpose: Customer choice plan selection (part of standing order flow)


Domain 7: PRICING & DISCOUNTS

Integration Points (Not Standalone Procedures)

Pricing is embedded throughout order workflows:

  • GENERAL_VIEW: Applies pricing based on customer class (A/B/C), promotional tier, purchase quantity, standing order membership
  • TD_TITLE_VIEW: Shows list price, sale price, discount % (if applicable) per title per customer class
  • FOH: Displays pricing in order summary (subtotal, discounts, shipping, tax)
  • ORDER_POST_FINAL: Recalculates & validates pricing before submission

Pricing Calculation Components:

  • Base list price (from INVENT.listprice)
  • Customer discount (from PASSFILE.discount by account)
  • Promotional overlays (from PRICINGOVERLAY by ISBN × account type)
  • Volume discounts (if qty >= threshold)
  • Standing order tier discounts
  • Coupon discounts (from COUPON tables)

Pricing Sources:

  • INVENT.listprice (base)
  • PASSFILE.company, discount, priceoverride
  • PRICINGOVERLAY (promo pricing per ISBN × account class)
  • COUPON (coupon code discounts)

Domain 8: REPORTS & EXPORTS

Primary Views

PRINTCAT (line 98465)

Purpose: Catalog export / print; downloadable booklist in PDF or plain text

Entry Point:
/SGZ?bzp=PRINTCAT[&z03=CUSTKEY][&PROMONAME=...][&INVQUERY=...][&FORMAT=PDF|TEXT][&COLUMNS=...]

Key Parameters:

  • FORMAT: PDF, Text, CSV, or HTML
  • COLUMNS: Select which fields to export (ISBN, title, author, price, status, etc.)
  • PROMONAME: Limit to specific promotion

Displays (in browser or downloadable file):

  • Title list with selected columns
  • Sortable by ISBN, title, author, pub date, price
  • Prices shown based on customer class (if logged in)

User Actions:

  • Select export format
  • Choose columns
  • Download file
  • PRINTTABLE (line 97611): Generic table export
  • CREATE_OUTPUT_DATA (line 98544): Build export dataset
  • PROOF_WEB_COPY (line 102948): Proof / QA copies (internal)
  • CREATE_PROMOTIONS (line 108480): Promo booklet generator
  • CREATE_PROMOTIONS_WRITE (line 108706): Process promo creation form

PRINT_STANDING (line 129164)

Purpose: Print standing order summary; customer standing order statement / renewal notice

Entry Point: bzp=PRINT_STANDING[&z03=CUSTKEY][&FORMAT=PDF]

Displays:

  • Customer standing order profile
  • Current plan (type, selections/month, pricing)
  • Recent shipments (dates, titles, totals)
  • Renewal date / expiration notice
  • Payment method

GEN_EDITORIAL_MENU (line 117941)

Purpose: Editorial staff interface; manage published content, reviews, author info

Entry Point: bzp=GEN_EDITORIAL_MENU (staff only, z06 required)

Displays:

  • Editorial content list (by topic, author, title)
  • Edit/delete controls
  • GEN_EDITORIAL_SHOW (line 120589): Display editorial content
  • GEN_EDITORIAL_UPDATE_COMPUTER_SALES (line 119991): Update sales tracking

GEN_ONIX_MENU (line 115725)

Purpose: ONIX metadata management; export ONIX format (industry standard book data)

Entry Point: bzp=GEN_ONIX_MENU (z06 required)

  • GEN_ONIX_WRITE (line 116055): Export ONIX data

GEN_ORDER_MENU (line 120589)

Purpose: Staff order entry; quick add orders for customers (phone orders, manual entry)

Entry Point: bzp=GEN_ORDER_MENU[&z06=MASTERPASS]

Displays:

  • Customer lookup/selection
  • Title search panel
  • Order form (similar to GENERAL_VIEW but staff-driven)
  • GEN_ORDER_MENU_WRITE (line 122054): Process staff order submission
  • GEN_ORDER_MENU_INVPROJECT (line 122921): Special project orders


Domain 9: EDI & DATA EXCHANGE

Primary Views

EDI_MENU (line 139788)

Purpose: EDI (Electronic Data Interchange) admin; manage inbound/outbound order feeds; file management

Entry Point: bzp=EDI_MENU (z06 required)

Displays:

  • Incoming EDI files (orders from trading partners)
  • In-process files (being parsed/imported)
  • Outgoing files (acknowledgments, shipping notices, invoices)
  • File status, timestamps, line count, error logs

User Actions:

  • View incoming order feed
  • Trigger import
  • Resend confirmation / shipping notice
  • Download error report
  • EDI_FACT_MENU (line 141394): FACT (Forwarding Agent Commission Transaction) submenu
  • EDI_FACT_SHOWCONTENTS (line 141836): Show FACT file contents
  • EDI_MANIFEST (line 142884): Shipping manifest generator
  • EDI_SCANNER_ENTRY (line 147127): Barcode scanner entry (receiving)
  • EDI_SHOWCONTENTS (line 148806): Show file contents
  • EDI_CREATE_NEW_SHIPMENT (line 149040): Create new shipment record
  • EDI_INVOICE_TRANSPORT (line 149330): Invoice EDI exchange

EDI_MANIFEST (line 142884)

Purpose: Generate EDI shipping manifest; structured shipment data for EDI partners

Entry Point: bzp=EDI_MANIFEST[&z03=CUSTKEY|z06=MASTERPASS]

Displays:

  • Shipment items (line count, totals)
  • Structured EDI format (ORDERS, ORDERS message, line items, pricing)
  • Print-ready manifest


Domain 10: NOTIFICATIONS, EMAILS & MESSAGING

Primary Views

EMZ_SERVICES (line 66208)

Purpose: Email marketing / promotion management; bulk email campaigns

Entry Point: bzp=EMZ_SERVICES[&z03=CUSTKEY|z06=MASTERPASS]

Displays:

  • Service offerings (email templates, announcement options)
  • Customer opt-in status
  • Email history
  • EMZ_SERVICES_VIEW (line 66906): Email template viewer
  • EMZ_SERVICES_WRITE (line 68201): Save email preferences
  • EMZ_SERVICES_CHARACTERS (line 54634): Character limit check for email
  • EMZ_UPCOMING_TITLES (line 54756): Auto-email upcoming titles to customer

NEW_EMAIL_CONSOLE (line 136450)

Purpose: Unified email management; compose & send emails to customers

Entry Point: bzp=NEW_EMAIL_CONSOLE[&z06=MASTERPASS]

  • NEW_EMAIL_BASIC_UPDATE (line 136961): Send basic notification email
  • NEW_EMAIL_START_UPDATE (line 137021): Send order confirmation email
  • NEW_EMAIL_INVENTORY_UPDATE (line 137131): Send inventory notification
  • NEW_EMAIL_BACKORDER_UPDATE (line 137722): Send backorder status update
  • NEW_EMAIL_CREATE_FILE_UPDATE (line 139514): Create email template file

MAIL_CONSOLE_MENU (line 85519)

Purpose: Internal staff communication; mail/note system

Entry Point: bzp=MAIL_CONSOLE_MENU[&z06=MASTERPASS]

Displays:

  • Staff inbox (messages from other staff)
  • Message threads (by customer, project, topic)
  • Unread count, recent activity
  • MAIL_CONSOLE_WRITE (line 85783): Compose staff message
  • MAIL_CONSOLE_READ (line 126260): Read staff message
  • MAIL_CONSOLE_CS (line 126260): Customer service variant
  • DELETEMAILHEAD / DELETEMAILWRITE (lines 94671, 94729): Delete message

MAIL_CONSOLE_MENU (variants)

  • BULKMAIL_MENU_READ (line 98795): Bulk mailing list editor
  • BULKMAIL_MENU_WRITE (line 98965): Save bulk mail settings


Domain 11: PLATFORM & UTILITY FUNCTIONS

Core UI Procedures

WEBSITE_HEAD (line 45014)

Purpose: Page header template; includes nav, logo, session info

Displays:

  • Site logo & branding
  • Top navigation (Home, Catalog, My Account, Log Out)
  • User greeting (if logged in)
  • Search bar

WEBSITE_TAIL (line 45796)


HEADER_INFO (function, not procedure)

Purpose: Build HTML header with

, <meta>, <style> tags <hr /> <h4>MY_PREFERENCES (line 44345) <p><strong>Purpose: User preferences editor; display options, email frequency, etc. <p><strong>Entry Point: <code>bzp=MY_PREFERENCES[&z03=CUSTKEY] <p><strong>Related Procedures: <ul> <li> <code>MY_PREFERENCES_WRITE (line 44846): Save preference changes <hr /> <h4>CP_CONNECTION (line 47530) <p><strong>Purpose: System diagnostics; check database/server connectivity <p><strong>Entry Point: <code>bzp=CP_CONNECTION <hr /> <h4>MENU_SWITCH (line 54460) <p><strong>Purpose: Secondary menu router; switches between major sections <hr /> <h4>WEBCOMMENTS_HEAD (line 47182) <p><strong>Purpose: User feedback/survey form header <hr /> <h4>SERVICE_REQUESTS (line 151553) <p><strong>Purpose: Customer service request form; complaint/inquiry submission <p><strong>Entry Point: <code>bzp=SERVICE_REQUESTS[&z03=CUSTKEY] <hr /> <h4>ONSPOT_SERVICES_MENU (line 80459) <p><strong>Purpose: ONSPOT (featured promotions) service menu <p><strong>Related Procedures: <ul> <li> <code>ONSPOT_SERVICES_VIEW (line 80584): Display ONSPOT offerings <hr /> <h4>BONUS_BOOK_USE (line 31798) <p><strong>Purpose: Manage free/bonus book selections in standing orders <p><strong>Entry Point: <code>bzp=BONUS_BOOK_USE[&z03=CUSTKEY] <p><strong>Related Procedures: <ul> <li> <code>BONUS_HEAD (line 115212): Bonus book admin (staff) <li> <code>BONUS_HEAD_DELETE (line 115616): Delete bonus allocation <li> <code>BONUS_HEAD_WRITE (line 115658): Save bonus allocation <hr /> <h4>ACCOUNT_MANAGEMENT_SHOW_ALLDETAIL (line 156286) <p><strong>Purpose: Show all customer addresses/contacts (detail view) <hr /> <h4>ACCOUNT_MANAGEMENT_FILL_DAILY (line 158174) <p><strong>Purpose: Daily fill/fulfillment tracking (internal) <hr /> <h4>ACCOUNT_MANAGEMENT_FILL_CHOICE (line 158781) <p><strong>Purpose: Choice plan fulfillment (which titles selected & shipped) <hr /> <h4>ACCOUNT_MANAGEMENT_CREATE_FLIER (line 156951) <p><strong>Purpose: Generate promotional flier for account (mail merge) <hr /> <h4>ARCHIVE_ORDERS (line 146614) <p><strong>Purpose: Archive/purge old orders from active database <p><strong>Entry Point: <code>bzp=ARCHIVE_ORDERS (z06 required) <hr /> <h4>MARKET_INFO_WRITE (line 94212) <p><strong>Purpose: Update market research data / demographic info <hr /> <h4>CHECK_CASHING (line 146614) <p><strong>Purpose: Track check clearing status (payment method tracking) <hr /> <h4>FASTPRINT (line 158814) <p><strong>Purpose: Fast/print-on-demand order variant; rapid turnaround titles <p><strong>Entry Point: <code>bzp=FASTPRINT[&z03=CUSTKEY] <p><strong>Related Procedures: <ul> <li> <code>FASTMARK (line 158781): Flag for fast printing <li> <code>FASTPRINT_DELETE (line 160065): Cancel fast order <li> <code>FASTPRINT_CREATE (line 160254): Create fast order <hr /> <h4>FIXSHIP (line 160928) <p><strong>Purpose: Correct shipping records; fix shipped-but-not-marked entries <p><strong>Related Procedures: <ul> <li> <code>FIXSHIPWRITE (line 161010): Write shipping correction <hr /> <h4>INVENTORY_FIX (line 161077) <p><strong>Purpose: Correct inventory discrepancies; manual quantity adjustments <p><strong>Related Procedures: <ul> <li> <code>INVENTORY_FIX_WRITE (line 161194): Write inventory correction <hr /> <h4>DATA_TRANSFER_MODULE (line 104208) <p><strong>Purpose: Export/import data; data interchange with external systems <p><strong>Related Procedures: <ul> <li> <code>DATA_TRANSFER_MODULE_WRITE (line 104818): Process data transfer <hr /> <h4>EASYDATA (line 99863) <p><strong>Purpose: Quick-entry tool; bulk data paste/import <hr /> <hr /> <h2>Domain 12: PFP (Publisher For Profit) <p><em>No dedicated procedures identified; likely integrated into standing order / Trade House flows. <hr /> <hr /> <h2>Cross-Domain Workflows <h3>A. Typical Customer Journey <ol> <li> <strong>Browse Catalog → TD_TITLE_VIEW (search, filter, view titles) <li> <strong>Login → ACCOUNT_LOG_ON (z03 session created) <li> <strong>Add to Cart → GENERAL_VIEW (shopping cart in WEBHEAD/WEBDETAIL) <li> <strong>Manage Cart → GENERAL_VIEW (adjust quantities, pricing calculated) <li> <strong>Checkout → ORDER_POST_FINAL (validate, create TRANSACT record) <li> <strong>Fulfillment → FOH (staff marks shipped) <li> <strong>Logout → ACCOUNT_LOG_OFF <h3>B. Standing Order Signup Flow <ol> <li> <strong>Browse Plan Options → MAINMENU or TD_TITLE_VIEW <li> <strong>Initiate Plan → STANDING_HEAD (select plan type, billing) <li> <strong>Confirm Plan → STANDING_CONFIRMATION (review & activate) <li> <strong>Auto-Fulfill → Monthly selections → GENERAL_VIEW (customer-initiated) or auto-shipment <li> <strong>View Status → STANDING_PROFILE (check subscription status) <h3>C. Trade/Wholesale Flow <ol> <li> <strong>Trade Customer Logs In → ACCOUNT_LOG_ON (z03 for trade account) <li> <strong>Browse Titles → TRADE_HOUSE_CUSTOMER_VIEW (upcoming trade titles, allocations) <li> <strong>Select Titles → Make selections → TRADE_HOUSE_SELECT_DISPLAY <li> <strong>Confirm Order → TRADE_HOUSE_SELECT_DISPLAY (finalize, create TRANSACT) <li> <strong>Fulfillment → FOH (BROHEAD/BRODETAIL or equivalent) <li> <strong>Shipping → EDI_MANIFEST (send shipment notification) <h3>D. Staff Order Entry Flow <ol> <li> <strong>Staff Logs In → ACCOUNT_LOG_ON with z06 (master password) <li> <strong>Search Customer → ACCOUNT_ACCESS or ACCOUNT_MANAGEMENT_READ <li> <strong>Create Order → GENERAL_VIEW with CREATENEWORDER <li> <strong>Add Items → Search TD_TITLE_VIEW, add to cart <li> <strong>Submit → ORDER_POST_FINAL <li> <strong>Ship → FOH (mark shipped) <h3>E. Backorder Management Flow <ol> <li> <strong>View Backorders → CPBACKORDERS (all unfulfilled items) <li> <strong>Check Availability → MAKE_AVAILABLE (when stock arrives) <li> <strong>Auto-Ship or Notify → Trigger GENERAL_VIEW fulfillment or email notification <li> <strong>Archive → Move to archive table <hr /> <h2>Key Parameters Summary <h3>Session / Auth <ul> <li> <code>z01: Username <li> <code>z02: Password (hashed) <li> <code>z03: Customer Key (session ID) <li> <code>z04: Transaction/Order ID <li> <code>z06: Master password (staff/admin) <h3>Navigation <ul> <li> <code>bzp: Procedure name (routing parameter) <li> <code>WHERETOGO: Redirect target after login <li> <code>RETURNPAGE: Return target after action <h3>Ordering / Cart <ul> <li> <code>HEADER_FILE: WEBHEAD, BROHEAD, BACKHEAD, ALLHEAD, DAYHEAD, DAILYHEAD <li> <code>DETAIL_FILE: WEBDETAIL, BRODETAIL, BACKDETAIL, ALLDETAIL, DAYDETAIL, DAILYDETAIL <li> <code>WHATINFILE: Status filter (WEBCOMPLETE, WEBINCOMPLETE, etc.) <li> <code>WHATACTION: Action type (CREATENEWORDER, MANAGENEWORDER, CHANGEITEM, DELETEITEM, CHANGEQTY, CHANGEPRICE, etc.) <h3>Catalog <ul> <li> <code>INVQUERY: Catalog segment (ONSPOT, CHOICE, TRADE, BACKLIST, UPCOMING) <li> <code>INVLMNT: Inventory limit (CP=Center Point, TR=Trade, CPBACK, TRBACK) <li> <code>PROMONAME: Promotion/feature group <li> <code>SINGLEISBN: Direct ISBN lookup <li> <code>SEARCH_INPUT: Search query (title, author, ISBN) <li> <code>FULLVIEW: Toggle detailed display (ON/OFF) <h3>Filters / Display <ul> <li> <code>SORTMETHOD: Sort order (TITLE, AUTHOR, PUBDATE, PRICE, etc.) <li> <code>MONTHLIMIT: Show only titles within N months <li> <code>TPOTHREE: Filter by age (3+ days old) <li> <code>SHOWARCH: Include archived items <li> <code>SHOWBACKLIST: Include backlist <h3>Email / Promotion <ul> <li> <code>ADVERTISE: Show advertisements (ON/OFF) <li> <code>BOOKB: Book club code <li> <code>SALEPRICE: Override sale price <li> <code>DISCOUNT: Override discount % <li> <code>KICKBACK: Referral commission amount <li> <code>SUBJECT: Email subject <hr /> <h2>Summary: Procedure Count by Domain <table> <thead> <tr> <th>Domain <th>Procedures <th>Key Views <tbody> <tr> <td>Inventory/Catalog <td>8+ <td>TD_TITLE_VIEW, TD_TITLE_WRITE, INV_READ/WRITE/DELETE, NOSTOCK_* <tr> <td>Orders <td>10+ <td>GENERAL_VIEW, GENERAL_VIEW_*, ORDER_DELETE, ORDER_POST_FINAL, GEN_ORDER_MENU <tr> <td>Standing Orders <td>8+ <td>STANDING_PROFILE, STANDING_HEAD, STANDING_WRITE, STANDING_CLEAN, VIEW_BACKORDERS <tr> <td>Trade House <td>12+ <td>TRADE_HOUSE_CUSTOMER_VIEW, TRADE_HOUSE_SELECT_DISPLAY, REVIEW_TRADE_PLANS <tr> <td>Fulfillment <td>8+ <td>FOH, CPBACKORDERS, BACKMANAGEMENT, BACKMANAGEMENT_*, FOH_DETAIL <tr> <td>Accounts <td>20+ <td>ACCOUNT_MANAGEMENT_FULLVIEW, AM_NEWMHEAD, ACCOUNT_LOG_ON/OFF, AM_* <tr> <td>Pricing <td>(embedded) <td>— (integrated into GENERAL_VIEW, TD_TITLE_VIEW, FOH) <tr> <td>Reports <td>12+ <td>PRINTCAT, PRINT_STANDING, GEN_EDITORIAL_<em>, GEN_ONIX_, GEN_ORDER_MENU* <tr> <td>EDI <td>8+ <td>EDI_MENU, EDI_FACT_<em>, EDI_MANIFEST, EDI_INVOICE_ <tr> <td>Emails/Messaging <td>8+ <td>EMZ_SERVICES*, NEW_EMAIL_<em>, MAIL_CONSOLE_, BULKMAIL_* <tr> <td>Platform/Utility <td>25+ <td>MAINMENU, MY_PREFERENCES, CP_CONNECTION, WEBSITE_HEAD/TAIL, etc. <tr> <td>PFP <td>(embedded) <td>— (integrated into standing orders / trade flows) <hr /> <h2>Architecture Notes <h3>Parameter Passing <ul> <li>URL query string (<code>/SGZ?param1=value1&param2=value2...) <li>Form POST (same parameter set) <li>MBCODED: Pre-encoded parameter set passed between procedures <h3>Session Management <ul> <li>z03 (customer key) persists across page loads <li>z06 (master password) required for staff actions <li>Session timeout: Not explicitly documented (likely server-side) <h3>Error Handling <ul> <li>TNEW_ERROR_INFO: URL-encoded error message shown to user <li>Procedures validate input and return error parameters to MAINMENU or prior screen <li>Critical errors: Route to BADPROG procedure (generic error page) <h3>Database Tables (Key References) <ul> <li>INVENT: Catalog (title, author, ISBN, list price, pub date, status) <li>PASSWORD: Users (z01/z02, z03 key, email, contact) <li>PASSFILE: Customer pricing (discount %, company type) <li>WEBHEAD / WEBDETAIL: Web orders (in progress) <li>BROHEAD / BRODETAIL: Broker/return orders <li>BACKHEAD / BACKDETAIL: Backorder records <li>ALLHEAD / ALLDETAIL: Consolidated order view <li>STANDING: Standing orders (subscriptions) <li>VENDOR: Trade/wholesale customer accounts <li>CUSTNOTE: Customer notes / communication log <li>TRANSACT: Transaction log (audit trail) <li>BONDETAIL: Bonus book allocations <li>COUPON: Promotional codes <li>PRICINGOVERLAY: Dynamic pricing by ISBN × account class <hr /> <h2>References <ul> <li> <strong>Entry Point: STARTPOINT (line 685) — Main dispatcher <li> <strong>Main Menu: MAINMENU (line 14651) — Homepage <li> <strong>Session Auth Parameters: z01, z02, z03, z06 <li> <strong>Routing Parameter: bzp (procedure name) <li> <strong>Error Parameter: TNEW_ERROR_INFO (URL-encoded message) </style>