Zendesk Support의 자리 표시자에 대해 잘 알고 있다면 유동 마크업에 대해서도 잘 알고 계실 것입니다. 유동 마크업은 자리 표시자를 사용 설정하는 기본 서식 언어입니다. 자리 표시자는 자동화, 매크로, 대상, 트리거 및 위젯에서 동적 생성 티켓 및 사용자 데이터를 수록하는 용도로 쓰입니다. 그런데 유동 마크업으로 데이터를 선택하고 출력으로 표시하는 방법을 사용자 지정하는 것에 대해서는 잘 모르실 수도 있습니다. 그 이유는 유동 기능으로 Case 문, If 문, for 루프 등 간단한 프로그래밍 논리를 만들 수 있기 때문입니다.
매크로의 댓글/설명 작업과 자동화 및 트리거의 이메일 사용자 작업에 간단한 제어문을 직접 작성하면 여러 자동화, 매크로 및 트리거로 하던 작업을 자동화, 매크로 또는 트리거 하나로 해결할 수 있습니다. 또한 댓글 텍스트 표시 형태도 사용자 지정할 수 있습니다.
디자이너를 위한 유동 기능에서 유동에 관한 문서를 찾아볼 수 있습니다. 언어의 모든 요소가 자세히 설명되어 있지만 어떻게 작동하는지 여기서 간단히 소개해 드리겠습니다.
유동 기능은 이메일 및 HTML 렌더링에 필요한 기본 서식 언어입니다. 유동 기능은 자리 표시자를 사용하여 댓글 및 이메일 알림에 데이터를 자동 배치하는 메커니즘입니다.
- 이중 중괄호 안에 있는 텍스트인 출력
- 데이터가 어떻게 자리 표시자로 표현되는지를 결정하는 프로그래밍 논리가 들어 있는 태그
출력과 자리 표시자를 단순히 일치시켰다면 유동의 개념과 사용 방법을 어느 정도 이해한 것입니다. 그런데 유동 출력이 티켓 및 사용자 데이터를 표현하는 것 외에도 텍스트 문자열과 배열을 수정하는 방법을 제공한다는 점은 잘 모르실 수도 있습니다. 유동에서는 이같은 방법을 가리켜 필터라고 합니다. 필터를 사용하면 예를 들어 텍스트를 대문자로 변환할 수 있습니다. 이처럼 가장 단순한 예 외에도 필터를 사용할 수 있는 경우는 아주 많습니다. 자세한 내용은 유동에 관한 문서를 참조하세요.
유동 기능의 용도를 완전히 이해하려면 태그의 정의와 사용 방법을 알아야 합니다. 태그는 데이터를 선택하고 표시하는 데 사용하는 프로그래밍 논리를 제공합니다.
유동 태그를 사용하여 다음을 만들 수 있습니다.
- If else 문
- Case 문
- For 루프
- 사이클
- 변수 배정
유동 마크업을 사용하는 방법에 대한 보다 많은 예는 아래 문서에서 참조하세요.
댓글 65개
Hannah Lucid
Hi! Thank you so much!! I'm still having a bit of trouble so I'm going to share the full code I've been using. The code below doesn't populate anything but a “-”. I'm sure it has something to do with the {% when nil %} line, but when I try changing the statement to {% if ticket.ticket_field_option_title_XXXX = blank/nil/null/empty %} it doesn't do anything.
Any feedback/suggestions are appreciated.
0
Daniël Nieuwendijk
Can you try it with lowercase “null”:
0
Jacob the Moderator
5174506379034
Possibly…
{% if field_name != blank %}
0
Walter
Hi 5174506379034 ,
Try “nil” or “empty” instead of “NULL”
0
Hannah Lucid
Hey There,
It's me again! I was wondering if anyone knows how to use liquid markup when a text field is blank. I've tried using statements like != ‘-’ or != NULL , etc. but I'm struggling to figure it out. Is this possible? If so, how would I achieve this?
Basically, we are using webhooks to update subject lines when a specific topic is selected. I wanted to keep the double dash (TOPIC NAME - -) when the text field is blank so it will look cleaner, like (TOPIC NAME).
Thank you so much!
0
Viktor Hristovski
Is it possible to use liquid markup in zendesk on the new object type (custom objects) Thank you
0
Dylan Tragjasi
Thanks 1263169425010 - I had a feeling this was going to be the solution but for some reason preferred to bash my head against a wall for a while. This works great, thank you for the help!
1
Jacob the Moderator
Hi 4821761052186
Aside from using the end user form name, it looks like you're missing part of the form name placeholder.
Try and see if the below works for you.
{% if ticket.ticket_form == "Form 1" %}
Hello
{% elsif ticket.ticket_form == "Form 2" %}
World
{% endif %}
1
Dylan Tragjasi
Does anyone know if the ticket form object is accessible when using liquid markup? I'm trying to create a macro with different content depending on the current form selected on the ticket. I've tried many variations of the following but can't seem to get it to work:
Using the ticket.ticket_form placeholder doesn't seem to work either. Any advice? Thank you!
0
Andy F.
4453309851418 ah of course! I was overthinking this, believing I had to add the exclusion to the JSON when of course I can just add it to the main trigger. Thank you!
0
로그인하세요.