Plan requirement
| Subscription | Any plan |
| Access | Admin |
A placeholder that resolved to nothing leaves a gap and sends the sentence anyway. Six causes, all quick to check.
Why is there a blank line where the placeholder was?
- A message reading "Hello ," or "Your order is on its way".
- A blank line where information should be.
- It works on most tickets and not on some.
Resolution steps
1. The field is empty on that ticket
The commonest by far. Customers who only gave an email address have no name; a custom field nobody filled in has no value. Nothing is broken.
2. The wrong field ID
A custom field placeholder pointing at an ID that does not exist resolves to nothing, silently. Especially likely after copying a rule between a sandbox and production.
3. The field is not on the ticket's form
Nobody could fill it in, so it is empty.
4. A typo, and one typo in particular
Placeholder names are exact, and a misspelling produces nothing rather than an error. The specific one Zendesk names is spaces instead of underscores, which is easy to introduce when a name is copied out of a settings screen where it is displayed with spaces.
Type it rather than paste it. The macro action suggests placeholders as you type, so a name that never appears in the list is wrong before you save it. That is faster than finding out from a customer who got the blank line.
5. It is on a user or organisation that has no value
A placeholder for an organisation field is empty for every customer who is not in an organisation.
6. The field type does not support it
Some field types do not support placeholders in macros at all. This is the one that survives every other check: the syntax is right, the ID is right, the field has a value, and it still renders blank. Check the placeholder reference for the field type before rebuilding the rule a third time.
The permanent fix
Do not write sentences that require a value. Either phrase them so an empty value reads fine, or wrap them in a Liquid conditional so the sentence only appears when there is something to put in it.
The second is more work and it is what any customer-facing automated message deserves.
Comments
0 comments
Article is closed for comments.