Monitor - Create Customer
This process handles the creation of new customers from App4Sales to the external ERP system. The trigger for this is the creation of a new customer within the App4Sales mobile application. The connector takes the customer data, generates an XML file, and uploads it to a pre-configured FTP/SFTP server for the ERP to process.
Trigger & Permissions
The customer creation process is initiated when a user creates a new customer in the App4Sales application. This functionality is enabled when the CreateCustomer connector info flag is active in the App4Sales backoffice.
Data Source Configuration
The connector generates an XML file containing the new customer's data. This file is uploaded to the remote FTP/SFTP server. The connection details (host, username, password, and folder paths) are configured in the connector settings in the App4Sales backoffice.
Protocol: FTP, SFTP
Host: Configured in connector settings.
Username/Password: Configured in connector settings.
Target Path: The XML file is uploaded to the
/customers/directory on the server.
Payload Mapping
The connector does not perform any data transformation. It directly saves the XML data it receives from App4Sales into an XML file. The file is named using the App4Sales-generated CustomerCode (e.g., C00123.xml). The external system is responsible for parsing this XML file.
The generic XML structure for a new customer is as follows:
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
customerGuid | NewCustomers/Customer/customerGuid | The unique identifier for the customer in App4Sales. This is used to look up the |
(Various fields) | NewCustomers/Customer/* | All fields for the customer, such as name, addresses, and contact persons, are included in the XML. The connector does not map these fields individually but passes the entire XML structure to the ERP. |
Validation & Defaults
The connector performs minimal validation. It checks if a valid CustomerCode can be retrieved for the new customer. If the lookup returns an error, the process is aborted. No other data validation or default values are applied by this connector; this is expected to be handled by the external system processing the XML file.
Response & Error Handling
After a successful upload of the XML file to the FTP/SFTP server, the connector returns a success message including the customer code (e.g., SUCCESS_CUSTOMER:C00123). If the FTP/SFTP upload fails, the process returns an error message containing the details of the FTP exception.
Related Settings & Prerequisites
The following settings from the FtpXml connector apply:
FTP Server Address: The full URL to the FTP or SFTP server (e.g.,
sftp://ftp.example.com).Username: The username for the FTP/SFTP server.
Password: The password for the FTP/SFTP server.
Active Connection (FTP Active Connection): Specifies whether to use active or passive FTP mode.
Use SSL/Use TLS: Specifies whether to use SSL or TLS for secure connections.
Known Limitations
The connector's responsibility is limited to delivering the XML file to the FTP server. It does not get a confirmation back from the ERP system about whether the customer was successfully created. Any errors happening during the processing of the XML file by the ERP need to be monitored in the ERP system itself.