Documentation Center

Learn how to install, configure, and integrate the self-hosted PackCPQ engine.

ERP Integration Sync

ERP Integration Sync

PackCPQ can transmit quote details and plant job card specs directly to Enterprise Resource Planning (ERP) platforms. Webhooks notify listeners whenever a quotation is generated, revised, or approved.

1. Integration Webhook Handler

Build a secure server route to ingest Approved Quote events and push parameters directly into SAP, Microsoft Dynamics, NetSuite, or local manufacturing routers:

// erp_handler.js
const express = require('express');
const app = express();
app.use(express.json());

app.post('/webhooks/packcpq-sync', async (req, res) => {
  const { event_type, data } = req.body;

  if (event_type !== 'quote.approved') {
    return res.status(400).send('Ignoring event type');
  }

  const { quote_id, client_id, board_area_sqft, total_price, job_card } = data;

  try {
    // Insert parameters directly into your database schema or trigger ERP API
    await erpClient.insertSalesOrder({
      external_id: quote_id,
      customer_id: client_id,
      quantity_sqft: board_area_sqft,
      amount: total_price,
      production_specs: job_card.outline_dxf
    });

    res.status(200).send('Successfully synced with ERP');
  } catch (error) {
    console.error('ERP Sync Failed:', error);
    res.status(500).send('Sync Failure');
  }
});

2. Supported Event Signals

Configure webhook payload subscriptions in your workspace panel to listen to:

  • quote.created: Triggers when salesperson submits an estimate.
  • quote.approved: Sent once margin checks approve the quotation.
  • jobcard.generated: Transmits scoring lines and structural parameters to your corrugator/converters.
Security Vault Recommendation

Always verify incoming payloads using the SHA256 header signature (X-PackCPQ-Signature) to ensure data originating from your local calculation server is authentic.