Create Supplier

Create Supplier Mutation

Creates a new supplier entity in the system.

Arguments

Name
Type
Description

input

CreateSupplierInput!

Input data for creating the supplier

Return Type

Supplier - The created supplier object.

Input Fields

CreateSupplierInput:

Field
Type
Description

dataTypeID

UUID

Optional data type ID

dataTypeSlug

String

Optional data type slug

data

Map

Custom data for the supplier

Usage Example

mutation {
  createSupplier(
    input: {
      dataTypeSlug: "domestic_supplier",
      data: {
        "name": "ACME Supply Co.",
        "code": "SUP-001",
        "email": "[email protected]",
        "phone": "+1-555-0123",
        "address": {
          "street": "123 Industrial Way",
          "city": "Manufacturing City",
          "state": "CA",
          "zip": "90210",
          "country": "USA"
        },
        "contactPerson": "John Doe",
        "paymentTerms": "NET30",
        "leadTimeDays": 7,
        "minimumOrderValue": 500.00,
        "preferredDeliveryDays": ["Monday", "Wednesday", "Friday"],
        "certifications": ["ISO9001", "ISO14001"],
        "vendorRating": 4.5
      }
    }
  ) {
    id
    dataTypeSlug
    data
    createdAt
  }
}

Common Data Fields

While the data field is flexible, common supplier attributes include:

  • name - Supplier company name

  • code - Unique supplier code

  • email - Primary contact email

  • phone - Contact phone number

  • address - Supplier address object

  • contactPerson - Primary contact name

  • paymentTerms - Payment terms (NET30, COD, etc.)

  • leadTimeDays - Standard lead time

  • minimumOrderValue - Minimum order amount

  • certifications - Quality certifications

  • vendorRating - Supplier rating

Notes

  • The data field is completely flexible for custom attributes

  • Use dataTypeSlug to categorize suppliers

  • Consider creating virtual repositories named after suppliers for receiving

  • Supplier codes should be unique within your system

Last updated

Was this helpful?