Trigger to check if field is empty and Copy content from one field to another field | Community
Skip to main content

Trigger to check if field is empty and Copy content from one field to another field

  • August 14, 2019
  • 5 replies
  • 0 views

Hi Team,

 

I have one field(dropdown) in the ticket form and need help to check the trigger if it's empty or not, if empty it needs to fill with data from another field (dropdown) content. Is it possible? 

usually, these 2 fields data are the same except the first one is filled by end-user and the second one is an agent.. sometimes users and agents select it differently and causes inconsistency. I need to replace second field data with first field data manually. any automation possible in zendesk for this?

I tried creating trigger/automation for the above. but I don't see the option to copy the content.

Thanks

This topic has been closed for replies.

5 replies

  • August 14, 2019

Hi Adarsh,

I'd say that this could be done with triggers and targets, but if the content of the fields is the same why do you have two fields?

#helpsome regards,
Louise Dissing
Team Lead @ helphouse.io


  • Author
  • August 14, 2019

Hi Louise,

Thanks for responding. I tried using trigger but since its dropdown field. when I select the field in "Perform these actions:" it will populate the value instead of giving the option to fill data from the other field. Could you please share the details/links about the trigger and targets.

Some cases end-user report it as an issue in the one component and after an investigation from agent, it will change to actual component. we kept it separately to have those track from user and agent perspective. Agents most of the time forget to update this field and we see a lot of inconsistency. I would like to update this field if it's not filled by an agent with the field from the used filled field using a trigger.

Thanks

 

 


  • August 15, 2019

Hi Adarsh,

I'll try my very best :-)

If I understand you correctly, then you have a custom field (a dropdown) that is end-user facing and one that is agent facing. 

Again - I'd say you should just make this field visible for both agent AND end-users but if you cannot do this I'd do something like this:

Create an HTTP Target: https://your_subdomain.zendesk.com/api/v2/tickets/{{ticket.id}}.json

Create a trigger that has the conditions that are relevant.
In actions, you choose the above target and a text field will be visible with the possibility to write JSON.

Now you need to write the appropriate JSON to push the data from one field into the other field.

 

If you need any further assistance setting this up, feel free to reach out to us on support@helphouse.io :-)


  • June 2, 2020

Hi Louise Dissing,

I already have the extension HTTP target setup but custom field is not getting populated with the desired value. 

I have tried with the following in JSON body :

1) {"ticket": {"ticket_field_360042501834": "ABCD"}}

2){"ticket": {"customField:custom_field_360042588434": "Chat"}}

 

Both did not worked for me. Please advice..

I want to update the custom field with desired value.


Nicole17
  • June 12, 2020

Hi @Azhar - 

One of our support agents answered your question here: https://support.zendesk.com/hc/en-us/community/posts/360036935534/comments/360011569474