Do you need to update just one or two pieces of information in another system, such as changing a ticket’s priority or updating a user’s phone number, without touching anything else?
Use the PATCH method in your Webhook block to make precise, partial updates to existing records in systems like Zoho Desk, CRMs, or any external platform. All this can happen smoothly as part of your bot conversation.
What is PATCH Method?
The PATCH method is used in APIs to partially update an existing record. Think of it like editing a form; you only change the fields you need, while everything else stays the same.
Here’s what you can do with PATCH:
- Change the status of a support ticket from “Open” to “In Progress.”
- Update only the phone number in a customer profile.
- Modify a user’s subscription type or notification setting.
When should you use it?
Use the PATCH method when:
- You want to update just one or a few fields in an existing record.
- The rest of the record should remain unchanged.
- The external system (like Zoho Desk or a CRM) supports partial updates.
- You’re collecting small updates during a conversation with the user, like new contact details or a change in ticket status.
PATCH is ideal for situations where only a small change is needed, without the risk of wiping out other important data by accident.
Let’s say a user wants to update just the status of their existing ticket. Here’s how you can use PATCH in your Webhook block:
PATCH URL:
Request Body:
{
"status": "In Progress"
}
What’s happening here?
- Only the “status” field is being updated.
- You don’t need to include the rest of the ticket’s data (like priority or assignee).
- The server will update just the status and leave everything else as it is.
Response from API
{
"ticket_id": "TX12345",
"status": "In Progress"
}
You can use this response in your bot to confirm the update:
“Your ticket TX12345 is now marked as In Progress. Our team is working on it.”
Body
The PATCH method requires a request body in JSON format that contains only the fields you want to change.
There are three ways to provide the request body in your Webhook block:
- Type it manually: Enter the required JSON or form data directly in the editor.
- Upload a file: Use a file containing the necessary JSON structure if it’s too large or if you’re reusing a template.
- Use dynamic variables: Personalise your request by inserting dynamic values. In GC, you can insert variables using the @ symbol followed by the variable name (e.g., @ticket_id, @user_phone). These variables will be replaced with actual values from the user’s input during the flow.
Form Data
Some APIs (especially older ones or specific services) require Form Data instead of JSON. In such cases, you’ll enter key-value pairs like:
name = {{user.name}}
email = {{user.email}}
message = {{user.query}}
Always check the API documentation to see whether JSON or Form Data is required and what fields are mandatory.
Benefits of using the PATCH Method
- Sends only what’s needed, nothing more.
- Reduces the chance of accidentally deleting or changing other fields.
- Great for real-time updates during live conversations.
- You can update one field or several, whatever is needed.
Difference between PATCH and PUT Methods
Both PATCH and PUT are HTTP methods used to update existing data through APIs, but they work differently.
PUT Vs PATCH Methods
Both PUT and PATCH are HTTP methods used to update existing data through APIs, but they work differently:
Feature
| PUT Method
| PATCH Method
|
Type of Update
| Full update (replaces the entire record)
| Partial update (modifies only specified fields)
|
Required Data
| Usually requires the full object
| Requires only the fields you want to update
|
Use Case
| When you want to replace or refresh the record
| When you want to tweak only specific values
|
API Behavior
| Overwrites everything unless handled carefully
| Preserves unmentioned fields
|
So, use PUT when you want to send a full update and PATCH when you’re changing only a small part of the record.
So, use PATCH when you’re changing only a small part of the record and PUT when you want to send a full update.
Understanding the differences between Webhook HTTP Methods
GET
Primary Purpose
| Typical Use Cases
| Request Body
| Example Scenario
|
Retrieve data from a server
| - Fetch user details
- Get ticket history
- Retrieve knowledge base articles
| No
| Display a user’s subscription status based on their email.
|
POST
Primary Purpose
| Typical Use Cases
| Request Body
| Example Scenario
|
Submit data to create a new resource
| - Create a support ticket
- Submit a form
- Log user feedback
| Yes (e.g., JSON)
| Create a new ticket in Zoho Desk with user information. |
PUT
Primary Purpose
| Typical Use Cases
| Request Body
| Example Scenario
|
Update or replace an existing resource
| - Update ticket status
- Modify user contact details
- Change subscription plan
| Yes (full resource)
| Change the priority of a support ticket to “Urgent”
|
PATCH
Primary Purpose
| Typical Use Cases
| Request Body
| Example Scenario
|
Apply partial modifications to a resource
| - Update ticket priority
- Change the user’s phone number
- Modify specific fields
| Yes (particular data)
| Update only the status field of a ticket to “In Progress”.
|
DELETE
Primary Purpose
| Typical Use Cases
| Request Body
| Example Scenario
|
Remove a resource from the server
| - Delete a support ticket
- Unsubscribe a user
- Remove a customer record
| Optional
| Delete a user’s support ticket upon request. |
FAQs
Yes, depending on the endpoint. Check Zoho Desk’s API docs for PATCH support on tickets or user records.
Absolutely. Use tools like Postman to validate your PATCH request and confirm expected behavior.
Yes. You can include any combination of fields that need updating, as long as the API supports them.
Tips
- Always test with a real or sandbox API before connecting it to your bot.
- Use PATCH for minimal, targeted updates that don’t require resending the full object.
- Use response values to personalize bot replies or trigger follow-up actions.
- Keep your requests clean and focused; send only what you need to change.