Efficient Data Updates with PATCH Method in Webhook Blocks

PATCH Method in Webhook Block


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.


Learn more about webhooks: Introduction to Webhook Block in GC 

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:
  1. Change the status of a support ticket from “Open” to “In Progress.”
  2. Update only the phone number in a customer profile.
  3. Modify a user’s subscription type or notification setting.


When should you use it?   

Use the PATCH method when:
  1. You want to update just one or a few fields in an existing record.
  2. The rest of the record should remain unchanged.
  3. The external system (like Zoho Desk or a CRM) supports partial updates.
  4. 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.
Example Use Case
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?
  1. Only the “status” field is being updated.
  2. You don’t need to include the rest of the ticket’s data (like priority or assignee).
  3. 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:
  1. Type it manually: Enter the required JSON or form data directly in the editor.
  2. Upload a file: Use a file containing the necessary JSON structure if it’s too large or if you’re reusing a template.
  3. 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
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   


  1. Sends only what’s needed, nothing more.
  2. Reduces the chance of accidentally deleting or changing other fields.
  3. Great for real-time updates during live conversations.
  4. 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
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.

Learn about the PUT method
 

Understanding the differences between Webhook HTTP Methods 

GET
POST
PUT
PATCH
DELETE
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.
Learn about GETPOST, PUT, and DELETE
  

FAQs   

Is PATCH supported in Zoho Desk?
Yes, depending on the endpoint. Check Zoho Desk’s API docs for PATCH support on tickets or user records.
Can I test PATCH before using it live?
Absolutely. Use tools like Postman to validate your PATCH request and confirm expected behavior.
Can I include multiple fields in a PATCH request?
Yes. You can include any combination of fields that need updating, as long as the API supports them.

Tips   


  1. Always test with a real or sandbox API before connecting it to your bot.
  2. Use PATCH for minimal, targeted updates that don’t require resending the full object.
  3. Use response values to personalize bot replies or trigger follow-up actions.
  4. Keep your requests clean and focused; send only what you need to change.


Learn more about webhooks: Introduction to Webhook Block in GC