Hi all.
Has anyone had a go at using the new Tessitura Access Control Customizations?
I've had some luck with the example in the documentation here using LP_POST_RecordTicket but not sure how to handle procedures like LP_PRE_RecordOrder where the input and response are different.
Do you need to build the whole response JSON object in the procedure? I only need to change a single attribute.
Thanks,
Alex.
Hi Alex -
For v16 Access Control customizations in the PRE spot, yes, you do need to build the whole JSON response that the standard procedures rely on if you are modifying the response at all. There is a case if you are just doing something in background that does not need to change the access control response (see below).For PRE procedures:
The SQL procedure will be passed the request data for the endpoint, either as discrete parameters or as a JSON object.
The procedure can act on this data.
The SQL procedure can return the response object of the endpoint as a JSON object.
If anything is returned from the procedure:
It must be a properly formed JSON object for the service call response
That response will be taken and returned from the endpoint with no further processing by the service.
The POST SQL hook will also be skipped in this case.
If the SQL procedure does not need to include response or interrupt the service code, but only needs to perform some other function, a NULL object can be returned. In this case, the service code will run with the original request object.
If the SQL procedure raises an error, the message from that error will be displayed on the scanning device.
Hope that helps!
Heather
Thanks, Heather. Your reply really helped me get my head round it.