Using placeholders

Have more questions? Submit a request

29 Comments

  • James Q
    Comment actions Permalink

    I'm wondering if this is possible...
    I want to add multiple custom fields in an organisation (let's call this one organisation a)

    Now let's say organisation b raises a ticket to us, in a drop box on the ticket for regarding I have an option for organisation a

    Now when that's selected I click save as pending, I then hit macro a,
    Macro a would add a public comment with some of the custom fields in organisation a as it knows this ticket had the regarding drop box selected as organisation a

    AM I making sense? The macro would need to look up the details for the organisation that's been selected in regarding drop box on the ticket, I can't have the details hard set in the macro otherwise I could end up with hundreds of macros

    0
  • sami
    Comment actions Permalink

    Hi,
    Could we use a ticket field placeholder in another ticket field in the same page to prefill the description for example?

    2
  • Guy Kastner
    Comment actions Permalink

    Using custom place holder for a ticket field with staff's name. The tag keeps appearing in lower case. Need it to show as a capital letter for the for the first character.

    Surely this can be achieved. How can I do this?

    0
  • Andrew J
    Comment actions Permalink

    Can we embed placeholders inside placeholders - or is that too insane?

    Looking to make a placeholder that selects the right dynamic content based on a the value of a custom field...

    Example:

    {{dc.{{ticket.ticket_field_30318887}}_contractor_emails}}

     

    0
  • Colin Piper
    Comment actions Permalink

    Andrew, not sure that would work but could you look at this problem in a different way? Could the ONE dynamic content return a different value based upon the content of that custom field? For example I have a DC item that returns a different string of text based upon the support level of a customer. I am just using liquid in the DC to perform an IS...ELSE or a CASE

    0
  • Andrew J
    Comment actions Permalink

    Hello Colin, that sounds workable... could you point me to an example?

    custom field is a region - (21 of them)

    • North
    • South
    • West etc...

    DC content to return is one or more email addresses - so could be;

    These are used in a HTTP or URL target to add as a CC

     

    2
  • Colin Piper
    Comment actions Permalink

    There is some good info on liquid here: https://github.com/Shopify/liquid/wiki/Liquid-for-Designers

    Using the case statement

    {% case condition %}
    {% when 1 %}
    hit 1
    {% when 2 or 3 %}
    hit 2 or 3
    {% else %}
    ... else ...
    {% endcase %}

    The condition can be a custom field such as ticket.ticket_field_option_title_21917251 and the value is the text value of the dropdown field.
    {% case ticket.ticket_field_option_title_21917251 %}
    {% when "North" %}
    north@mail.com
    {% when "South" %}
    south-a@mail.com, south-b@mail.com
    {% else %}
    {% endcase %}

    I don't have an example of adding a cc via the http target to hand but I posted a few examples yesterday of using the target and the format of the JSON string
    1
  • Andrew J
    Comment actions Permalink

    Great thanks Colin.

    I didnt expect you to get back so soon and actually waded my way through examples and made something almost identical.

    Working better now as seen here - https://support.zendesk.com/hc/en-us/community/posts/207593618-Trigger-firing-2-URL-targets-not-working-consistently?page=1#community_comment_210304018

    Will add the URL target info too - for anyone wishing to replicate this.

    1
  • Colin Piper
    Comment actions Permalink

    Impressive work Andrew. Will have to find a reason to "borrow" this for my helpdesk... just because.

    1
  • Bammesberger Thomas
    Comment actions Permalink

    We would like to used values from a mult line text field on organisation level in our ticket forms (user view).  

     

    We have something like this:

    mutli line text field : organisation.products="product1,product2,product3"

    the ticket field (drop down) contains all products available like

    ticket.productinquestion="product1,product2,product3,product4,product5,product6"

     

    We would now like to access the value of the product field on org-level to reduce the number of options available in the drop down list (user view) using some AJAX function.

    But as the user isn't alowed to query the rest API for his organisations custom fields we end up with an auth error.

     

    Does anybody have an idea on how to solve this  ( for example using a kind of proxy script using an agent user) ?

     

    Thanks

    Thomas

    0
  • Bammesberger Thomas
    Comment actions Permalink

    Is there really nobody around who might give me an idea how to solve this problem?

    -1
  • Conchita
    Comment actions Permalink

    "Every custom field has a unique ID or key. When you create a custom ticket field, the ID is automatically generate for you" should be "Every custom field has a unique ID or key. When you create a custom ticket field, the ID is automatically generated for you"

    0
  • Deirdre Beach
    Comment actions Permalink

     

    Is there any other way to access the custom field ID, other than going into setting?

    I have Admins who are able to create their own Macros, but do not have the ability to edit form fields. If they want to add a placeholder for a custom form ID they have to contact someone who has access to create and edit Form Fields, which is pretty annoying.

     

     

    0
  • Anil Kumar (Community Member)
    Comment actions Permalink

    Hello Guys,

    I'm using Dynamic Content placeholder in Form's title, it is working fine in Help Center and we are able to see translations as per selected language BUT don't know why placeholders are not showing translations in Agent Panel (Zendesk Support). 

    Here is the screenshot of that Dynamic content

    Unable to see the translated form title in Trigger's conditions and many other places.

     

    Is there something I need to follow?

     

     

    1
  • Dan Ross
    Comment actions Permalink

    Is there a way to URL encode placeholders?

    We want to send data to an external service, but things like {{ticket.title}} cause the request to fail because they're not encoded in the expected manner.

     

    1
  • Andy Slusher
    Comment actions Permalink

    I am looking for a way to auto-populate information in a Ticket form from an Organization field.  For instance, I would like to create an Organization record once, enter a product serial number in a custom field and have that serial number automatically be populated in a ticket when created against its respective Organization.  Any suggestions?  Thanks in advance.

    0
  • Travis Rider
    Comment actions Permalink

    Hello Andy,

    Natively in Zendesk there is not a way to populate a value from a text or numeric organization field to a ticket field. That said, if the goal is to simply see the value from the organization field without having to switch to the organization tab the user data app may help with that. It can be configured to show organization fields. 

    Thanks!

    1
  • Brian Larson
    Comment actions Permalink

    Hi there -

    I am trying to use placeholders for custom fields in several macros, however the tag value is appearing instead of the value itself. For example:

    I have a macro set up as:

    Then macro produces the below, which is the field tag, not the field value. The field value is "Mastering."

    I believe this is the same issue that Guy K. was running into above, but it doesn't look like anyone replied to him.

    Thanks,
    Brian

    0
  • Heather Rommel
    Comment actions Permalink

    Hi @Brian, I use option_title_ to get it to render.

    Try this (remove the spaces):

    {{ ticket.ticket_field_option_title_360012720014 }}

    1
  • Sean O'Hara
    Comment actions Permalink

    Has anyone discovered a solution for URL encoding?

    0
  • Brett - Community Manager
    Comment actions Permalink

    Hi Sean,

    What sort of workflow are you attempting to set up that would require URL encoding within placeholders? Any additional information you can provide is greatly appreciated.

    Thanks!

    0
  • Dan Ross
    Comment actions Permalink

    Hey Brett,

    We had a use case where we wanted to include data in a URL that we'd include in a customer email for an external service. We could pass along Zendesk data with placeholders in query parameters for that URL, but we were unable to URL encode the output of the placeholder and had to abandon the project.

     

    ex: we tried to include the {{requester.name}} in the placeholder, but 'Dan Ross' broke the URL. We needed the output to be 'Dan%20Ross'. Perhaps a solution could be if zendesk allowed placeholders to be prefixed with a flag to indicate it should be encoded on output? Something like {{enc.requester.name}} ?

    0
  • Brett - Community Manager
    Comment actions Permalink

    Hi Dan,

    I reached out internally and it doesn't look like there's an out of the box solution we offer. However, it MAY be possible to modify the output using Liquid Markup. I was able to track down a Formatting placeholder with Liquid Markup that may be useful here but is an unsupported workflow.

    0
  • Leonardo
    Comment actions Permalink

    Can I ask a user to filled out custom field trough email rather than the zendesk form by using automations?

    0
  • Brett - Community Manager
    Comment actions Permalink

    Hi Leonardo,

    There wouldn't be a way to accomplish this natively unfortunately. You'd need to use custom code within your Support trigger to display a form to the requester of the ticket.

    It may be worth taking a look at the following article as well: Building a custom ticket form with the Zendesk API

    Cheers!

    0
  • Ola Thoresen
    Comment actions Permalink

    It seems like ther might be an issue with multiline fields.

    I have added a multiline organizations-field, but if I try to use it in a macro, all newlines are stripped.

    I have also tested doing things like {{ ticket.organization.custom_fields.foo | newline_to_br }} and | split: "\n" or | split: "\r", but I always get the field as one long string.

    When testing the API, I can see that the field has a "\n" in it:

    xxx.zendesk.com/api/v2/organizations/12345678.json 
    -> "organization_fields":{"foo":"Line 1\nLine 2" }

    But that newline is seemingly stripped when used in a macro.

    0
  • Dylan Tragjasi
    Comment actions Permalink

    Hi Ola,

    I'm going to take this into a ticket so we can investigate this matter further for you. I'll be in contact via email very shortly!

    0
  • Denielle Barcelona
    Comment actions Permalink

    So the placeholders for custom ticket drop down fields would only display the the selected option? What if we use this in a trigger as an auto responder to get more info from the customer? For example, if they write in to us via a support email (and not a ticket form), we don't get info for certain fields. We'd like them to fill out those fields so the ticket can be updated with those fields and then get routed to the correct queues based on our triggers. Is this not possible?

     

    0
  • Andrew J
    Comment actions Permalink

    Hello Denielle, as you state, placeholders only display the selected option. They are for placing content into a comment, trigger etc.
    You could possibly use this to request more information, but the client would have to respond as a message.
    The ticket form is only seen once by the user, and only if they use the website or a custom web form.
    If the options are not many, you may be able to create some automation based on the reply content, but generally you'd need an agent to change the field values.

    0

Please sign in to leave a comment.

Powered by Zendesk