Recent searches


No recent searches

Updating Domain on Org Change



Posted Sep 20, 2024

Hello Team, 

 

I am looking to solve an issue of having multiple domains for my customers, yet only a single domain in our SFDC instance.  Every time it is updated it overwrites any additional domains we've added.

 

I was thinking of creating a new org field to host those extra domains names, and then a trigger that when an org is updated we hit the ZD webhook to update the org domain_names field to include the SFDC one and the domains in additional domains.

 

However I am trying to test my webhook against /api/v2/organizations{{organization_id}}, with the following and get a 422 unprocessable error,  this works with plain text.

{
   "organization": {
       "domain_names": "{{organization.custom_fields.xxxxxxxxx}}"
   }
}

I assume this is because there is something wrong with my placeholder, can we call directly from the organization if don't have a preceeding user or ticket? 

 


0

1

1 comment

image avatar

Elaine

Zendesk Customer Care

Hi Shane,
 
It sounds like you're working on a complex setup to manage multiple domains for your customers, and I appreciate the details you've provided.
 
Regarding the 422 unprocessable entity error, it’s likely related to how the placeholder for is being handled. Here are a few suggestions that might help:
 
  1. Check Your Placeholder Syntax: Ensure that the placeholder is correctly formatted and that the field exists in the organization’s custom fields. It might be helpful to log the output to see what value is being sent.
     
  2. API Endpoint Structure: Verify that the API endpoint structure is correct. It should properly include the organization ID you are targeting. The endpoint should look something like /api/v2/organizations/{organization_id}.
     
  3. Testing with Dummy Data: If possible, test the webhook with dummy data specific to your organization to see if the issue persists. This can help to isolate whether the problem lies with the data or with the API call itself.
     
  4. Call from Organization Directly: Regarding your question on making direct calls from the organization—yes, you can do that even if there isn’t a preceding user or ticket, provided you have the correct authentication in place.
     
If the error continues after these checks, feel free to share more details, and we can troubleshoot further!

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post