Hello, I am attempting to create an arrival to receive a Purchase Order line via REST API. I am inspecting the endpoint calls that Aurena makes during the process, but i’m unable to figure out which call is actually performing the receipt. I see calls to CreateReceiptSet but the payload doesnt include the information from the arrival line (PO #, Line, Etc). I also see CreateArrivalReceipt, but it only uses what i assume is the OBJKEY that is returned from CreateReceiptSet. I know this is a little tricky because an assistant is involved, but I cant seem to make sense of the calls that are happening. Any tips for figuring out how this assistant works?
Hi
It’s quite interesting how IFS assistants work , The workflow behind editing fields in an assistant involves several HTTP requests, beginning with a POST API call to create a record in a temporary table when a field is first edited. Subsequently, a series of PATCH requests are made to update the initial record created. Each request returns the objkey of the corresponding record in the temporary table. Upon completing the assistant, a separate POST request is sent to a different endpoint, often labeled as "finish" or "create".Usually objkey returned from the previous requests is passed as a parameter in this final request. This objkey serves as a reference to the edited record in the temporary table and ensures that the changes made during the assistant's interaction are properly captured and processed.
/Trewon
https://xxxxxx-uat.ifs.cloud/main/ifsapplications/projection/v1/CreateReceipt.svc/CreateReceiptSet(Objkey='128F5FFCF77CAF0BE0632562F20A1D4A')/ReceiveLines?
And then a few calls below is a POST that does the actual receipt based on Objkey:
https://xxxxxxx-uat.ifs.cloud/main/ifsapplications/projection/v1/CreateReceipt.svc/CreateArrivalReceipt
Payload:
{ParentObjkey: "128F5FFCF77CAF0BE0632562F20A1D4A"}
So, I would say that based on your Source Ref 1 / 2 /3 / 4 you need to get the Objkey and then call CreateReceipt.svc/CreateArrivalReceipt
Thanks,
Hi
Disclaimer: I am self taught, and this is the result of hours of trial and error, so no promises.
Note: I’ll list all of the endpoints as projections, so for instance, the CreateReceipt.svc full path would be: https://tyourIFSserver]/main/ifsapplications/projection/v1/CreateReceipt.svc
Step 1: Build the CLOB data for the PO Line being received:
This is a long text string that is delimited by “^” characters, and includes a lot of the data for the line. Here’s an example of one:
<"SOURCE_REF1=T12345^SOURCE_REF2=1^SOURCE_REF3=1^SOURCE_REF4=^SOURCE_REF_TYPE_DB=PURCHASE_ORDER^SOURCE_QTY_TO_RECEIVE=1^INV_QTY_TO_RECEIVE=1^CATCH_QTY_TO_RECEIVE=^LOCATION_NO=^LOCATION_TYPE_DB=^LOT_BATCH_NO=T12345-1-1^ENG_CHG_LEVEL=1^WAIV_DEV_REJ_NO=*^CONDITION_CODE=^RECEIVE_CASE=ReceiveIntoInventory^SOURCE_QTY_TO_INSPECT=0^QC_CODE=^NOTE_TEXT=^ORDER_CODE=1^INPUT_QTY=^INPUT_CONV_FACTOR=^INPUT_VARIABLE_VALUES=^PART_COST_LEVEL_DB=COST PER LOT BATCH^PACKING_INSTRUCTION_ID=^ADD_EMPTY_TO_PARENT_OPTION_DB=^RENTAL_DB=false^MANUFACTURER_ID=^MANUFACTURER_PART_NO=^;"]
As you can see, i have entered my PO, Line, Release, Qty, etc into the string. A lot of the options are left blank. I could not find any documentation on this part, I reverse engineered this string from watching the calls happening in real time.
Step 2: POST request to CreateReceipt.svc/FndTempLobs to begin the process
Data payload:
{"CreatedByModule": "CreateReceipt"}
You will need the ETag and the LobId from the response of this call
Step 3: PATCH request to CreateReceipt.svc/FndTempLobs(LobId='{lobId}')/ClobData
The LobId from step 2 should be substituted into the path above, You will also need to add an If-Match header to your request with the Etag received from step 2.
The body for this request is the text of the CLOB you created in step 1.
Step 4: POST request to CreateReceipt.svc/InsertSelection
Data Payload:
{
"Source": "RegisterArrivals",
"SelectionTempLobId": " LOBID FROM STEP 2]"
}
You’ll need the LineGuid from the response of this call.
Step 5: POST request to CreateReceipt.svc/CreateReceiptSet
Example Data Payload (anything in m ] brackets must be substituted):
{
"PrintBarCodes": false,
"PrintArrival": false,
"PrintServiceabiliyTag": false,
"PackingRule": "SingleHandlingUnit",
"LineGuid": "dLINE GUID FROM STEP 4}",
"ReceivedBy": "SADD A USER ID HERE]",
"ArrivalDate": " THIS WILL NEED TO BE A TIMESTAMP]",
"ReceiptReference": "]THIS IS A REFERENCE NOTE]"
}
You’ll need the ObjKey from the response of this call.
Step 6: GET request to CreateReceiptSet(Objkey='rObjKey from Step 5]')/ReceiveLines
This will return a list of lines on the receipt (i think it should just be one because we’re making a single request). You will need the ObjKey for this line.
Step 7: PATCH request to CreateReceipt.svc/CreateReceiptSet(Objkey='rObjKey for Receipt from Step Step 5]')/ReceiveLines(Objkey=' ObjKey for line from Step 6]')
Example Data Payload (You’ll need to sub in your own Locations/Warehouse/etc):
{
"LocationNo": "{{selectLocationNo}}",
"Warehouse": "{{selectLocationWarehouse}}",
"BayNo": "{{selectLocationBay}}",
"RowNo": "{{selectLocationRow}}",
"TierNo": "{{selectLocationTier}}",
"BinNo": "{{selectLocationBin}}"
}
You’ll need the ParentObjKey from the response of this call.
Step 8: POST request to CreateReceipt.svc/CreateArrivalReceipt
Example Data Payload:
{
"ParentObjkey": "lParentObjKey from Step 7]"
}
If everything works correctly that should complete the receipt of the line.
Hope this helps.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.