https://retellai.com/?utm_source=discord&utm_medium=seo logo
Custom function not appending dynamic variable
# ❓・bug-report
o
i have the appointment_id se up as an extracted variable as you advised. I can see the payload the data that we need is there. My url for the rescehdule appointment is 100% correct, however its not passing the appointment Id variable though... im saving it both in extracted variables as a custom function and as a response variable from check appointments. this needs to be at the path level so i cannot use it as a query param. Any suggestions on this?. Call ID: call_1796f2c8361d9e3a0d11c6b9ef8
@Omar Ashraf | Community Lead
o
Hello @OfficeMate-Ai , the appointment_id was extract using the custom function , not using the extract dynamic variables function , so it will be sent in the body not in the url , to send it in the URL you have to extract it before you call the function not extract it with the function if you want it in the URL not in the body
o
i dont know what you mean by this. Theres only 1 option to create extract dyanmic variable. I set this to extract the appointment _id. this also runs before teh reschedule these are two diff functions so obv not running at the same time this doesnt make any sense to me im sorry an you elaborate
should i delete this as a response variable from the list appointments function is this confusing it maybe?
@Omar Ashraf | Community Lead
o
which function have the response variables list_patient_appointments?
o
yes
o
Your setup looks fine.
On your server what query you get ?
o
method not implemented
meaning the appointment id is missing
before i had it wrong it was sending "appointment_id" i added the correct dynamic extraction and its just not appending
o
Is this your server ?
can you see the request ?
o
no this is doing to a middleware but when i test on their sandbox and leave the appointment id blank. its giving me the exact same error
o
Okay, I see you are sending this as path not a query second you are using the PATCH method , which I believe do not support that, I need to check with the team if you can variabales with PATCH method.
o
patch will not work with a guery param it has to be in the path
o
Yes, PATCH method can only send body for now, I need to check with the team if you can send a variables in the URL or not with this method
o
ok, ya typically Patch methods dont accept variables in the body it would have to be in the path and i tried to just send this as a query param and that failed also... im guessing if this isnt an allowed action ill have to cancel and just create a new appointment or route these back to the office. however if you can find a workaround or get me a definitive answer on this would be greatly appreciated
o
for a workaround you can do it on your server (backend / n8n/ make/ etc.. ) send the request to the server and the appointment id in the body normally , then extract it from the body and on your server make this request to the other platform.
o
thats a good point i have to do this already with the find appointment function as well okay that works thanks ill try thi