Stateset Supplier Management Quickstart

Welcome to the Stateset Supplier Management Quickstart. This guide will walk you through setting up and utilizing Stateset’s powerful supplier management tools to optimize your supply chain operations.

Table of Contents

  1. Overview
  2. Quick Links
  3. Getting Started
  4. Core Features
  5. Need Help?

Overview

Stateset One provides a robust platform for managing your inventory and supplier relationships through both REST and GraphQL APIs. This guide is designed to help you implement effective inventory control, maintain strong supplier relationships, and optimize your supply chain performance using Stateset’s comprehensive features.



Getting Started

To begin leveraging Stateset’s Supplier Management capabilities, follow these initial setup steps.

1. Account Setup

  1. Sign Up
  2. Access Cloud Console
    • After signing in, navigate to the Cloud Console to manage your API keys.
  3. Generate API Key
    • In the Cloud Console, generate a new API key which will be used to authenticate your API requests.

2. SDK Installation

Integrate Stateset’s SDK into your project to simplify API interactions.

Using npm:

npm install stateset-node

Using yarn:

yarn add stateset-node

3. Client Initialization

Initialize the Stateset client in your application using the generated API key.

import { stateset } from 'stateset-node';

// Initialize with your API key
const client = new stateset(process.env.STATESET_API_KEY);

// Verify connection
async function verifyConnection() {
  try {
    const status = await client.system.healthCheck();
    console.log('Connection status:', status);
  } catch (error) {
    console.error('Failed to connect:', error);
  }
}

verifyConnection();

Core Features

Stateset offers a suite of features to manage suppliers, inventory, purchase orders, and more. Below, each feature is detailed with practical examples and code snippets to help you get started.

Supplier Management

Efficiently manage your suppliers, assess risks, track performance, and evaluate alternatives.

Creating and Managing Suppliers

Create new suppliers and maintain their performance metrics.

// Create a new supplier with initial metrics
const supplier = await client.suppliers.create({
  name: "Acme Manufacturing",
  contact: {
    email: "supplier@acme.com",
    phone: "+1-555-0123"
  },
  metrics: {
    risk_score: 6.5,          // Lower is better
    quality_rating: 99.7,     // Percentage
    on_time_performance: 95.0 // Percentage
  },
  financial: {
    cost_savings_ytd: 1200000,
    payment_terms: "NET30"
  }
});

console.log('New supplier created:', supplier);

Updating Supplier Performance Metrics:

// Update supplier performance metrics
await client.suppliers.update(supplier.id, {
  metrics: {
    quality_rating: 99.9,
    quality_rating_change: +0.2,
    on_time_performance: 93.0,
    on_time_performance_change: -2.0
  }
});

console.log('Supplier metrics updated successfully.');

Alternative Supplier Evaluation

Evaluate and compare alternative suppliers for specific parts to ensure optimal sourcing decisions.

// Compare suppliers for a specific part
const alternativeSuppliers = await client.suppliers.getAlternatives({
  part_number: "ACM-2024-X",
  quantity_needed: 243,
  delivery_location: "CA-LAX",
  required_by_date: "2024-12-31"
});

console.log('Alternative suppliers:', alternativeSuppliers);

Sample Response Structure:

[
  {
    "supplier_id": "sup_123",
    "supplier_name": "Acme Manufacturing",
    "metrics": {
      "unit_price": 208.00,
      "lead_time_days": 7,
      "total_cost": 50544.00,
      "estimated_delivery": "2024-10-08",
      "price_category": "Moderately Expensive",
      "reliability_score": 0.95
    }
  },
  {
    "supplier_id": "sup_124",
    "supplier_name": "Venture Industries",
    "metrics": {
      "unit_price": 206.00,
      "lead_time_days": 5,
      "total_cost": 49980.00,
      "estimated_delivery": "2024-10-03",
      "price_category": "Moderately Expensive",
      "reliability_score": 0.98
    }
  }
]

Inventory Management

Maintain optimal inventory levels, monitor safety stock, and track key performance indicators (KPIs) in real-time.

Safety Stock Monitoring

Ensure you have sufficient safety stock to prevent stockouts and meet demand.

// Get current safety stock levels
const safetyStock = await client.inventory.getSafetyStockLevels({
  warehouse_id: "wh_main",
  categories: ["electronics", "mechanical"]
});

console.log('Current safety stock levels:', safetyStock);

Configuring Stock Alerts:

Set up automated alerts to notify you when safety stock levels fall below thresholds.

// Configure stock alerts
await client.alerts.create({
  name: "Low Safety Stock Alert",
  type: "safety_stock",
  conditions: {
    threshold_percentage: 75,
    calculation_method: "moving_average",
    measurement_period: "7d"
  },
  notifications: {
    channels: ["email", "slack"],
    recipients: ["inventory@stateset.com"],
    slack_webhook: "https://hooks.slack.com/services/stateset/"
  }
});

console.log('Stock alert configured successfully.');

Real-time KPI Monitoring

Monitor essential KPIs to gain insights into your inventory performance and make informed decisions.

// Get comprehensive KPI dashboard
const kpis = await client.kpis.get({
  timeframe: "last_12_months",
  metrics: ["inventory_turns", "carrying_cost", "stockouts"],
  groupBy: "category"
});

console.log('KPI Dashboard:', kpis);

Sample KPI Response:

{
  "summary": {
    "open_pos_without_asns": 54,
    "asns_in_transit": {
      "count": 127,
      "change": "+5%",
      "trend": "increasing"
    },
    "late_shipments": {
      "count": 2,
      "change": "-50%",
      "trend": "improving"
    },
    "parts_at_risk": 8
  },
  "metrics": {
    "inventory_turns": {
      "current": 12,
      "target": 15,
      "trend": "stable"
    }
  }
}

Purchase Order Management

Create, manage, and track purchase orders to streamline your procurement process.

Creating and Tracking Purchase Orders

Creating a New Purchase Order:

// Create a new purchase order
const po = await client.purchaseOrders.create({
  supplier_id: supplier.id,
  items: [{
    part_number: "ACM-2024-X",
    quantity: 243,
    unit_price: 208.00,
    required_by: "2024-10-08"
  }],
  shipping: {
    method: "ground",
    address: {
      street: "123 Main St",
      city: "Los Angeles",
      state: "CA",
      zip: "90001",
      country: "USA"
    }
  }
});

console.log('Purchase order created:', po);

Tracking Purchase Order Status:

// Track PO status
const poStatus = await client.purchaseOrders.getStatus(po.id);
console.log('Purchase Order Status:', poStatus);

Advanced Shipping Notice (ASN) Management

Manage shipping notices to ensure timely and accurate receipt of goods.

Creating ASNs

Generate Advanced Shipping Notices to track incoming shipments.

// Create a new ASN
const asn = await client.asn.create({
  po_number: "PO-2024-1234",
  supplier_id: "sup_123",
  expected_delivery: "2024-10-08T14:00:00Z",
  shipping_method: "ground",
  carrier: "FedEx",
  tracking_number: "794613882378",
  items: [
    {
      line_item_id: "li_789",
      part_number: "ACM-2024-X",
      quantity: 150,
      unit_of_measure: "EA",
      lot_number: "LOT-2024-001",
      serial_numbers: ["SN001", "SN002", "SN003"]
    }
  ],
  shipping_details: {
    from_address: {
      name: "Acme Manufacturing",
      street: "123 Supplier St",
      city: "Los Angeles",
      state: "CA",
      zip: "90001",
      country: "USA"
    },
    to_address: {
      name: "Main Warehouse",
      street: "456 Warehouse Blvd",
      city: "Storage City",
      state: "SC",
      zip: "67890",
      country: "USA"
    }
  }
});

console.log('ASN created:', asn);

ASN Tracking and Updates

Monitor the status and progress of your shipments.

// Get ASN status
const asnStatus = await client.asn.getStatus(asn.id);
console.log('ASN Status:', asnStatus);

// Update ASN on receipt
await client.asn.update(asn.id, {
  status: "received",
  received_date: "2024-10-08T13:45:00Z",
  received_by: "John Doe",
  received_quantities: [
    {
      line_item_id: "li_789",
      received_quantity: 150,
      damaged_quantity: 0,
      notes: "All items received in good condition"
    }
  ]
});

console.log('ASN updated to received.');

Sample ASN Status Response:

{
  "status": "in_transit",
  "current_location": {
    "city": "Transit City",
    "state": "TC",
    "timestamp": "2024-10-06T08:30:00Z"
  },
  "milestone_updates": [
    {
      "status": "created",
      "timestamp": "2024-10-05T15:00:00Z"
    },
    {
      "status": "picked_up",
      "timestamp": "2024-10-05T16:30:00Z"
    },
    {
      "status": "in_transit",
      "timestamp": "2024-10-06T08:30:00Z"
    }
  ],
  "estimated_delivery": "2024-10-08T14:00:00Z"
}

ASN Reconciliation

Ensure that received goods match purchase orders and handle any discrepancies.

// Reconcile ASN with Purchase Order
const reconciliation = await client.asn.reconcile(asn.id, {
  po_number: "PO-2024-1234",
  reconciliation_type: "receipt",
  verification_details: {
    quantity_verified: true,
    quality_checked: true,
    documentation_complete: true
  }
});

console.log('Reconciliation result:', reconciliation);

// Handle discrepancies
if (reconciliation.discrepancies) {
  await client.asn.createDiscrepancyReport({
    asn_id: asn.id,
    po_number: "PO-2024-1234",
    discrepancies: reconciliation.discrepancies,
    resolution_actions: [
      {
        type: "quantity_adjustment",
        details: "Short shipment - updating inventory records",
        adjusted_quantity: -5
      }
    ]
  });

  console.log('Discrepancy report created.');
}

Advanced Analytics

Gain deeper insights into your supply chain performance with advanced analytics.

Performance Tracking

Monitor and analyze supplier and ASN performance metrics to identify areas for improvement.

// Get detailed supplier performance analytics
const performance = await client.analytics.getSupplierPerformance({
  supplier_id: supplier.id,
  metrics: [
    "delivery_accuracy",
    "quality_trends",
    "cost_effectiveness"
  ],
  timeframe: {
    start: "2024-01-01",
    end: "2024-10-31"
  }
});

console.log('Supplier Performance Analytics:', performance);

// Get ASN performance metrics
const asnMetrics = await client.analytics.getAsnMetrics({
  timeframe: "last_30_days",
  metrics: [
    "on_time_delivery",
    "quantity_accuracy",
    "documentation_accuracy",
    "damage_rate"
  ],
  group_by: ["supplier", "carrier"]
});

console.log('ASN Performance Metrics:', asnMetrics);

Need Help?

If you encounter any issues or have questions, Stateset offers multiple support channels to assist you:

For personalized assistance, feel free to reach out to our support team or engage with the community forum for discussions and solutions.


By following this guide, you should be well-equipped to harness the full potential of Stateset’s Inventory and Supplier Management features. Implement these practices to enhance your supply chain efficiency, maintain strong supplier relationships, and achieve optimal inventory control.