SnelStart Connector - Create Customer
This document details the process of creating or updating customer records in SnelStart via the App4Sales platform. The connector facilitates the transfer of customer data from App4Sales, converting it into a SnelStart-compatible format for submission. It handles both new customer creation and updates to existing customer records based on the provided data.
Trigger & Permissions
The customer creation/update flow is triggered when a customer record is submitted from the App4Sales application or through a backoffice synchronization.
Data Source Configuration
The data source for this process is an App4Sales Customer object, which contains all the relevant customer information, including personal details, addresses, and contact persons. This object is transformed into a SnelStartCustomer entity before being sent to the SnelStart API.
Payload Mapping
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
|
| Mapped from |
|
| Mapped from |
|
| Directly mapped from |
|
| Set to the current date and time during creation/update. |
|
| Directly mapped from |
|
| Directly mapped from |
|
| First email address from the customer's contact persons. |
|
| Directly mapped from |
|
| First mobile number from the customer's contact persons. |
Derived |
| See "Addresses & Contacts" section for details. Mapped from the customer's delivery address ( |
Derived |
| See "Addresses & Contacts" section for details. Mapped from the customer's visit address ( |
|
| A list containing a single relation type. Defaults to "Klant" if |
Addresses & Contacts
App4Sales addresses are mapped to SnelStart's LocationAddress (delivery) and PostAddress (visit). The contact name for both addresses is taken from the first contact person's FullName. Country IDs are looked up using the App4Sales Iso2 country code via the LookupCountry service.
App4Sales Field | SnelStart Address Field | Logic/Notes |
|
| First full name from the customer's contact persons. |
|
| Mapped from the |
|
| Mapped from the |
|
| Mapped from the |
|
| The |
Validation & Defaults
If
customer.CustomerCodeis empty, the customer is considered new, and a newIdandCustomerCodewill be assigned by SnelStart.ModifiedOnis always set to the current date and time.RelationTypesdefaults to "Klant" if the connector setting "NewCustomerType" is not specified.Country IDs are looked up; if not found,
Guid.Emptyis used.
Response & Error Handling
After sending the customer data to SnelStart, the connector processes the API response:
If the SnelStart API returns an error (
result.HasErroristrue), an exception is thrown with the error message.If the API response is
null, a generic "NoBackoffice" error is returned.Upon successful creation/update, the SnelStart-assigned
Id(GUID) is stored incustomer.InternalCodeand theCustomerCodeis stored incustomer.CustomerCodefor future reference.
Related Settings & Prerequisites
New Customer Type: Defines the relation type assigned to newly created customers in SnelStart. (
settings.NewCustomerType)
Known Limitations
Not explicitly identified in the provided code snippet.