> For the complete documentation index, see [llms.txt](https://hub.equipme.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hub.equipme.io/pro/automation/connectors/weclapp.md).

# weclapp connector

The weclapp connector for providers: create customer orders, invoices, contracts and customers from Equipme Pro in weclapp, report shipments and serial numbers back.

**Path:** "Automation" → "Workflows" → flow designer → connector **"Weclapp"**

With the **weclapp connector**, you connect Equipme Pro in [workflows](https://hub.equipme.io/pro/automation/workflows.md) with your **weclapp** ERP. Your customers' orders become sales orders, deliveries become invoices, ongoing services become contracts – and delivery data from weclapp flows back to Pro.

## What for?

* **Customer orders into the ERP:** A new customer order in Pro is automatically created as a sales order in weclapp.
* **Keep customers in sync:** Create new customers from Pro in weclapp as well and store the weclapp ID in Pro.
* **Invoices to customers:** Create sales invoices in weclapp from billing data in Pro.
* **Contracts for ongoing services:** Create a contract with a billing type in weclapp for rental devices or managed services.
* **Report delivery status back:** Retrieve shipments and serial numbers from weclapp and store them as a parcel or metadata in Pro.

## Prerequisites

* The activated [Automation module](https://hub.equipme.io/pro/automation.md)
* A **weclapp account** (tenant) with a user who may read and edit sales, purchasing, contracts and warehouse
* The **API token** of this user (in weclapp under the user's personal settings)
* For the triggers: the user must be allowed to create webhooks in weclapp
* For the Pro side of the flows: a connection of the [equipme connector](https://hub.equipme.io/pro/automation/connectors/equipme-pro.md) with an API key from Pro

## Setting up the connection

1. Copy the user's **API token** in weclapp and note the **tenant name** – the first part of your weclapp address (for `mycompany.weclapp.com` it is `mycompany`).
2. In the flow designer, drag a component of the weclapp connector onto the canvas (e.g. *ListCustomers*).
3. Click **Connect account** and enter:
   * **Tenant** – the tenant name
   * **Token** – the API token
4. The connection is checked against weclapp and saved under the tenant name. It is then available in all weclapp components and appears under **"Accounts"**.

{% hint style="info" %}
In the flow designer, the components carry their technical name (e.g. *AddSalesOrder*). Select fields such as "Sales channel", "Warehouse", "Payment method" or "Cost center" load their values directly from your weclapp tenant.
{% endhint %}

## Triggers

| Component         | Fires when …                                                       |
| ----------------- | ------------------------------------------------------------------ |
| NewArticle        | a new article is created in weclapp. Returns the complete article. |
| ChangedSalesOrder | a sales order is changed in weclapp. Returns the complete order.   |

Neither trigger has settings. Once the flow is started, weclapp reports the event to Pro immediately; there is no periodic polling. *ChangedSalesOrder* is useful for passing status changes of an order (e.g. shipping) back to Pro.

## Actions

### Customers and articles

| Component     | Purpose                          | Key options                                                                                                                                         |
| ------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| AddCustomer   | Create a customer (organization) | Required: "Company", "Country code", "Sales channel"; optional email, "Customer number", address, contacts, "Additional fields" (custom attributes) |
| ListCustomers | List customers                   | "Filter"                                                                                                                                            |
| GetArticle    | Read an article                  | "Article ID"                                                                                                                                        |
| ListArticles  | List articles                    | "Filter"                                                                                                                                            |

### Sales

| Component                       | Purpose                                | Key options                                                                                                                                                                                                                                                                          |
| ------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| AddSalesOrder                   | Create a sales order                   | Required: "Customer ID", "Sales channel"; differing delivery and billing address, "Customer order number", items, shipping costs, "Type" ("Standard", "Advance payment", "Prepayment", "Part payment", "Retail sale"), "Warehouse", "Shipment type", delivery dates, "Only services" |
| GetSalesOrder / ListSalesOrders | Read sales orders                      | "Order ID"                                                                                                                                                                                                                                                                           |
| CancelSalesOrder                | Cancel or manually close a sales order | "Order ID"                                                                                                                                                                                                                                                                           |
| AddSalesInvoice                 | Create a sales invoice                 | Required: "Customer ID", "Sales channel"; items, service period, "Due date", "Grouping of items", document texts, "Dunning block" ("Without", "Temporary", "Indefinite"), cost center                                                                                                |

### Contracts

| Component   | Purpose           | Key options                                                                                                                                                                                                                                                  |
| ----------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| AddContract | Create a contract | Required: "Label", "Sales channel"; "Contract partner", "Start date", "End date" or "Unlimited", "Type", "Status" ("Active", "Draft", "Inactive"), items ("Revenue"/"Expenditure"), costs, "Billing type", "Billing day", "Desired invoice status", reminder |

The **"Billing type"** defines how weclapp bills the contract: "Create invoice before billing period", "Create invoice after billing period", "Create sales order", "Not invoiceable" or "None".

### Purchasing

| Component          | Purpose                                 | Key options                                                                                                                                     |
| ------------------ | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| AddPurchaseOrder   | Create a purchase order with a supplier | Required: "Supplier", "Warehouse"; items, shipping costs, payment type, "Delivery conditions", delivery dates, tracking number and tracking URL |
| AddPurchaseInvoice | Record a supplier invoice               | Required: "Supplier"; invoice number and date, items, "Cost center", "Cost type", booking data, "Payment block"                                 |

### Warehouse and logistics

| Component                           | Purpose             | Key options                    |
| ----------------------------------- | ------------------- | ------------------------------ |
| GetShipment / ListShipments         | Read shipments      | "Shipment ID" or "Filter"      |
| GetSerialNumber / ListSerialNumbers | Read serial numbers | "Serial Number ID" or "Filter" |

### Items and filters

* **Items:** "Items (static)" captures items one by one in the form ("Article ID", "Position title", "Quantity", "Unit", price, discount); items with quantity 0 are skipped. "Items (dynamic)" takes a ready-made item list from a previous step, e.g. the items of a customer order from Pro. Shipping costs work the same way.
* **Filters:** *ListArticles*, *ListCustomers*, *ListShipments* and *ListSerialNumbers* filter via "Property" (field name in weclapp, e.g. `customerNumber`), "Operator" (e.g. "equals", "like expression") and value, combinable with AND and OR.

## Examples

### Create a customer order from Pro as a sales order

1. **Trigger:** *Equipme Pro › New Sales Order*.
2. **Equipme Pro › Get Customer Metadata:** read the customer's weclapp customer ID.
3. **Weclapp › AddSalesOrder** with "Customer ID", "Sales channel", the delivery address of the customer location, "Customer order number" (order number from Pro) and the items.
4. **Equipme Pro › Set Service Instance Metadata Entry:** store the weclapp order number on the service instance.

### Create new customers in weclapp

1. **Trigger:** *Equipme Pro › New Customer*.
2. **Weclapp › ListCustomers** with filter `customerNumber` "equals" customer number; only continue if no match is found.
3. **Weclapp › AddCustomer** with company name, customer number, address and "Sales channel".
4. **Equipme Pro › Update Customer Metadata:** store the weclapp ID on the customer.

### Report shipping from weclapp back to Pro

1. **Trigger:** *Weclapp › ChangedSalesOrder*; use a **filter** to process only orders with a shipping status.
2. **Weclapp › ListShipments** with a filter on the order to read the tracking number and shipping carrier.
3. **Equipme Pro › Add Fulfillment Parcel** with tracking number and tracking link – your customer sees the delivery status in the customer portal.
4. **Equipme Pro › Update Fulfillment Order Status** with "Dispatch Delivery".

## Notes and limitations

* The triggers only react to **new articles** and **changed sales orders**. For other events, combine a scheduler with a list action.
* List actions return the **first result page** from weclapp, not necessarily all entries. Use filters to keep the result small. *ListSalesOrders* has no filter.
* A differing delivery or billing address is only applied if a "Country code" is entered there.
* You maintain the mapping customer in Pro ↔ customer in weclapp yourself, ideally as metadata on the customer.
* All actions work with the permissions of the weclapp user whose token you use.

## Troubleshooting

| Problem                  | Cause / solution                                                                                                                                    |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Connect account" fails  | Check the tenant name (only the first part of the address, without `.weclapp.com`) and the token.                                                   |
| Select field stays empty | The connection is missing or the user may not read the area (e.g. warehouse, sales channels).                                                       |
| Trigger does not fire    | Is the flow started? May the user create webhooks in weclapp? After changes, stop and restart the flow.                                             |
| Sales order is rejected  | "Customer ID" is not a valid weclapp ID or the "Article ID" of an item is missing. Determine IDs beforehand with *ListCustomers* or *ListArticles*. |
| Customer created twice   | Check with *ListCustomers* before *AddCustomer* and store the weclapp ID as metadata in Pro.                                                        |

The logs under **"Insights"** help with errors. For assistance, contact [Support](https://hub.equipme.io/pro/help/support.md) and include the flow name, component and error message.

## Frequently asked questions

**Where do I find the "Customer ID" for a sales order?**

It is the customer's internal ID in weclapp, not the customer number. Determine it once with *ListCustomers* and store it as metadata on the customer in Pro – then it is available in every order flow.

**Can I send invoices from Pro instead of weclapp?**

Both work. If weclapp is the leading system, you create the invoice there with *AddSalesInvoice*; billing in Pro then serves as the source (see [Billing](https://hub.equipme.io/pro/sales/billing.md)).

**Do I need a separate weclapp connection per customer?**

No. One connection to your weclapp tenant is enough for all customers.


---

# 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://hub.equipme.io/pro/automation/connectors/weclapp.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.
