# Manufacturo

## Overview <a href="#h_f5acb574d5" id="h_f5acb574d5"></a>

Manufacturo is a manufacturing execution system (MES) that provides inventory management, production planning, and shop floor control capabilities. Silkline's integration with Manufacturo enables seamless synchronization of purchase orders, materials, and suppliers between the two systems.

To complete your integration with Manufacturo, you will need to provide the following information:

* `Base URL` - Your Manufacturo instance URL
* `Site Code` - The site code for your Manufacturo instance
* `API Key` - Authentication key for API access

This guide walks you through finding or creating those credentials within Manufacturo.

## Prerequisites <a href="#h_2a3f4f23fb" id="h_2a3f4f23fb"></a>

Please ensure you have **Administrator** permissions in your Manufacturo instance, or someone has shared their access with you.

## Instructions <a href="#h_8643ae69eb" id="h_8643ae69eb"></a>

{% stepper %}
{% step %}
**Finding your Manufacturo Base URL**

Your base URL is the root URL of your Manufacturo instance (without any trailing paths).

{% hint style="info" %}
If your Manufacturo URL is https\://**mycompany.manufacturo.com**, your Base URL is **<https://mycompany.manufacturo.com>**
{% endhint %}
{% endstep %}

{% step %}
**Finding your Site Code**

Your site code is typically found in your Manufacturo instance settings or can be provided by your Manufacturo administrator.

{% hint style="info" %}
The site code is usually a short alphanumeric identifier like **MAIN** or **SITE01**
{% endhint %}
{% endstep %}

{% step %}
**Creating an API Key**

1. Log into your Manufacturo instance
2. Navigate to the **Integrator** section from the main dashboard
3. Click on the **Keys** tab in the Integrator interface
4. Click the **"+ Add Api Key"** button
5. Provide a descriptive name for the key (e.g., "Silkline Integration")
6. Configure the appropriate permissions for the integration. The Silkline integration requires comprehensive access across multiple modules:

   **Core Integration Permissions:**

   * **Integrator** - Full access (Actions, Parameters, Triggers, Screens, API keys, Scripts, Custom endpoints, etc.)
   * **Master Data** - Full access (Products, Units of Measurement, Suppliers/Customers)
   * **Inventory Management** - Full access (Inventory, Containers, Purchase Orders, Move Orders, Shipping Orders)
   * **Inventory Operations** - Full access (Inventory moves, Receiving, Status changes, etc.)

   **Additional Required Permissions:**

   * **Organization Management** - Full access (Users, Roles, Sites, Areas, Locations, Work Centers)
   * **Process & Procedures** - Full access (Process Plans, BOMs, Procedures, Standard Operations)
   * **Shopfloor Operations** - Full access (Orders, Batches, Procedure Runs, Equipment Usage)
   * **Shopfloor Management** - Full access (Orders, Labor, Higher Pedigree)
   * **Kanban Management** - Full access (Kanban loops, Higher Pedigree)
   * **Nonconformance** - Full access (NCs, Conditions, Dispositions)
   * **MRP** - Full access (Master Schedule, MRP Runs, Reports)
   * **Document Management** - Full access (Read, Edit, Archive, Approve)
   * **Costing** - Full access (Read, Edit)
   * **Action Boards** - Full access (Boards, Actions, Calls)
   * **Alertigo** - Full access (Connections, Jobs, Configuration)
   * **Reporting** - Full access (Configuration, Preview)

{% hint style="info" %}
**Note**: The Silkline integration requires comprehensive permissions across all Manufacturo modules to enable full bidirectional synchronization of data including purchase orders, materials, inventory, suppliers, and organizational data. This ensures seamless integration between Silkline and Manufacturo systems.
{% endhint %}

7. Click **Create** or **Generate** to create the API key 8. Copy the generated API key immediately and store it securely

{% hint style="warning" %}
**Important**: The API key will only be displayed once for security reasons. Be sure to copy and store it securely before closing the dialog. You will need this key for the integration setup.
{% endhint %}

{% hint style="info" %}
You can monitor API key usage in the **Monitoring** tab, which shows execution statistics, success rates, and failure counts for each key.
{% endhint %}
{% endstep %}

{% step %}
**Configure the Integration in Silkline**

1. Follow the [Managing Integrations](https://silkline.gitbook.io/docs/configuration/integrations/managing-integrations) guide to create your Manufacturo integration in Silkline
   {% endstep %}
   {% endstepper %}

## What Gets Synchronized

The integration syncs the following data between Manufacturo and Silkline:

### Purchase Orders

Purchase orders and their line items are synchronized from Silkline to Manufacturo when they meet specific criteria.

**What Gets Synced:**

* Order details (order number, supplier, terms, dates)
* Line items (product codes, quantities, unit costs, due dates)
* Order status and tracking information
* Quality clauses and inspection requirements

**Sync Requirements:**

For a purchase order to be synced to Manufacturo, it must meet **all** of the following conditions:

1. **Order Status**: Must be in `Open` state (Draft or Canceled orders are skipped)
2. **Valid Lines**: Must have at least one valid line item that meets the criteria below

**Line Item Eligibility:**

For a line item to be included in the sync, it must meet **all** of these requirements:

* **Quantity**: Must have `units > 0` (zero quantity lines are filtered out)
* **Material**: Must have an associated material
* **Material Sync**: The material must already exist in Manufacturo (materials are synced separately)

**What Happens When a PO is Skipped:**

If a purchase order doesn't meet the sync requirements, it will be skipped with an informative log entry. Common skip scenarios include:

* **"Manufacturo only syncs open orders"**: The order is in Draft or Canceled state
* **"Purchase order has no valid lines"**: All line items have been filtered out because they have zero quantities or no associated material.

{% hint style="info" %}
**Note**: Skipped orders will not appear in Manufacturo. You can monitor sync activity and skip reasons in your integration logs. To sync a previously skipped order, ensure it meets all the requirements above (open status and at least one valid line item).
{% endhint %}

### Materials/Parts

Material master data is synchronized from Manufacturo to Silkline, including:

* Part codes and revisions
* Part names and descriptions
* Unit of measure information
* Tracking levels (serial, lot, or none)
* Active/inactive status

### Suppliers

Supplier information is synchronized from Silkline to Manufacturo, including:

* Supplier codes and names

### Receipts

Receipt information is synchronized from Manufacturo to Silkline via webhooks:

* Direct receiving events
* Quantity received updates
* Receipt confirmations

## Detailed Data Mappings

### Purchase Order Mapping

| Silkline Field | Manufacturo Field | Notes                                |
| -------------- | ----------------- | ------------------------------------ |
| Order Number   | orderNumber       | Purchase order identifier            |
| Supplier       | partner           | Supplier information (code and name) |
| Order Lines    | orderLines        | Array of order line items            |
| Order State    | status            | Order status (NEW, CANCELLED, etc.)  |

### Order Line Mapping

| Silkline Field | Manufacturo Field           | Notes                                                                                    |
| -------------- | --------------------------- | ---------------------------------------------------------------------------------------- |
| Line Number    | orderDetailNumber           | Line item identifier                                                                     |
| Material       | productCode/productRevision | Part code and revision                                                                   |
| Quantity       | quantity                    | Number of units ordered                                                                  |
| Unit Cost      | unitCost                    | Price per unit (if cost tracking enabled)                                                |
| Due Date       | dueDate                     | Expected delivery date (uses needDate by default, or expectedDeliveryDate if configured) |
| Description    | comment                     | Line item description                                                                    |
| Status         | status                      | Line status (NEW, CANCELLED, etc.)                                                       |

### Material Mapping

| Silkline Field  | Manufacturo Field                    | Notes                     |
| --------------- | ------------------------------------ | ------------------------- |
| Material Number | code                                 | Part number/SKU           |
| Revision        | revision                             | Part revision             |
| Name            | text                                 | Part name/description     |
| Unit of Measure | default\_uom\_code                   | Unit type (EA, KG, etc.)  |
| Tracking Level  | is\_serial\_tracked/is\_lot\_tracked | Serial/lot tracking flags |
| Active Status   | active                               | Part availability         |

### Receipt Mapping

| Manufacturo Field | Silkline Field | Notes                        |
| ----------------- | -------------- | ---------------------------- |
| OrderNumber       | Order Number   | Links to Silkline order      |
| OrderDetailNumber | Line Number    | Links to specific order line |
| Quantity          | Units Received | Quantity received            |

## Webhook Events

The integration uses webhooks for real-time synchronization:

### Product Created/Updated Event

* **Trigger**: When a product is created or updated in Manufacturo
* **Action**: Syncs the product data to Silkline as a material
* **Frequency**: Real-time via webhook
* **Event Type**: `ProductCreatedUpdatedPublicEvent`
* **Data Synced**: Product code, revision, site code, and all product master data

### Direct Receiving Event

* **Trigger**: When inventory is received in Manufacturo
* **Action**: Updates the corresponding order line in Silkline with received quantities
* **Frequency**: Real-time via webhook
* **Event Type**: `DirectReceivingEvent`
* **Data Synced**: Order number, line number, quantity received, and receipt details

### Reverse Receiving Event (Unrecieve)

* **Trigger**: When inventory is reversed or "unreceived" in Manufacturo
* **Action**: Updates the corresponding order line in Silkline to reflect the reduced received quantities
* **Frequency**: Real-time via webhook
* **Event Type**: `ReverseReceivingEvent`
* **Data Synced**: Order number, line number, previous quantity, current quantity, and reversal details
* **Use Cases**:
  * Correcting receiving errors
  * Returning defective materials
  * Adjusting inventory discrepancies
  * Processing material returns

## Monitoring and Troubleshooting

### Understanding Sync Activity

The integration provides detailed logging for all sync operations, including successful syncs and skipped orders. This helps you understand what's being synchronized and troubleshoot any issues.

### Common Sync Scenarios

| Scenario                                        | Behavior                                                    | Where to Check                 |
| ----------------------------------------------- | ----------------------------------------------------------- | ------------------------------ |
| PO with all valid lines                         | ✅ Syncs successfully to Manufacturo                         | Manufacturo purchase orders    |
| PO in Draft state                               | ⏭️ Skipped with reason "Manufacturo only syncs open orders" | Integration logs               |
| PO with some zero-quantity lines                | ⚠️ Partial sync - only valid lines are included             | Manufacturo (check line count) |
| PO with all zero-quantity lines                 | ⏭️ Skipped with reason "Purchase order has no valid lines"  | Integration logs               |
| PO with lines referencing non-existent material | ⏭️ Skipped or partial - depends if any valid lines remain   | Integration logs + Manufacturo |
| PO with missing material associations           | ⏭️ Skipped with reason "Purchase order has no valid lines"  | Integration logs               |
| Canceled PO                                     | ⏭️ Skipped with reason "Manufacturo only syncs open orders" | Integration logs               |

### Best Practices for Successful Syncs

1. **Sync Materials First**: Ensure all materials are synced to Manufacturo before creating purchase orders
2. **Validate Line Items**: Before opening a PO, verify all lines have quantities > 0 and associated materials
3. **Open Orders Only**: Only open purchase orders after all line items are complete and valid
4. **Monitor Logs**: Regularly review integration logs to catch any skipped orders or sync issues
5. **Test Changes**: When making configuration changes, test with a sample PO before rolling out widely

## Configuration Options

The integration supports several configuration options:

### Parts Configuration

* **Type**: Insert or upsert mode
* **Site Code**: Override default site code for parts
* **Defaults**: Default values for new parts (UOM, tracking settings, etc.)

### Orders Configuration

* **Site Code**: Override default site code for orders
* **Include Line Unit Cost**: Whether to sync unit costs
* **Prefer Expected Delivery Date**: When enabled, uses `expectedDeliveryDate` as the primary source for order line due dates, falling back to `needDate` if not available. When disabled (default), uses `needDate` first, then `expectedDeliveryDate`.
* **Defaults**: Default pedigree codes for order lines

### Suppliers Configuration

* **Site Code**: Override default site code for suppliers

## Frequently Asked Questions

### How often does the data sync?

* **Purchase Orders**: Synced in real-time when created or updated in Silkline
* **Materials**: Synced in real-time when created or updated in Manufacturo
* **Receipts**: Synced in real-time when inventory is received in Manufacturo
* **Reverse Receiving**: Synced in real-time when inventory is reversed/unreceived in Manufacturo
* **Product Updates**: Synced in real-time when products are created or updated in Manufacturo
* **Full Sync**: Periodic full synchronization every 15 minutes

### What happens if there's a conflict between systems?

For overlapping data models:

* **Purchase Orders**: Silkline is the primary source for order creation and updates
* **Materials**: Manufacturo is the primary source for part master data
* **Receipts**: Manufacturo is the primary source for receiving information

### Can I sync orders with zero quantities?

No, order lines with zero quantities are automatically filtered out during synchronization. If a purchase order only contains lines with zero quantities, the entire order will be skipped and not synced to Manufacturo.

### What if a part doesn't exist in Manufacturo?

The integration will skip order lines for parts that don't exist in Manufacturo and log a warning. Ensure all materials are synchronized before creating purchase orders. If all lines in a PO reference non-existent materials, the entire PO will be skipped.

### Why isn't my purchase order syncing to Manufacturo?

A purchase order will be skipped if it doesn't meet the sync requirements:

1. **Order Not Open**: Orders must be in `Open` state. Draft or Canceled orders will not sync.
2. **No Valid Lines**: If all line items are filtered out (zero quantities or missing materials), the order cannot sync.

To resolve:

* Ensure the order is in `Open` state
* Verify that at least one line has a quantity greater than zero
* Confirm that all materials exist in both Silkline and Manufacturo
* Check your integration logs for specific skip reasons and details

### How can I tell if my order was skipped?

Skipped orders are logged in your integration activity logs with specific reasons:

* **Skip Reason**: Clear explanation of why the sync was skipped
* **Order Details**: Order ID and display order number for reference
* **Timestamp**: When the skip occurred

You can monitor integration activity in the Silkline integration dashboard or through your configured logging/monitoring tools. Look for log entries containing "skipping" or "skip" to identify orders that weren't synced.

### How are order statuses mapped?

| Silkline Status | Manufacturo Status |
| --------------- | ------------------ |
| Open            | NEW                |
| Canceled        | CANCELLED          |
| Closed          | RECEIVED           |

### What happens to received or closed order lines?

Once an order line has been received or closed in Manufacturo, certain fields (like unit cost and inventory status) cannot be updated. The integration preserves the existing Manufacturo values for these fields.

### How does reverse receiving work?

Reverse receiving (unrecieve) allows you to correct receiving errors or process returns by reducing the received quantity on an order line. When a reverse receiving event occurs in Manufacturo:

* The system fetches the latest quantity completed from Manufacturo to ensure accuracy
* The corresponding Silkline order line is updated to reflect the new received quantity
* Both the previous and current quantities are tracked for audit purposes
* This is commonly used for correcting receiving mistakes, processing returns, or adjusting inventory discrepancies

### What happens when a product is created or updated in Manufacturo?

When a product is created or updated in Manufacturo, the integration automatically:

* Syncs the product data to Silkline as a material/part
* Updates all relevant product attributes including tracking settings, UOM, and active status
* Triggers material ingestion to ensure the latest product information is available in Silkline
* Maintains consistency between the two systems for all product master data
