Goal:
We need to gather the next work item from the My Work table and make it available to the agent, or let the agent know there is no work left to complete.
Inputs Required:
Change the description for UserAPIKey, pasting in the description below:
This is the API Key to access the APIs for our work queue.
Outputs Required:
Complaint_ID
This is the unique ID number for the complaint.
Associated_Customer
This is the customer number associated with the complaint.
Complaint_Text
This is the text body of the complaint.
Date_of_Complaint
This is the date the complaint was filed.
Tool Selected:
Now, we need to map the variables we have just made, to our JSON Get Node actions so this data can be captured and passed within our agent.
Relevant Endpoint:
https://wmkjvdlsxeohfnsyftag.supabase.co/functions/v1/next-work-item
Example Response Body:
{
{
"item": {
"Complaint ID": "0000458",
"Associated Customer": "CUST123",
"Complaint Text": "Product arrived damaged during shipping",
"Date of Complaint": "2024-10-15",
"Associated Product ID": "PROD001",
"Customer Disposition": null,
"Customer Assessment": null
}
}
}
Work Remaining:
Good news — the 'GetNextWorkItem' API Task is already built and most of the way there. All that's left is to add the input and output variables, give each one a description, and update the JSON mapping.
The whole point of this one is to show you just how much it matters to identify and describe your input and output variables clearly. That's how an agent gets the right context to start working with confidence.