Create job

You call this function when you want to create a new job or update an existing.

The minimum to create a new job would usually be these fields
  • sAPIKey
  • sJobCode
  • sJobDescription
  • sJobTemplate
  • sStatus 

You only need to specify the parameters you need to change on an update. So if you want to tell SmartTID that a specific job is completed you can just pass these fields.
  • sAPIKey
  • sJobCode
  • sStatus
Then the integration procedure in SmartTID will take care of the rest.

It's ok to pass all fields every time if that's the easiest way to handle in your system. We only update in SmartTID when the value for a field has changed


Field
SQL Type
Comment
sAPIKey
VARCHAR(64)
Unique key for each SmartTID customer
sJobCode
NVARCHAR(20)
The number of the job. Can be letters and/or numbers like A360.
sJobDescription
NVARCHAR(50)

sJobDescription2 
NVARCHAR(50)

sPlannedStartDate
NVARCHAR(10)
String on format dd-mm-yyyy
sPlannedCompletionDate
NVARCHAR(10)
String on format dd-mm-yyyy
sStatus
NVARCHAR(10)
Planned, Started, Completed, Canceled, Template
sJobTemplate
NVARCHAR(20)
Links to another job where status = Template. Then all operaton and activities are copied from that template to this job
sJobGroupCode
NVARCHAR(40)

nPlannedNumber
INT 

nNumberPerContainer
INT

sOrderCode
NVARCHAR(20)

sCustomerCode
NVARCHAR(20)
If customer does not exists in Customer table it's created with next fields for name, address, zip, city and phone
sCustomerName
NVARCHAR(50)

sCustomerAddress
NVARCHAR(50)

sCustomerZipCode
NVARCHAR(10)

sCustomerCity
NVARCHAR(50)

sCustomerPhone
NVARCHAR(50)

sPlannedDeliveryDate
NVARCHAR(10)
String on format dd-mm-yyyy
sActualDeliveryDate
NVARCHAR(10)
String on format dd-mm-yyyy
sDepartmentCode
NVARCHAR(20) 

sProductCode
NVARCHAR(20) 

sReference
NVARCHAR(50)

sRemark
NVARCHAR(MAX)

sMaterialsRecieved
NVARCHAR(20)
0 for no and 1 for yes
sReadyToShip
NVARCHAR(1)
0 for no and 1 for yes
sExpectedMaterialDeliveryDate
NVARCHAR(10)
String on format dd-mm-yyyy
sInvoiced
NVARCHAR(1)

sManagerCode
NVARCHAR(20)

sOldJobCode
NVARCHAR(20)
If you need to rename a job you can pass this code to tell SmartTID which job to rename to sJobCode in stead off creating a new
sDistrictCode
NVARCHAR(30)

sDimensionCode1
NVARCHAR(20)

sDimensionCode2
NVARCHAR(20)

sDimensionCode3
NVARCHAR(20)

sDimensionCode4
NVARCHAR(20)

sDimensionCode5
NVARCHAR(20)

sDimensionCode6
NVARCHAR(20)

sDimensionCode7
NVARCHAR(20)

sDimensionCode8
NVARCHAR(20)

sDimensionCode9
NVARCHAR(20)

sDimensionCode10
NVARCHAR(20)

dtPlannedStartDate
DATETIME
Can replace sPlannedStartDate
dtPlannedCompletionDate
DATETIME
Can replace sPlannedCompletionDate
dtPlannedDeliveryDate
DATETIME
Can replace sPlannedDeliveryDate
dtActualDeliveryDate
DATETIME
Can replace sActualDeliveryDate
dtExpectedMaterialDeliveryDate
DATETIME
Can replace sExpectedMaterialDeliveryDate


Rev 03, Poul Christensen

From database version 6.17.14