Skip to main content

Multicase - Create customer

Multicase - Create Customer This document describes the process of creating a new customer in Multicase ERP through the App4Sales connecto...

Updated over a week ago

Multicase - Create Customer

This document describes the process of creating a new customer in Multicase ERP through the App4Sales connector.

Trigger & Permissions

A new customer can be created from the App4Sales application. This functionality is enabled when the connector settings have the CreateCustomer and EditCustomer flags enabled.

Data Source Configuration

The connector sends customer data to the Multicase API. The base URL is configured in the connector settings. The following endpoints are used:

  • /customer/create: To create a new customer.

  • /request/CreateCustomerContact or /request/CustomerContactCreate: To create a new contact person for the customer. The endpoint used depends on the UseCustomerContactCreateEndpointForContactCreate setting.

  • /customer/{id}: To retrieve the created customer's details.

Payload Mapping

The connector uses a template-based approach to create new customers. A template customer, identified by the TemplateCustomerId setting, is retrieved from Multicase. The properties of this template are then overridden with the data from App4Sales.

Customer

Multicase Field

App4Sales Field

Logic/Notes

Name

CustomerName

Direct mapping.

Communication.Phone1

Phone or MainContactPerson.Phonenumber

Uses the customer's phone number, falls back to the main contact person's phone number.

Communication.Phone2

MainContactPerson.MobileNumber

Direct mapping.

Communication.Fax1

Fax

Direct mapping.

Communication.Internet

Website

Direct mapping.

Communication.Email

Email

Direct mapping.

Accounting.Banking.IsTaxRequired

VatLiable

Direct mapping.

Accounting.Banking.VATNumber

VatCode

Direct mapping.

Accounting.Invoicing.FactoringUsed

-

Set from the UseFactoringForNewCustomers connector setting.

Accounting.Payment.PaymentTerm.PaymentTermID

PaymentConditionCode

The PaymentTermID is looked up from the PaymentConditionInfoConfiguration setting based on the PaymentConditionCode.

CustomerNumber

-

Set to null for new customers, as Multicase assigns this value.

Communication.Language

LanguageCode

Direct mapping.

CompanyNumber

DynamicFreeFields

The value is extracted from the dynamic free field with the name "CompanyNumber".

Active

-

Hardcoded to true.

Addresses

The connector maps the delivery and visit addresses from App4Sales to the Multicase customer. The behavior can be influenced by the UseVisitAddressAsPostalAndInvoice setting.

Multicase Address Field

App4Sales Address Field

Address Type

Logic/Notes

Line1

AddressLine1

Delivery, Visit

Direct mapping.

Line2

AddressLine2

Delivery, Visit

Direct mapping.

Line3

AddressLine3

Delivery, Visit

Direct mapping.

Postal.ZipCode

PostCode

Delivery, Visit

Direct mapping.

Postal.City

City

Delivery, Visit

Direct mapping.

Postal.Country

Country / IsoCode

Delivery, Visit

The country name is retrieved from the mapped countries configuration based on the ISO code.

Contact Person

Multicase Contact Field

App4Sales Contact Person Field

Logic/Notes

FirstName

FirstName or FullName

Uses FirstName, or extracts the first name from FullName if FirstName is not available.

LastName

LastName or FullName

Uses LastName, or extracts the last name from FullName if LastName is not available.

EMailAddress

Email

Direct mapping.

DirectPhone

MobileNumber

Direct mapping.

CellPhone

MobileNumber

Direct mapping.

Gender

Gender

Uses the provided gender, or defaults to "Unknown".

Active

-

Hardcoded to true.

Validation & Defaults

  • The CustomerName is a required field. If it is not provided, the process will fail.

  • The connector does not support updating existing customers. If a CustomerCode is provided, the process will fail.

  • A TemplateCustomerId must be configured in the connector settings. If the template customer cannot be found, the process will fail.

Response & Error Handling

  • After creating the customer, the connector retrieves the new customer's details from Multicase to get the assigned CustomerNumber.

  • If the CustomerNumber is not retrieved, an exception is thrown.

  • If the main contact person is provided, it is created and linked to the new customer. If this process fails, an exception is thrown.

  • Exceptions are logged and returned to the App4Sales application.

Related Settings & Prerequisites

  • TemplateCustomerId: The ID of the customer in Multicase to be used as a template for new customers.

  • UseFactoringForNewCustomers: A boolean setting that determines if new customers should use factoring.

  • PaymentConditionInfoConfiguration: A JSON configuration that maps App4Sales payment condition codes to Multicase payment term IDs.

  • UseVisitAddressAsPostalAndInvoice: A boolean setting that, if true, uses the visit address as the postal and invoice address.

  • UseCustomerContactCreateEndpointForContactCreate: A boolean setting that determines which endpoint to use for creating contact persons.

Did this answer your question?