Muis Connector - Create/Update Customer
This functionality allows for the creation of new customers and the updating of existing customers in the Muis ERP system. The process is triggered from App4Sales and supports sending customer data to Muis.
Trigger & Permissions
The customer creation or update process is initiated when App4Sales sends an internal request. This functionality is enabled when either the CreateCustomer or EditCustomer feature is activated in the connector settings.
Payload Mapping
The following table details the mapping of fields from the App4Sales customer object to the Muis ERP system.
App4Sales Field | Source Field (Muis) | Logic/Notes |
CustomerName | NAAM | The customer's name, limited to 50 characters. |
CustomerName | ZKSL | A shorter search key for the customer's name, limited to 20 characters. |
LanguageCode | TAAL | The customer's language, mapped from App4Sales language codes to Muis language codes. Defaults to "NED" (Dutch) if no mapping is found. |
VatLiable | BTWPL | Indicates if the customer is liable for VAT. The value is converted to a Muis-specific format. |
VatCode | BTWNR | The customer's VAT number. |
ChamberOfCommerceCode | KVKNR | The customer's Chamber of Commerce registration number. |
(Hardcoded) | BLOK | Hardcoded to "N", meaning the customer is not blocked. |
(From request) | VERKOPER | The sales representative associated with the customer, retrieved based on the user who made the request. |
UsesPrice | PRSLST | The price list associated with the customer. |
PaymentCondition | BETCOND | The payment condition ID for the customer. |
VisitPostCode | POSTCD | The postal code of the customer's visiting address. |
VisitCity | PLAATS | The city of the customer's visiting address. |
CountryCode | LAND | The country code of the customer's visiting address. |
The customer's primary email address. | ||
Fax | FAX | The customer's fax number. |
Mobile | MOBIEL | The customer's mobile phone number. |
Phone | TEL | The customer's primary phone number. |
VisitAddress1 | ADRES | The first line of the customer's visiting address. |
Validation & Defaults
The customer's name is truncated to 50 characters for the `NAAM` field and 20 characters for the `ZKSL` field.
If the language code provided by App4Sales cannot be mapped to a Muis language code, it defaults to "NED" (Dutch).
New customers are never blocked by default.
Response & Error Handling
After submitting the data to Muis, the connector processes the response:
Success: If the customer is created successfully, Muis returns a new customer code, which is then sent back to App4Sales. If an existing customer is updated, a success message with the customer code is returned.
Error: If the API call fails, an error message is returned from Muis and logged. This message is then sent back to App4Sales, indicating that the operation failed. Common errors include authentication failures or validation errors from Muis.