Jump to content
  • 0

Manipulating Tags In Email Template


nuv

Question

Hello,

 

Can I manipulate tags in email template ? 

 

For eg - Consider support manager plugin (https://docs.blesta.com/display/user/Support+Manager) .

 

I'm editing an email template for "Ticket Received" and I noticed that there are multiple tags available. One of them is {ticket.date_added}. According to the doc, that tag would show "The UTC datetime stamp of ticket creation". Can I change the timezone ? I'd like to show the ticket creation time based on my timezone. 

 

Second tag is {ticket.client_id}, which should client id. Can I show client name ? 

{First name} {last name} 
{ticket.date_added} (in my timezone)

    {ticket.details_html}

Lastly, why do I need to use {ticket_hash_code} in the subject line to allow for tickets to be replied to by email and not {ticket.code} ? I'm assuming {ticket.code} is unique too. I'm just curious about this. Its not an issue. 

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

 

 

Lastly, why do I need to use {ticket_hash_code} in the subject line to allow for tickets to be replied to by email and not {ticket.code} ? I'm assuming {ticket.code} is unique too. I'm just curious about this. Its not an issue. 

 

Because that ensures that the ticket reply is added to the correct ticket, it's like a fingerprint but I suppose Blesta could use the code that's up to the guys because the plugin isn't coded to use the codes. 

And on the docs you linked it tells you why the hash is needed:

{ticket_hash_code}	A hash code for validating ticket replies	Required to be in the subject line to allow for tickets to be replied to by email
Link to comment
Share on other sites

  • 0

Yes Mike, I read that. I kind of copy/pasted that line from the docs in my question. My curiosity is why ? Since ticket numbers are unique too (I think?). Currently my subject is 

[{ticket_hash_code}]:{ticket.summary}

Thus my subject of the email reads

[#1270384 -801c-]:I need help with domain addition 

whereas, if {ticket.code} would have sufficed, subject would have looked aesthetically more pleasant

[1270384]:I need help with domain addition 

However, please understand that this isn't the reason as to why I opened this thread. Its just a curiosity. My main question is about manipulating tags. Can I do it ? Can I not do it ?

Link to comment
Share on other sites

  • 0

Yes Mike, I read that. I kind of copy/pasted that line from the docs in my question. My curiosity is why ? Since ticket numbers are unique too (I think?). Currently my subject is 

[{ticket_hash_code}]:{ticket.summary}

Thus my subject of the email reads

[#1270384 -801c-]:I need help with domain addition 

whereas, if {ticket.code} would have sufficed, subject would have looked aesthetically more pleasant

[1270384]:I need help with domain addition 

However, please understand that this isn't the reason as to why I opened this thread. Its just a curiosity. My main question is about manipulating tags. Can I do it ? Can I not do it ?

 

 

No you can try it if you wish but it's there for a reason, We use the following:

Licensecart {ticket.department_name} - {ticket.summary}    #{ticket.code}    [{ticket_hash_code}]
Link to comment
Share on other sites

  • 0

You use this as a subject ?

 

Also, what I'd like to enquire is about main email body. Can I indicate the date time of the ticket according to my timezone and if I can also indicate the clients name and not the ID.

 

I'm not sure about the timezones or the names.

We have:

Welcome to Licensecart's Support!

Support Ticket Opened


{ticket.department_name}

THANK YOU, WE HAVE SUCCESSFULLY RECEIVED YOUR TICKET

{ticket.details_html}


Ticket Information

IMPORTANT INFORMATION ABOUT YOUR TICKET

Ticket ID: #{ticket.code}
Priority: {ticket.priority}
{ticket.department_email}
Our opening hours are Monday - Friday 9am - 4pm GMT


REPLY

And Text version:

Thank you for contacting our support team. A support ticket has now been opened for your request. You will be notified when a response is made by email.

Ticket Summary: 
{ticket.summary}

----------------
Ticket ID: #{ticket.code}
Priority: {ticket.priority}
Status: {ticket.status}
Last reply: {ticket.reply_by}
Opened: {ticket.date_added}
Ticket URL: {update_ticket_url}
Ticket Department: {ticket.department.email}
----------------

As the text one is what we have in the html. However I also need to update our email templates shortly :).

Link to comment
Share on other sites

  • 0

Ah I see. Well if I couldn't change the timezone or display client's complete name, my template would pretty much look like yours.  ;)

 

Also, one more question. Can I change "From" and "From Email" ? Like if, someone submitted a ticket to sales dept, he would see email from sales@domain.com and if a ticket is submitted to support, then support@domain.com.

Link to comment
Share on other sites

  • 0

Ah I see. Well if I couldn't change the timezone or display client's complete name, my template would pretty much look like yours.  ;)

 

Also, one more question. Can I change "From" and "From Email" ? Like if, someone submitted a ticket to sales dept, he would see email from sales@domain.com and if a ticket is submitted to support, then support@domain.com.

 

 

Yes you can, I use:

Licensecart: Support

with the support@ domain.com for the email.

Link to comment
Share on other sites

  • 0

Yes I understand that. What I'm saying is, usually if you open a ticket with sales dept, you get an email from sales dept. When you open a ticket with support dept. you get an email from support dept. However, blesta only allows you to enter 1 "email" and 1 "from". Is that right ? 

 

Thus, even if you open an email with the sales dept, you'll see an email from the support dept., since you've set support@ for licensecart

Link to comment
Share on other sites

  • 0

Yes I understand that. What I'm saying is, usually if you open a ticket with sales dept, you get an email from sales dept. When you open a ticket with support dept. you get an email from support dept. However, blesta only allows you to enter 1 "email" and 1 "from". Is that right ? 

 

Thus, even if you open an email with the sales dept, you'll see an email from the support dept., since you've set support@ for licensecart

 

 

Well that depends on how you set-up your Departments doesn't it?? :) It's a simple tick box.

 

 

 

3x8h0iwt.png

Link to comment
Share on other sites

  • 0

Mike, I've done that. My "override the form address" option is ticked. However, it only works for ticket updates and not ticket creation.

 

For example -

 

My Setting - In my email templates for the ticket creation and ticket update, "From Name" is set to "Support Department" and "From Email" is set to "support@". In each of the dept. setting, "overide the from address" option is ticked and saved. 

 

Scenario 1 (ticket creation) - If a user creates a ticket with Sales, that user gets an email from "support@"  and "Support Dept." saying that they have received user's ticket. Which means that "From Email" isn't overridden

 

Scenario 2 (ticket update) - However, when a staff member updates that ticket, user gets an email from "sales@" and "Support Dept." (please note here that "from name" doesn't change ). Which means that "From Email" is overridden but not "From Name".

 

What am I missing here ? Your settings allow you to override "From Email" in  ticket creation email?  

Link to comment
Share on other sites

  • 0

Hello,

 

Can I manipulate tags in email template ?

 

Tags can be filtered as described in the H2o documentation.

 

 

For eg - Consider support manager plugin (https://docs.blesta.com/display/user/Support+Manager) .

 

I'm editing an email template for "Ticket Received" and I noticed that there are multiple tags available. One of them is {ticket.date_added}. According to the doc, that tag would show "The UTC datetime stamp of ticket creation". Can I change the timezone ? I'd like to show the ticket creation time based on my timezone.

 

Unfortunately, the "date" filter for H2o only allows for you to format the date according to php's date function, which does not do timezone conversion.

e.g.

{ticket.date_added | date "M d, Y H:i:s A"} is "Feb 09, 2016 23:17:42 PM" UTC

 

The timezone conversion is an additional step, so either a new tag would need to exist that displays the date in the appropriate timezone, or better yet, H2o would need to be extended to support a new filter for performing the timezone conversion.

 

 

Second tag is {ticket.client_id}, which should client id. Can I show client name ? 

{First name} {last name} 
{ticket.date_added} (in my timezone)

    {ticket.details_html}

 

Only the tags shown on the Support Manager page documentation would be available. It's possible that a client may not be assigned to the ticket at all, if the ticket were emailed in, for instance. The plugin doesn't make additional queries to allow for these tags due to the performance hit it would incur. however, that may be a good feature request. The client, the contact that replied, the staff, and the department might be a good set of additional tags.

 

 

Lastly, why do I need to use {ticket_hash_code} in the subject line to allow for tickets to be replied to by email and not {ticket.code} ? I'm assuming {ticket.code} is unique too. I'm just curious about this. Its not an issue. 

 

The {ticket.code} is not necessarily a unique code, and it could be guessed. The {ticket_hash_code} does change per email, is unlikely to be guessed, and is used to determine the ticket the email is associated with.

Link to comment
Share on other sites

  • 0
On 14/03/2016 at 6:19 AM, nuv said:

Mike, I've done that. My "override the form address" option is ticked. However, it only works for ticket updates and not ticket creation.

 

For example -

 

My Setting - In my email templates for the ticket creation and ticket update, "From Name" is set to "Support Department" and "From Email" is set to "support@". In each of the dept. setting, "overide the from address" option is ticked and saved. 

 

Scenario 1 (ticket creation) - If a user creates a ticket with Sales, that user gets an email from "support@"  and "Support Dept." saying that they have received user's ticket. Which means that "From Email" isn't overridden

 

Scenario 2 (ticket update) - However, when a staff member updates that ticket, user gets an email from "sales@" and "Support Dept." (please note here that "from name" doesn't change ). Which means that "From Email" is overridden but not "From Name".

 

What am I missing here ? Your settings allow you to override "From Email" in  ticket creation email?  

The same exact scenario happens to be. I mean, it works as it is, but I have 3 departments and it would be nice for the client first ticket automatic reply to come from the department own email.

It sems staff receives the email from the correct department... but client wont.

Did you find a solution?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...