DECLARE @id int
EXEC dbo.QX_NEXT_KEY 'QX_SYS_PROP', 1, @id OUTPUT
insert into QX_SYS_PROP (PKEY, PROP_ID, PROP_VAL, DESCRIPTION, NEED_RESTART)
values (@id, 'INCOM_EMAIL_TICKET_STATUS', '1', 'Email processing - default ticket status', 1)
EXEC dbo.QX_NEXT_KEY 'QX_SYS_PROP', 1, @id OUTPUT
insert into QX_SYS_PROP (PKEY, PROP_ID, PROP_VAL, DESCRIPTION, NEED_RESTART)
values (@id, 'INCOM_EMAIL_TICKET_PRIORITY', '1', 'Email processing - default ticket priority', 1)
EXEC dbo.QX_NEXT_KEY 'QX_SYS_PROP', 1, @id OUTPUT
insert into QX_SYS_PROP (PKEY, PROP_ID, PROP_VAL, DESCRIPTION, NEED_RESTART)
values (@id, 'INCOM_EMAIL_TICKET_TYPE', '1', 'Email processing - default ticket type', 1)
EXEC dbo.QX_NEXT_KEY 'QX_SYS_PROP', 1, @id OUTPUT
insert into QX_SYS_PROP (PKEY, PROP_ID, PROP_VAL, DESCRIPTION, NEED_RESTART)
values (@id, 'INCOM_EMAIL_TICKET_SOURCE', '1', 'Email processing - default ticket source', 1)
EXEC dbo.QX_NEXT_KEY 'QX_SYS_PROP', 1, @id OUTPUT
insert into QX_SYS_PROP (PKEY, PROP_ID, PROP_VAL, DESCRIPTION, NEED_RESTART)
values (@id, 'INCOM_EMAIL_TICKET_IMPACT', '1', 'Email processing - default ticket impact', 1)
EXEC dbo.QX_NEXT_KEY 'QX_SYS_PROP', 1, @id OUTPUT
insert into QX_SYS_PROP (PKEY, PROP_ID, PROP_VAL, DESCRIPTION, NEED_RESTART)
values (@id, 'INCOM_EMAIL_TICKET_OWNER', '1', 'Email processing - default ticket owner', 1)
EXEC dbo.QX_NEXT_KEY 'QX_SYS_PROP', 1, @id OUTPUT
insert into QX_SYS_PROP (PKEY, PROP_ID, PROP_VAL, DESCRIPTION, NEED_RESTART)
values (@id, 'INCOM_EMAIL_TICKET_BUILDVERSION', '1', 'Email processing - default ticket buildversion', 1)
EXEC dbo.QX_NEXT_KEY 'QX_SYS_PROP', 1, @id OUTPUT
insert into QX_SYS_PROP values (@id, 'INCOM_EMAIL_INTER_SOURCE', '3', NULL, NULL, 0, 'Interaction email filter source field')
EXEC dbo.QX_NEXT_KEY 'QX_SYS_PROP', 1, @id OUTPUT
insert into QX_SYS_PROP values (@id, 'INCOM_EMAIL_INTER_DEFAULT_AGENT', '-1000', NULL, NULL, 0, 'Default Email agent – Primary Key of the Agent used in Email processing.')
go

-- all new update scripts must include a line like this:
UPDATE QX_SYS_PROP SET PROP_VAL = '039' WHERE (PROP_ID = 'DB_APP_VERSION');
