Buying Policies — Limits & Performance
This page gives practical guidance to keep Buying Policies responsive at scale: use pagination, server-side filters, careful bulk maintenance, and clear monitoring.
Quick orientation
- Prefer server-side filters plus pagination on all list endpoints.
- Keep rule sets tidy to avoid heavy match resolution.
- Bulk admin changes should be chunked and throttled.
- Use reason codes for lightweight analytics and queues.
📏 Capacity overview
- Buying Policies evaluation runs during order processing.
- Heavy admin activity is mostly on list and CRUD endpoints:
- Quotas rules and groups
- Credit Control holds and grace amounts
- Blocked orders and blocking reasons
- Aim for small pages in UI (e.g., 50–200) and narrow filters.
Tip: render rows incrementally as pages arrive; avoid loading massive lists into memory on the client.
🔎 Use pagination and filters
graph LR
%% ---------- Flow ----------
UI[List view] --> Q[GET list with filters<br>page one]
Q --> P{Has next token}
P -->|Yes| N[GET next page]
P -->|No| D[Done]
%% ---------- Styles ----------
classDef total fill:#e8f1ff,stroke:#2f6feb,stroke-width:2px,color:#0b3d91;
classDef diff fill:#fff4e5,stroke:#f59e0b,stroke-width:2px,color:#7a3e00;
classDef visible fill:#ecfdf5,stroke:#10b981,stroke-width:2px,color:#064e3b;
classDef resp fill:#f2f4f7,stroke:#475569,stroke-width:2px,color:#111827;
class UI total
class Q diff
class P resp
class N visible
class D resp
style UI rx:8,ry:8
style Q rx:8,ry:8
style P rx:8,ry:8
style N rx:8,ry:8
style D rx:8,ry:8
Recommended filters per endpoint
- Blocked orders:
blockedByBuyingPolicy=true, optionalblockingPolicyTypes, account or store scoping. - Blocking reasons: provide the specific order ids you need reasons for.
- Quotas rules: scope by account, supplier, optional store.
- Quotas groups: fetch by group label or paginate.
- Grace amounts and holds: scope by account and use paging.
🧰 Bulk maintenance without pain
Large maintenance tasks should be split into small chunks and sequenced. Validate with reads between chunks to keep the UI in sync.
graph LR
SRC[Source payload<br>many changes] --> SPLIT[Split into chunks<br>size 50 to 200]
SPLIT --> W1[Apply chunk<br>create or update]
W1 --> V1[Validate with GET<br>list or rule id]
V1 --> NEXT{More chunks}
NEXT -->|Yes| W2[Apply next chunk]
NEXT -->|No| DONE[All changes applied]
%% ---------- Styles ----------
classDef total fill:#e8f1ff,stroke:#2f6feb,stroke-width:2px,color:#0b3d91;
classDef diff fill:#fff4e5,stroke:#f59e0b,stroke-width:2px,color:#7a3e00;
classDef visible fill:#ecfdf5,stroke:#10b981,stroke-width:2px,color:#064e3b;
classDef resp fill:#f2f4f7,stroke:#475569,stroke-width:2px,color:#111827;
class SRC total
class SPLIT diff
class W1,W2 visible
class V1 resp
class NEXT resp
class DONE visible
style SRC rx:8,ry:8
style SPLIT rx:8,ry:8
style W1 rx:8,ry:8
style W2 rx:8,ry:8
style V1 rx:8,ry:8
style NEXT rx:8,ry:8
style DONE rx:8,ry:8
Good practices
- Keep chunk sizes modest and retry transient errors with backoff.
- For idempotence, upserts should be deterministic by identifier.
- After large updates, re-list with filters to confirm the final state.
🧭 Match resolution stays fast when rules stay clean
- Prefer specific rules over broad, overlapping ones.
- Use co-validation groups only when you truly need shared thresholds.
- Periodically prune obsolete rules and groups.
🧾 List endpoints you will paginate most
- Orders: GET /v1/logistic-orders - ADM-ORDER-551
- Reasons: GET /v1/buying-policies/blocking-reasons - ADM-BUYING-POLICY-552
- Holds: GET /v1/buying-policies/credit-control/holds - ADM-BUYING-POLICY-550
- Grace amounts: GET /v1/buying-policies/credit-control/grace-amounts - ADM-BUYING-POLICY-551
- Quotas rules: GET /v1/buying-policies/quotas/rules - ADM-BUYING-POLICY-553
- Quotas groups: GET /v1/buying-policies/quotas/groups - ADM-BUYING-POLICY-554
🔗 API quicklinks
- Orders: GET /v1/logistic-orders - ADM-ORDER-551
- Reasons: GET /v1/buying-policies/blocking-reasons - ADM-BUYING-POLICY-552
- Holds: GET /v1/buying-policies/credit-control/holds - ADM-BUYING-POLICY-550
- Grace amounts: GET /v1/buying-policies/credit-control/grace-amounts - ADM-BUYING-POLICY-551
- Quotas rules: GET /v1/buying-policies/quotas/rules - ADM-BUYING-POLICY-553
- Quotas groups: GET /v1/buying-policies/quotas/groups - ADM-BUYING-POLICY-554
Updated 21 days ago
