Purpose and scope
Internal technical support guide for the legacy Auto-Marco-Sync integration. Source: JPG-AL/Auto-Marco-Sync, default branch masterWeybourne, Epicor 10.2.700. Repository archived. This describes inspected source code, not a verified live deployment.
Processing
- SalesOrderAutoPackBPM.BeforeUpdate detects OrderHed.ReadyToFulfill changing from false to true.
- Calls AutoPackLib.CreateMarcoPackFile(OrderNum).
- Loads ReportStyle MarcoPack, style 1001, and reads OutputFolder_c.
- Validates directory and order; finds open OrderDtl lines for the current company.
- Writes one XML file per open line, with root Header and OrderReference OrderNum-OrderLine.
- AfterUpdate publishes an information message using a call-context flag. This is not confirmation of downstream receipt.
Configuration
Check ReportStyle MarcoPack/1001 and OutputFolder_c, folder existence, and Epicor application server write permissions. Verify the downstream Marco pickup mechanism separately; it is not present in the inspected files.
File contract
Filename PACK-{OrderNum}-{OrderLine}-{CustomerID}-{Timestamp}.xml. ProductCode from PartNum, OrderReference from order/line, AveragePieceWeight from Part.GrossWeight, Notes from OrderHed.PickListComment, InputTare from Part.GrossWeightUOM. Other MarcoPackJob fields retain class defaults unless assigned. Non-alphanumeric characters except underscore and dot are removed from selected strings.
Troubleshooting
- Confirm ReadyToFulfill made the false-to-true transition and order lines remain open.
- Check ReportStyle MarcoPack 1001 and OutputFolder_c.
- Check directory existence, write access and XML files; compare filenames and timestamps.
- Inspect Epicor BPM exceptions and the generated XML before replaying.
- Coordinate with Marco operator before re-triggering, as duplicate prevention and acknowledgements are not implemented in this code.
Known risks and review items
- Customer lookup null-check mistakenly checks orderHed again.
- Timestamp is formatted from DateTime.Now.Date, potentially creating same-day filename collisions.
- FileMode.OpenOrCreate can leave stale trailing bytes if a shorter document overwrites an existing file.
- Some fields have defaults; verify downstream expectations, including InputTare mapped from a weight unit.
- No explicit confirmation that Marco consumed the generated file.
- Repository is archived and includes development/build artefacts.
Change control and testing
Before any change, capture representative orders with multiple open lines, closed lines, missing customers, missing report style, inaccessible output directory, repeated transitions and duplicate filename conditions. Verify resulting XML against the Marco interface specification, obtain operational approval, and document rollback. Live deployment and consumer configuration require confirmation.