# CustomerByNumber: Fortnox Customer by Number Retrieve a customer You need to supply the unique customer number that was returned when the customer was created or retrieved from the list of customers. ## Documentation You need to supply the unique customer number that was returned when the customer was created or retrieved from the list of customers. - Catalog: `Fortnox` - Schema: `Customers` - Label: Customer by Number This is a read-only table function. The Fortnox API may not support changing the data or the Invantive UniversalSQL driver for Fortnox does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Fortnox API. ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `CustomerByNumber`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values. Value specification by position is done by listing all values from the first to the last needed value. For example: a `select * from table(value1, value2, value3)` on a table with four parameters will use the default value for the fourth parameter and the specified values for the first three. Value specification by name is done by listing all values that require a value. For example with `select * from table(name1 => value1, name3 => value3)` on the same table will use the default values for the second and fourth parameters and the specified values for the first and third. | Name | Data Type | Required | Default Value | Documentation | |---|:---:|:---:|:---:|---| | `CustomerNumber` | `` | ☑ | | identifies the customer | | `financialyear` | `` | ☐ | | Selects what financial year that should be used (does not work on every table). | | `financialyeardate` | `` | ☐ | | Selects by date, what financial year that should be used (does not work on every table). | | `fromdate` | `` | ☐ | | Defines a selection based on a start date. Only available for invoices, orders, offers, vouchers and supplierinvoices (does not work on every table). | | `lastmodified` | `` | ☐ | | Retrieves all records since the provided timestamp (does not work on every table). | | `todate` | `` | ☐ | | Defines a selection based on an end date. Only available for invoices, orders, offers, vouchers and supplierinvoices (does not work on every table). | ## Columns of Table Function The columns of the table function `CustomerByNumber` are shown below. Each column has an SQL data type. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `Customer_Active` | `char` | Customer Active | ☐ | | | `Customer_Address1` | `varchar2(1024)` | Customer Address 1 | ☐ | | | `Customer_Address2` | `varchar2(1024)` | Customer Address 2 | ☐ | | | `Customer_City` | `varchar2(1024)` | Customer City | ☐ | | | `Customer_Comments` | `varchar2(1024)` | Customer Comments | ☐ | | | `Customer_CostCenter` | `varchar2` | Customer Cost Centre | ☐ | | | `Customer_CountryCode` | `varchar2(2)` | Customer Country Code | ☐ | | | `Customer_Country` | `varchar2` | Customer Country | ☐ | | | `Customer_Currency` | `varchar2(3)` | Customer Currency | ☐ | | | `Customer_CustomerNumber` | `varchar2(1024)` | Customer Customernumber | ☐ | | | `Customer_DefaultDeliveryTypes_Invoice` | `varchar2` | Customer Default Delivery Types Invoice | ☐ | | | `Customer_DefaultDeliveryTypes_Offer` | `varchar2` | Customer Default Delivery Types Offer | ☐ | | | `Customer_DefaultDeliveryTypes_Order` | `varchar2` | Customer Default Delivery Types Order | ☐ | | | `Customer_DefaultTemplates_CashInvoice` | `varchar2` | Customer Default Templates Cash Invoice | ☐ | | | `Customer_DefaultTemplates_Invoice` | `varchar2` | Customer Default Templates Invoice | ☐ | | | `Customer_DefaultTemplates_Offer` | `varchar2` | Customer Default Templates Offer | ☐ | | | `Customer_DefaultTemplates_Order` | `varchar2` | Customer Default Templates Order | ☐ | | | `Customer_DeliveryAddress1` | `varchar2(1024)` | Customer Delivery Address 1 | ☐ | | | `Customer_DeliveryAddress2` | `varchar2(1024)` | Customer Delivery Address 2 | ☐ | | | `Customer_DeliveryCity` | `varchar2(1024)` | Customer Delivery City | ☐ | | | `Customer_DeliveryCountryCode` | `varchar2(2)` | Customer Delivery Country Code | ☐ | | | `Customer_DeliveryCountry` | `varchar2(1024)` | Customer Delivery Country | ☐ | | | `Customer_DeliveryFax` | `varchar2(1024)` | Customer Delivery Fax | ☐ | | | `Customer_DeliveryName` | `varchar2(1024)` | Customer Delivery Name | ☐ | | | `Customer_DeliveryPhone1` | `varchar2(1024)` | Customer Delivery Phone 1 | ☐ | | | `Customer_DeliveryPhone2` | `varchar2(1024)` | Customer Delivery Phone 2 | ☐ | | | `Customer_DeliveryZipCode` | `varchar2(10)` | Customer Delivery Zip Code | ☐ | | | `Customer_EmailInvoiceBCC` | `varchar2(1024)` | Customer Email Invoice Bcc | ☐ | | | `Customer_EmailInvoiceCC` | `varchar2(1024)` | Customer Email Invoice CC | ☐ | | | `Customer_EmailInvoice` | `varchar2(1024)` | Customer Email Invoice | ☐ | | | `Customer_EmailOfferBCC` | `varchar2(1024)` | Customer Email Offer Bcc | ☐ | | | `Customer_EmailOfferCC` | `varchar2(1024)` | Customer Email Offer CC | ☐ | | | `Customer_EmailOffer` | `varchar2(1024)` | Customer Email Offer | ☐ | | | `Customer_EmailOrderBCC` | `varchar2(1024)` | Customer Email Order Bcc | ☐ | | | `Customer_EmailOrderCC` | `varchar2(1024)` | Customer Email Order CC | ☐ | | | `Customer_EmailOrder` | `varchar2(1024)` | Customer Email Order | ☐ | | | `Customer_Email` | `varchar2(1024)` | Customer Email | ☐ | | | `Customer_ExternalReference` | `varchar2(1024)` | Customer External Reference | ☐ | | | `Customer_Fax` | `varchar2(1024)` | Customer Fax | ☐ | | | `Customer_GLNDelivery` | `varchar2(13)` | Customer Gln Delivery | ☐ | | | `Customer_GLN` | `varchar2(13)` | Customer Gln | ☐ | | | `Customer_InvoiceAdministrationFee` | `varchar2` | Customer Invoice Administration Fee | ☐ | | | `Customer_InvoiceDiscount` | `double` | Customer Invoice Discount | ☐ | | | `Customer_InvoiceFreight` | `varchar2` | Customer Invoice Freight | ☐ | | | `Customer_InvoiceRemark` | `varchar2(1024)` | Customer Invoice Remark | ☐ | | | `Customer_Name` | `varchar2(1024)` | Customer Name | ☐ | | | `Customer_OrganisationNumber` | `varchar2` | Customer Organisation Number | ☐ | | | `Customer_OurReference` | `varchar2(50)` | Customer Ourreference | ☐ | | | `Customer_Phone1` | `varchar2(1024)` | Customer Phone 1 | ☐ | | | `Customer_Phone2` | `varchar2(1024)` | Customer Phone 2 | ☐ | | | `Customer_PriceList` | `varchar2` | Customer Pricelist | ☐ | | | `Customer_Project` | `varchar2` | Customer Project | ☐ | | | `Customer_SalesAccount` | `varchar2(4)` | Customer Sales Account | ☐ | | | `Customer_ShowPriceVATIncluded` | `char` | Customer Show Price Vatincluded | ☐ | | | `Customer_TermsOfDelivery` | `varchar2` | Customer Terms of Delivery | ☐ | | | `Customer_TermsOfPayment` | `varchar2` | Customer Terms of Payment | ☐ | | | `Customer_Type` | `varchar2` | Customer Type | ☐ | | | `Customer_VATNumber` | `varchar2` | Customer VAT Number | ☐ | | | `Customer_VATType` | `varchar2` | Customer VAT Type | ☐ | | | `Customer_VisitingAddress` | `varchar2(128)` | Customer Visiting Address | ☐ | | | `Customer_VisitingCity` | `varchar2(128)` | Customer Visiting City | ☐ | | | `Customer_VisitingCountryCode` | `varchar2(2)` | Customer Visiting Country Code | ☐ | | | `Customer_VisitingCountry` | `varchar2(128)` | Customer Visiting Country | ☐ | | | `Customer_VisitingZipCode` | `varchar2(10)` | Customer Visiting Zip Code | ☐ | | | `Customer_WWW` | `varchar2(128)` | Customer Www | ☐ | | | `Customer_WayOfDelivery` | `varchar2` | Customer Way of Delivery | ☐ | | | `Customer_YourReference` | `varchar2(50)` | Customer Your Reference | ☐ | | | `Customer_ZipCode` | `varchar2(10)` | Customer Zip Code | ☐ | | | `Customer__url` | `varchar2` | Customer URL | ☐ | |