Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Adding a comment as part of the actions of a Trigger #604

Closed
wolfassi123 opened this issue Nov 7, 2023 · 3 comments
Closed

Question: Adding a comment as part of the actions of a Trigger #604

wolfassi123 opened this issue Nov 7, 2023 · 3 comments

Comments

@wolfassi123
Copy link

I manage to use Triggers to update fields found in tickets. But what I want is to create a Ticket that send a comment to the user.
Ideally, you can translate it to this code line below (Although it does not work, but it is ideally what I want it to do)
trigger_audit = zenpy_client.triggers.create(Trigger(actions=[{"field": "comment_value", "value": "Thanks for your request. This issue you reported is a known issue. For more information, please visit our forums. "}], conditions=condition, active=False, title=f'A Trigger' ))

How can I achieve this?

@cryptomail
Copy link
Collaborator

Triggers documentation is here.
In theory you should be able to create a trigger as you alluded to.
Please look at the Trigger model to see what fields you will likely need to meet minimum requirements for saving/modifying.

@cryptomail
Copy link
Collaborator

cryptomail commented Nov 8, 2023

Here is the trigger object. And conditions object.

@wolfassi123
Copy link
Author

Yes I managed to use triggers and conditions but I was unable to use the triggers to send a comment to the user. According to this link: https://developer.zendesk.com/documentation/ticketing/reference-guides/actions-reference/ , to use a trigger for adding a comment was part of the "Additional actions for macros" as mentioned in the "comment_value" field, but so far I have been unsuccessful in doing so. Was wondering if it's possible to provide and example on how to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants