I’ve been able to insert Items successfully via REST (SLItems) (CostType/CostMethod Standard/Standard) (no revision/not revision tracked) (type material/source manufactured) (production type job) (attributes/costing/vendor contracts added beforehand (does the order matter here?)) . Now I’m working on inserting Jobs, Operations, Materials, and Resource Groups. From what I can tell, the right IDOs to hit are:
SLJobs – create the job header
SLJobRoutes – add operations to the job
SLJobmatls – add material lines (BOM for that job)
SLJrtResourceGroups – assign resources to each operation
Workflow / Order of Insertion
- Create the Job (SLJobs)
- Required: Job, JobType, Suffix (for current BOM), Whse, OrdType.
- {"Job": " 11135","JobType": "S", "Suffix": 0,"Whse": "MAIN","OrdType": "I", "Item": "INK-RED"}
- Note: I use "?" to find the newest generated Job, but I have even tried manual selection from the Jobs table using
- Filter: "Job NOT LIKE '%[^0-9 ]%' AND Job LIKE '%[0-9]%' AND Type='S'"
- OrderBy: "Job DESC"
- Insert Job Operation(s) (SLJobRoutes)
- Required: Job, Suffix, OperNum, Wc.
- {"Job": " 11135","Suffix": 0,"OperNum": 10,"Wc": "RM80"}
- Attach Resource Group(s) (SLJrtResourceGroups)
- Required for each operation to define capacity/resources.
- Must reference the same Job, Suffix, OperNum.
- {"Job": " 11135","Suffix": 0,"OperNum": 10,"ResourceGroup": "LABOR1"}
- Insert Job Materials (BOM) (SLJobmatls)
- Required: Job, Suffix, OperNum, Sequence, Item, QtyPer, UM, MatlType.
- {"Job": " 11135","Suffix": 0,"OperNum": 10,"Sequence": 10,"Item": "INK-RED","QtyPer": 0.25,"UM": "LT", "MatlType": "M"}
After doing all these steps, when I open Current Operations in the client, there is no operation inserted — it looks like the WC/operation isn’t found. This is despite recieving 200/OK responses from the API.
Is there another field/link I need to populate in SLJobRoutes or SLJrtResourceGroups so that the operation shows up properly in Current Operations?
Follow up edit/personal notes:
Does ItwhJob/ItwhSuffix on SLItemWhses need to be updated?
Or could there be a mismatch on ScheduleDriver with WcSchedDriver/JshSchedDrv?
JshSetuprgid/JshSetuprule on SLJobRoutes