Sucursal and Punto de Venta Routing
TicoSync now assigns Hacienda sucursal and punto de venta values dynamically per sales channel and per location instead of using one static value for the whole shop.
How Sucursal Works
- Each shop starts with an internal base of 500, so the first sales channel assigned gets sucursal 501.
- Every new sales channel the shop uses receives the next sucursal number: 501, 502, 503, and so on.
- This mapping is stored for the specific Shopify shop, so the same channel keeps the same sucursal on future orders.
How Punto de Venta Works
- Within each sales channel, TicoSync assigns a five-digit punto de venta for each location.
- The first location in a channel gets 00001, the next gets 00002, and so on.
- Non-POS channels use a single default location under that channel.
Examples
- Online Store → sucursal 501, punto de venta 00001
- Point of Sale → sucursal 502, POS Location 1 → 00001
- Point of Sale → sucursal 502, POS Location 2 → 00002
- Manual Order / Draft Order → separate channel with its own sucursal and default punto de venta
How TicoSync Detects the Channel
- TicoSync first uses Shopify publication data when it is available.
- If publication is missing, TicoSync falls back to Shopify sourceName.
- For POS orders, TicoSync also uses retail location data to decide the punto de venta.
Consecutive Counters
- TicoSync keeps a separate consecutive counter for each combination of shop, sucursal, punto de venta, and document type.
- That means FE, TE, FEE, and NC do not all share one single counter anymore.
Operational Guidance
TicoSync stores the selected sucursal, punto de venta, sales channel, and channel location back on the order in Hacienda metafields so you can inspect how the document was numbered later.