In this article, we will explain how to use PrestaShop information available as placeholders for use in response templates, called Macro in Zendesk.
The Zendesk connector for PrestaShop transmits 3 pieces of information to Zendesk in the form of a placeholder:
- Username,
- Email address,
- Order reference, if the request was made in connection with an order.
To make a request in connection with an order, the user must:
1 - Make the request from the details of an order, in the “my account” area.
2 - Make the request from the contact form, while logged in and selecting an order.
Here is an example of a ticket imported into Zendesk by the PrestaShop connector, where the 3 pieces of information are filled in.
Note that the Order reference field is not a native Zendesk field, the connector creates it.
To find the list of fields, go to Admin Center > Objects and rules > Tickets > Fields.
In the Admin Center, go to Workspaces > Agent Tools > Macros and choose the macro in which you want to insert a placeholder.
You can use them in the comment/description fields.
Placeholders for native fields are accessible via the "Show available placeholders" button and have a trivial syntax:
- Customer name: {{ticket.requester.name}}
- Customer email: {{ticket.requester.email}}
Placeholders for non-native fields have more complicated syntax, because you cannot use the name of the field, you must use the unique identifier of the field.
The syntax is therefore of the type: {{ticket.ticket_field_ID}}
To get this identifier, you must go to Admin Center > Objects and rules > Tickets > Fields and find the Order reference field.
In the example below, the tag is therefore {{ticket.ticket_field_15047416437521}}
Warning, formatting in the placeholder can disrupt its display. If your ticket contains an Order reference, but it is not displayed in the response generated by the placeholder inserted in the macro, consider removing all formatting (use Ctrl+Shift+V to paste the ID of the field, or enter the identifier manually).
Example of using tags: