Objects
Objects
The page lists the objects you can use in Help Center templates. Click the page links in the left sidebar for the availability of the objects in different templates. To learn how to access object properties in your templates, see Properties in the introduction.
activity object
The activity
object has the following properties.
Name | Type | Description |
---|---|---|
label | string | The translated label showing the type and the time of the contribution made by the user |
type | string | The type can be created-article , created-post or created-comment |
contribution | object | A contribution object related to the activity |
answer bot object
Answer Bot refers to AI Agent autoreplies with articles in Zendesk.
The answer bot
object has the following properties.
Name | Type | Description |
---|---|---|
auth_token | string | Answer Bot auth_token . It should be appended to the suggested article URLs as explained in the Article Feedback APIs documentation |
interaction_access_token | string | Answer Bot interaction_access_token to be used to interact with the Article Feedback APIs |
articles | array | An array of answer bot article objects containing the suggested articles |
request_id | string | The id of the submitted request |
answer bot article object
This object represents an article suggested by the Answer Bot. It includes the following properties:
Name | Type | Description |
---|---|---|
article_id | integer | The id of the article |
html_url | string | The URL of the article |
title | string | The title of the article |
snippet | string | A snippet from the article |
article object
The article
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the article |
url | string | The URL of the article in Help Center |
title | string | The title of the article |
body | text | The body of the article. Starting with Templating API v4, this property is not available outside the Article page |
locale | string | The locale that the article is displayed in |
promoted | boolean | If the article is promoted or not. False by default |
internal | boolean | If the article has a "staff" user segment. See User Segments |
updated_at | string | The time the article was last updated |
created_at | string | The time the article was created |
edited_at | string | The time the article was last edited in its displayed locale |
vote_sum | integer | The sum of upvotes (+1) and downvotes (-1), which may be positive or negative |
vote_count | integer | The total number of upvotes and downvotes |
upvote_count | integer | The number of up votes on this article |
comment_count | integer | The number of comments on this article |
comments_disabled | boolean | If comments are disabled or not |
author | object | A user object describing the author of the article |
vote | helper | Voting elements. See vote helper. Starting with Templating API v4, this property is not available outside the Article page |
path_steps | array | An array of path_step objects describing the path to the article |
labels | array | An array of article label objects |
snippet | string | An excerpt of the article body. Available only outside the Article page from Templating API v4 |
article comment object
The article comment
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the comment |
body | string | The body of the comment |
anchor | string | The anchor id of the comment |
url | string | The URL of the comment |
created_at | string | The time the comment was created |
edited_at | string | The last time the comment was edited |
pending | boolean | If the comment is pending approval or not |
vote_sum | integer | The total sum of votes on this comment |
vote_count | integer | The number of votes cast on this comment |
author | object | A user object describing the author of the comment |
editor | object | A user object describing the editor of the comment if the comment was edited |
ticket | object | A ticket object related to the comment, if available |
actions | helper | Links to the actions available (depending of the account and the user) for the comment |
vote | helper | Voting elements. See vote helper |
article label object
The article label
object has the following properties.
Name | Type | Description |
---|---|---|
identifier | string | The name of the label |
attachment object
The attachment
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the attachment |
url | string | The URL of the attachment |
name | string | The name of the attachment |
size | string | The size of the attachment |
badge object
The badge
object has the following properties.
Name | Type | Description |
---|---|---|
id | string | The id of the badge |
name | string | The badge's name |
description | string | The badge's description |
category_slug | string | The slug of the badge’s category |
icon_url | string | The URL of the badge’s icon. Empty if the badge does not have an icon |
assigned_at | string | The time the badge was awarded to the user |
brand object
The brand
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the brand |
name | string | The name of the brand |
category object
The category
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the category |
name | string | The name of the category |
description | string | The description of the category |
url | string | The URL of the category in Help Center |
more_sections | boolean | If there are more sections than the ones in the sections array |
sections | array | An array of up to 5 category section objects. See more_sections above. The limit increases to 30 section objects when a single category is displayed on the Home page. Before Templating API v4, the array contains up to 30 section objects when the category is displayed on the Home page, and up to 100 section objects when the category is displayed on the Category page |
contribution object
The contribution
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the contribution |
title | string | The title of the contribution |
url | string | The URL of the contribution |
object_type | string | The type of the contribution |
type | string | The translated type of the contribution |
vote_sum | integer | The total sum of votes on the contribution |
last_activity_at | string | The time of the last activity on the contribution |
created_at | string | The time the contribution was created |
edited_at | string | The time the contribution was edited |
status | string | The status of the contribution |
status_name | string | The translated status of the contribution |
status_dasherized | string | The contribution status with dashes instead of underscores |
body | string | The body of the contribution |
pending | boolean | Whether the contribution is pending for approval |
official | boolean | Whether the contribution is marked as official |
path_steps | array | An array of path_step objects |
stats | array | An array of stat object |
author | object | The user object describing the author of the contribution |
editor | object | The user object describing the editor of the contribution |
filter object
The filter object has the following properties.
Name | Type | Description |
---|---|---|
identifier | string | The filter's identifier |
name | string | The filter's name |
url | string | The URL of the filter |
selected | boolean | If the filter is on or off by default |
label | string | The label for the filter when it's selected |
count | integer | The number of records matching this filter |
end user condition object
The end user condition
object has the following properties.
Name | Type | Description |
---|---|---|
parent_field_id | string | The id of the parent field |
parent_field_type | string | The type of the parent field |
value | string | The value of the condition |
child_fields | array | An array of end user condition child field objects |
end user condition child field object
The end user condition child field
object has the following properties.
Name | Type | Description |
---|---|---|
id | string | The id of the child field |
is_required | boolean | A boolean indicating whether the child field becomes required when the condition is met |
group object
The group
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the group |
name | string | The name of the group |
help_center object
The help_center
object has the following properties.
Name | Type | Description |
---|---|---|
name | string | The name of the current Help Center |
url | string | The URL of the current Help Center |
locale | string | The locale in which the Help Center is being viewed |
community_enabled | boolean | If community is enabled in the current Help Center |
request_management_enabled | boolean | If end users can manage their requests in the current Help Center |
request_ccs_enabled | boolean | If end users can add CCs to the requests in the current Help Center. See "Enable CCs for end users on Help Center" in the table in Setting permissions for CCs and followers in the Support Help Center |
base_locale | string | If the current locale is a variant of an another language, returns the base locale. Otherwise, the value is the same as the locale property |
at_mentions_enabled | boolean | If the @mentions feature is enabled in the current help center |
locale object
The locale
object has the following properties.
Name | Type | Description |
---|---|---|
name | string | The name of the locale |
url | string | The URL of the locale |
direction | string | The direction in which the language is read. Example: English is "ltr" (left to right) while Arabic is "rtl" (right to left) |
new request form object
The new request form
object has the following properties.
Name | Type | Description |
---|---|---|
accept_charset | string | The value of the accept-charset attribute of the form element |
action | string | The value of the action attribute of the form element |
http_method | string | The value of the method attribute of the form element |
errors | string | A string containing global errors for the form. It is null if there are no global errors |
ticket_form_field | object | A ticket field object. It contains the enabled ticket forms in the options array |
parent_id_field | object | A ticket hidden field object containing the parent request id if the request is a follow-up request |
email_field | object | A ticket field object used for requesting the user's email address if the user is anonymous |
cc_field | object | A ticket field object if CC on request form is enabled |
organization_field | object | A ticket field object if the user belongs to multiple organizations |
due_date_field | object | A ticket field object to be shown if the request is of type "task" |
ticket_fields | array | An array of ticket field objects containing all the standard and custom fields of the selected ticket form |
end_user_conditions | array | An array of end user condition objects if the selected ticket form has end user conditions |
attachments_field | object | A ticket attachment field object. It contains the previous attachments if the form has been submitted with errors |
inline_attachments_fields | array | An array of ticket hidden field objects. It contains the attachments added in the WYSIWYG editor if the form has been submitted with errors |
description_mimetype_field | object | A ticket hidden field object. Its value must be set to text/html if the description field is using the WYSIWYG editor, or text/plain otherwise |
organization object
The organization
object has the following properties.
Name | Type | Description |
---|---|---|
id | string | The id of the organization |
name | string | The name of the organization |
path_step object
The path_step
object has the following properties.
Name | Type | Description |
---|---|---|
name | string | The name of the path step |
url | string | The URL of the path step |
target | string | The target in which the URL should be opened. Example: _self or _blank |
post object
You can use the following properties in any post
object.
Name | Type | Description |
---|---|---|
id | integer | The id the post |
title | string | The title of the post |
url | string | The URL of the post in Help Center |
details | string | The body of the post |
created_at | string | The time the post was created |
updated_at | string | The time the post was last updated |
edited_at | string | The time the post was last edited |
comment_count | integer | The number of comments on the post |
follower_count | integer | The number of users following the post |
vote_sum | integer | The total sum of votes on the post |
vote_count | integer | The number of votes cast on the post |
pending | boolean | If the post is pending approval or not |
pinned | boolean | If the post is pinned |
featured | boolean | If the post is featured |
closed | boolean | Whether further comments are allowed |
actions | helper | Partial rendering the actions possible on the post |
status | string | The post status |
status_dasherized | string | The post status with dashes instead of underscores |
status_name | string | The post status translated |
ticket | object | A ticket object related to the post |
author | object | A user object describing the author of the post |
editor | object | A user object describing the editor of the post if the post was edited |
vote | helper | Voting elements. See vote helper |
path_steps | array | An array of path_step objects describing the path to the post |
post comment object
You can use the following properties in any post comment
object.
Name | Type | Description |
---|---|---|
id | integer | The id the comment |
anchor | string | The anchor id of the comment |
url | string | The URL of the comment |
vote_sum | integer | The total sum of votes on the comment |
vote_count | integer | The number of votes cast on the comment |
created_at | string | The time the comment was created |
updated_at | string | The time the comment was last updated |
edited_at | string | The time the comment was last edited |
official | boolean | If the comment is official or not |
pending | boolean | If the comment is pending approval or not |
body | string | The body of the comment |
actions | helper | Partial rendering the actions possible on the post |
author | object | A user object describing the author of the comment |
editor | object | A user object describing the editor of the comment if the comment was edited |
ticket | object | A ticket object related to the comment, if available |
vote | helper | Voting elements. See vote helper |
internal | boolean | If the post is internal or not |
rating object
The rating
object has the following properties.
Name | Type | Description |
---|---|---|
max_value | integer | The numeric representation of the rating scale's upper bound. For example, if the rating scale is a 1-5 scale, max_value will be 5 |
scale_type | string | The type of the scale the rating was selected on. Possible values: numeric , emoji , custom_text . New types of scales may be added in the future |
scale_value | string | The string representation of the selected rating from the scale |
value | integer | The numeric representation of the selected rating from the scale |
related_article object
The related_article
object has the following properties.
Name | Type | Description |
---|---|---|
url | string | The URL of the article in Help Center |
title | string | The title of the article |
request object
The request
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the request |
url | string | The URL of the request in Help Center |
subject | string | The subject of the request |
description | string | The description of the request |
updated_at | string | The time the request was last updated |
created_at | string | The time the request was created |
status | string | The status of the request |
status_description | string | A description of the status of the request |
status_name | string | The localized version of the status value |
requester | object | A user object describing the requester author |
due_at | string | When the task is due (only applies if the request is of type "task") |
due_date | string | Same as due_at but Localized according to current locale. |
type | string | The type of the request, "question", "incident", "problem", "task" or "none" if not assigned |
type_name | string | The localized version of the type value |
type_title | string | The title shown to end users for the type field |
priority | string | The priority of the request, "low", "normal", "high", "urgent" or "none" if not assigned |
priority_name | string | The localized version of the priority value |
priority_title | string | The title shown to end users for the priority field |
followup_source_id | integer | The id of the previous request if this is a followup request |
can_be_marked_as_solved | boolean | If user can mark the request as solved |
Both type
and priority
return falsy
if the field is not visible to the end user.
request comment object
The request comment
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the comment |
anchor | string | The anchor id of the comment |
created_at | string | The time the comment was created |
body | string | The body of the comment |
author | object | A user object describing the comment author |
attachments | array | An array of attachment objects |
request field object
The request field object has the following properties.
Name | Type | Description |
---|---|---|
type | string | The type of the request field |
title | string | The title of the request field |
value | any | The value of the request field |
satisfaction response object
The satisfaction_response
object has the following properties.
Name | Type | Description |
---|---|---|
id | string | The id of the satisfaction response |
editable | boolean | If the satisfaction response can still be edited by the current user |
rating | object | A nullable rating object related to the satisfaction response |
search result object
The search result object has the following properties.
Name | Type | Description |
---|---|---|
title | string | The title of the search result |
url | string | The URL of the search result |
is_external | boolean | If true, the search result is an external content record |
text | string | A relevant content snippet in the result, with <em> tags applied to the search term and any HTML from the source removed |
vote_sum | integer | The total sum of votes on this search result record |
created_at | string | The time the search result record was created |
edited_at | string | The time the search result record was last edited |
comment_count | integer | The number of comments on this search result record |
meta | string | Meta information for a search result record, e.g.: 'by John Rossi 6 months ago in Kitchen > Recipes'" |
type | string | The type of the search result. Valid values are 'article', 'community_post', and 'external_content_record' |
author | object | A user object describing the author of the search result record |
path_steps | array | An array of path_step objects describing the path to the search result |
section object
The section
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the section |
name | string | The name of the section |
description | string | The description of the section |
url | string | The URL of the section in Help Center |
article_count | integer | The number of articles in the section. Starting with Templating API v4, this property is not available in the Home page |
more_articles | boolean | If there are more articles than the ones in the articles array (the current page). Starting with Templating API v4, this property is not available in the Home page |
articles | array | An array of up to 30 article objects. See more_articles above. For sections displayed on category pages, an array of up to 6 article objects. For subsections displayed on section pages, an array of up to 5 article objects. Starting with Templating API v4, this property is not available in the Home page |
more_sections | boolean | If there are more sections than the ones in the sections array |
sections | array | An array of up to 30 section objects. See more_sections above. This array is populated only for Guide Enterprise customers. Starting with Templating API v4, the number of sections is limited to 5 on the Home page and the Category page |
settings object
The settings
object has custom properties. The object maps the identifier
and value of the variables defined in the theme's manifest.json file. The property values can be changed using the theme's Settings panel in Guide. See Customizing the Settings panel in the Guide documentation.
In the following example, the settings
object has a custom property with an identifier of color_brand_text
:
<div style="color:{{settings.color_brand_text}}">
Like any other object, you can also use the settings
object in a helper. Example:
{{#is settings.warnings_enabled "Yes"}}
<!--block to render if the setting value is "Yes" -->
{{/is}}
In the example, the warnings_enabled
custom property is a list type variable with "Yes" and "No" options.
stat object
The stat
object has the following property.
Name | Type | Description |
---|---|---|
label | string | The translated status showing the vote count of the contribution. For a post and article contribution, it also includes the comment and follower counts |
subscription object
The subscription
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the subscription |
title | string | The title of the subscribed record |
url | string | The URL of the subscribed record |
type | string | The type of the subscription. Can be article, section, topic |
name | string | The localized string of the type of the subscription |
following | string | The localized string of what types of content are followed |
subscribe | helper | Drop-down menu with links for subscribing |
ticket object
The ticket
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the ticket |
url | string | The URL of the ticket |
ticket attachment object
The ticket attachment field
object has the following properties.
Name | Type | Description |
---|---|---|
id | string | The id of the attachment |
file_name | string | The file name of the attachment |
url | string | The URL where the attachment can be accessed |
ticket attachment field object
The ticket attachment field
object has the following properties.
Name | Type | Description |
---|---|---|
name | string | The name of the field used to set the name attribute of the input element |
label | string | The translated label for the attachments field |
attachments | array | An array of ticket-attachment objects. If the form has been submitted with errors, it contains the previous attachments |
error | string | The error message associated with the field in the request. It is null if there are no errors |
ticket field object
The ticket field
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the field. If the field is not a standard or custom field configurable in Admin Center, the value is -1. |
name | string | The name of the field used to set the name attribute of the input element |
value | various | The value of the field. The type of the value depends on the field type. It contains a value when the form has been submitted with errors or when the form is prefilled. Otherwise it is null |
options | array | An array of ticket-field-option objects if the field has any options |
error | string | The error message associated with the field in the request. It is null if there are no errors |
label | string | The label of the field |
required | boolean | Whether the field is required or not |
description | string | The description of the field |
type | string | The type of the field |
ticket field option object
The ticket field option
object has the following properties.
Name | Type | Description |
---|---|---|
name | string | The name of the option shown to the end user |
value | string or integer | The value of the option |
ticket hidden field object
The ticket hidden field
object has the following properties.
Name | Type | Description |
---|---|---|
name | string | The name of the hidden field |
value | string | The value of the field. It contains a value when the form has been submitted with errors or when the form is prefilled. Otherwise it is null |
type | string | The type of the field, which is always hidden for this object |
ticket form object
The ticket form
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the ticket form |
url | string | The URL of the ticket form |
display_name | string | The name of the ticket form |
topic object
You can use the following properties in any topic
object.
Name | Type | Description |
---|---|---|
id | integer | The topic id |
name | string | The topic name |
url | string | The URL of the topic in Help Center |
description | string | The description of the topic in Help Center |
post_count | integer | The number of posts in the topic |
follower_count | integer | The number of users following the topic |
internal | boolean | If the topic is internal or not |
updated_at | string | The time the topic was last updated |
created_at | string | The time the topic was created |
user object
The user
object has the following properties.
Name | Type | Description |
---|---|---|
name | string | The name of the user |
id | integer | The user id |
url | string | The URL of the user in the agent interface |
agent | boolean | If the user is an agent |
avatar_url | string | The user's avatar URL |
badges | array | An array of badge objects |
organizations | array | An array of organization objects |