> For the complete documentation index, see [llms.txt](https://docs.dynalogic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dynalogic.com/birds-smart-connect/setup-and-configuration/business-processes.md).

# Business processes

Configure business process routing to map documents to processors based on customer or vendor.

Business process configuration in Smart Connect maps which processor handles documents for which customer or vendor. This enables different processing rules for different trading partners without code changes.

## What is a business process configuration?

A business process configuration specifies:

* **Which processor** handles the document (defined in the processor record)
* **Which customer or vendor** this processor applies to
* **Document type** the processor handles (invoice type for sales transactions)

The system uses this mapping to select the correct processor when a document arrives from a specific customer or vendor.

## Business process structure

The **NANBusinessProcessConfig** table stores the mapping:

| Field       | Description                                   | Required |
| ----------- | --------------------------------------------- | -------- |
| RelType     | Relationship type: Customer, Vendor, or Group | Yes      |
| RelationNum | Account number (customer/vendor/group)        | Yes      |
| ProcessorId | The processor that handles this account       | Yes      |

The same processor can handle multiple accounts, and the same account can have different processors for different document types.

## Creating a business process configuration

Navigate to **Smart Connect > Setup > Business Process Config** or search for "NANBusinessProcessConfig" in the F\&O search.

### Basic workflow

1. **Select the relationship type:**
   * **Customer** – Individual customer account
   * **Vendor** – Individual vendor account
   * **Customer Group** – All customers in a group
   * **Vendor Group** – All vendors in a group
2. **Enter the account/group:**
   * For individual accounts, enter the customer or vendor number
   * For groups, enter the group ID
3. **Select the processor:**
   * Choose which processor handles documents for this account/group
   * The processor's business process type (Sales Invoice, Purchase Order, etc.) determines which documents it processes
4. **Save**

### Examples

**Example 1: Specific vendor uses custom invoice processor**

* Relationship type: Vendor
* Account number: VENDOR001
* Processor: `VendorInvoiceCustomFormat`
* Result: All invoices from VENDOR001 are processed by `VendorInvoiceCustomFormat`

**Example 2: Customer group uses expedited processor**

* Relationship type: Customer Group
* Group ID: HighValueCustomers
* Processor: `ExpeditedinvoiceProcessor`
* Result: All invoices from any customer in HighValueCustomers group are processed by `ExpeditedinvoiceProcessor`

## Business process filters

Business process filters define which documents within a processor's scope are eligible for processing based on data conditions.

Navigate to **Smart Connect > Setup > Business Process Filters** or search for "NANBusinessProcessConfigFilter" in the F\&O search.

### Filter structure

| Field           | Description                                                                       |
| --------------- | --------------------------------------------------------------------------------- |
| ProcessorId     | Which processor this filter applies to                                            |
| BusinessProcess | Transaction type (Sales Invoice, Purchase Order, etc.)                            |
| InvoiceType     | For invoices: Sales Invoice, Credit Note, Freetext Invoice, Project Invoice, etc. |
| PackedQuery     | The query logic determining which records match                                   |

### How filters work

1. A document arrives (e.g., a customer invoice)
2. Smart Connect finds the processor assigned to that customer
3. Checks if the document type (invoice type, business process) matches
4. Evaluates the filter conditions (the PackedQuery)
5. Only documents matching all conditions are processed

### Filter conditions

Filters use a query-based approach to evaluate conditions. For sales invoices, typical filters include:

* **Invoice type:** Distinguish between sales invoices, credit notes, freetext invoices, project invoices
* **Amount range:** Process only invoices within a certain amount band
* **Account type:** Different handling for different customer types

### Creating a filter

The PackedQuery field stores the query logic. Typical conditions:

* **Sales Invoice:** Invoice amount > 0 AND Sales ID not empty
* **Credit Note:** Invoice amount < 0 AND Sales ID not empty
* **Freetext Invoice:** Invoice amount > 0 AND Sales ID empty

These help distinguish document types when multiple invoice types flow through the same processor.

## Business process workflow

When a document arrives:

1. **Identify the source:** Which customer or vendor sent this document
2. **Look up processor:** Find the NANBusinessProcessConfig record for this customer/vendor
3. **Check filters:** Verify the document matches the filter conditions for this processor
4. **Process:** If matched, the processor transforms and posts the data
5. **Log:** Record the outcome in processor logs

## Best practices

* **Use groups for consistency:** If multiple customers/vendors follow the same rules, create a customer or vendor group and assign it once
* **Test filters:** Make sure filter conditions correctly distinguish between document types
* **Document the configuration:** Add descriptions explaining why each business process is configured the way it is
* **Monitor mismatches:** If documents aren't being processed, check business process configuration and filters
* **Update carefully:** Changes to business process configuration affect all future documents from that account/group

## Troubleshooting

| Issue                    | Symptom                                           | Solution                                                                                |
| ------------------------ | ------------------------------------------------- | --------------------------------------------------------------------------------------- |
| Document not processed   | Document doesn't match any business process       | Verify business process config exists for that customer/vendor; check filter conditions |
| Wrong processor used     | Document processed by unexpected processor        | Check business process config priority; verify no conflicting group-level mappings      |
| Filter not matching      | Documents should match but don't                  | Review filter query logic; verify document type matches filter conditions               |
| Group config not applied | Individual account config expected but group used | Individual account configs take precedence; verify individual config doesn't exist      |

## Related pages

* [Processors and transformations](https://docs.dynalogic.com/birds-smart-connect/readme/processors-and-transformations.md)
* [Connectors and connectivity](https://docs.dynalogic.com/birds-smart-connect/setup-and-configuration/connectors-and-connectivity.md)
* [Attributes](https://docs.dynalogic.com/birds-smart-connect/setup-and-configuration/attributes.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dynalogic.com/birds-smart-connect/setup-and-configuration/business-processes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
