CustomerAddresses

Parent Previous Next



This table is used to upload new Customer Address records to Sage. Note that duplicated addresses will be added as per the standard Sage operation. 


Field Mapping (mandatory fields in RED)

E2S Field

SAGE Field

Location within Sage

Data Type

Notes

ID

N/A

N/A

int

Used internally and not uploaded to Sage

AccountRef

A/C

Customer Record - Account Details

nvarchar(8)

Customer record this address if for

Type

Address Type

Address Record - General

nvarchar(1)

'1' Delivery or '0' Contact

Add1

Street1

Address Record - Address

nvarchar(60)


Add2

Street2

Address Record - Address

nvarchar(60)


Add3

Town

Address Record - Address

nvarchar(60)


Add4

County

Address Record - Address

nvarchar(60)


Add5

Postcode

Address Record - Address

nvarchar(60)


Country

Country

Address Record - Address

nvarchar(2)

Default Customer country will be used if blank/bad

Contact

Contact Name

Address Record - Contact Details

nvarchar(30)


Role

Role

Address Record - Contact Details

nvarchar(30)


Description

Description

Address Record - General

nvarchar(30)


Notes

Notes

Address Record - General

nvarchar(200)


Email

Email

Address Record - Contact Details

nvarchar(255)


Telephone

Telephone

Address Record - Contact Details

nvarchar(30)


Telephone2

Telephone2

Address Record - Contact Details

nvarchar(30)


Fax

Fax

Address Record - Contact Details

nvarchar(30)


Status

N/A

N/A

nvarchar(8)

Used internally and not uploaded to Sage. Set to 'New', 'Error' or 'Sent' normally


Script to create the table...


CREATE TABLE [dbo].[CustomerAddresses](

       [ID] [int] IDENTITY(1,1) NOT NULL,

       [AccountRef] [nvarchar](8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Type] [nvarchar](1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Description] [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Add1] [nvarchar](60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Add2] [nvarchar](60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Add3] [nvarchar](60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Add4] [nvarchar](60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Add5] [nvarchar](60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Country] [nvarchar](2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Contact] [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Role] [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Notes] [nvarchar](200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Email] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Telephone] [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Telephone2] [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Fax] [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

       [Status] [nvarchar](8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF_CustomerAddresses_Status]  DEFAULT (N'New'),

 CONSTRAINT [PK_CustomerAddresses] PRIMARY KEY CLUSTERED 

(

       [ID] ASC

)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY]