Skip to main content

**Pax8 Integration – How It Works **

🔁 Pax8 Sync Commands (Run in This Exact Order)

Below is the full sequence of Pax8 commands


1️⃣ Customer Sync – pax8_companies_sync

Run command:
python manage.py pax8_companies_sync

What it does:
• Fetches all Pax8 companies (customers)
• Stores customer details (name, phone, website, external ID, status)
• Syncs Pax8 flags (bill-on-behalf, self-service, approval requirements)
This MUST run first, because subscriptions, orders, and usage depend on these customer entries.


2️⃣ Subscriptions Sync – pax8_subscriptions_sync

Run command:
python manage.py pax8_subscriptions_sync

What it does:
• Fetches all Pax8 subscriptions
• Links subscriptions to the correct customer and product
• Auto-fetches missing customers/products if needed
• Saves details like quantity, start/end dates, billing start, price, cost, currency, billing term, commitment
• Runs after customer sync because subscriptions require customers to exist.


3️⃣ Orders Sync – pax8_orders_sync

Run command:
python manage.py pax8_orders_sync

What it does:
• Pulls all Pax8 orders
• Links each order to the correct customer
• Stores details: created date, ordered by, scheduled flag, line items
• Used for order history, audits, reconciliation, and billing verification


4️⃣ Products Sync – pax8_products_sync

Run command:
python manage.py pax8_products_sync

What it does:
• Fetches the complete Pax8 product catalog
• Stores product metadata (name, vendor, SKU, vendor SKU, commitment requirement)
• Ensures subscriptions and usage records correctly map to the right product
• Should be run before usage sync so usage can link to products


5️⃣ Usage Sync – pax8_usage_sync

Run command:
python manage.py pax8_usage_sync

What it does:
• Fetches usage summaries for every subscription
• Stores usage details: charges, partner cost, currency, vendor, resource group, raw usage data
• Links each usage record to the correct customer, product, and subscription
• This data is used later for billing, month-end summaries, and profit analysis