Skip Navigation

[Resolved] A support ticket system

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that essentially the user wanted a forum type setup and wanted the ability to send notifications to their parent CPT when a new child post is created.

Solution:

The best way I can think of this is to store the parent ID in the child form so that you can retrieve the author email from the parent.

Take a look at this code below.

[cred_generic_field type='hidden' field='hidden-parent-slug-id']
{
"default":"[wpv-post-author format="meta" meta="ID" item="[wpv-search-term param='parent_slug_id']"]"
}
[/cred_generic_field]

This way you can send the notifications to the parent. So essentially if you are creating a child post that is click to from the parent you will get a URL parameter similar to "parent_slug_id" added to your URL to the child post. This will have the ID of the parent post in it.

From this ID you can retrieve the author information to send the notifications to.
https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/#creating-forms-when-a-parent-post-is-preselected

This support ticket is created 5 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by nickH-5 5 years ago.

Assisted by: Shane.

Author
Posts
#1470605

I would like to create a support ticket system using Toolset.

I can think of ways of possibly doing this using CPT Ticket for the ticket and CPT Status for agents to associate updates to the ticket. If I do this, is it possible for the author of a ticket to be email alerted if a child CPT status is attached to the ticket? i.e. alert the author of a post if a child of the post is created/associated or edited?

Is your support ticket system created using Toolset? If so, would you be able to share the basic structure and logic you've used?

#1471667

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nick,

Thank you for getting in touch.

Though it is possible to build out a support system like this with Toolset I would not recommend it, as it might require some amount of custom code to achieve everything you want.

I would recommend using a dedicated plugin for this. Additionally here " If I do this, is it possible for the author of a ticket to be email alerted if a child CPT status is attached to the ticket? i.e. alert the author of a post if a child of the post is created/associated or edited?"

This would require custom code to achieve.

Our forums here is actually built on BBpress which our systems team customized for our needs here in the forum.

You do also have the option to download BBpress and use this as well.

Thanks,
Shane

#1472535

Thanks Shane.

I really, really don't want to add yet another plugin to my site! So I'm going to try this in Toolset because Toolset is so flexible and a great solution which I already have loaded. I'll look into how to get parents of posts alerted but any tips you can offer I'd be grateful.

#1473349

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nick,

The best way I can think of this is to store the parent ID in the child form so that you can retrieve the author email from the parent.

Take a look at this code below.


[cred_generic_field type='hidden' field='hidden-parent-slug-id']
{
"default":"[wpv-post-author format="meta" meta="ID" item="[wpv-search-term param='parent_slug_id']"]"
}
[/cred_generic_field]

This way you can send the notifications to the parent. So essentially if you are creating a child post that is click to from the parent you will get a URL parameter similar to "parent_slug_id" added to your URL to the child post. This will have the ID of the parent post in it.

From this ID you can retrieve the author information to send the notifications to.
https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/#creating-forms-when-a-parent-post-is-preselected

Please let me know if this helps.
Thanks,
Shane

#1478349

Thanks. I'm going to try this and there are some useful threads like this one which appear to be solving the same question

https://toolset.com/forums/topic/send-email-notification-to-all-child-posts-usersauthors/