Jun 19, 20231:30 PM - last edited on Jun 22, 20237:09 PM by kvlschaefer
Member
Set Out Of Office for Ticket Owner
SOLVE
Is it possible for a HubSpot user to set an out of office so that other HubSpot user will see that and not assign tickets to that user for that time period?
There are other users asking for this functionality. I strongly encourage you to upvote this HubSpot Ideas thread and share your thoughts and use case for the best shot at making this a reality.
I'm not sure if there's an intuitive workaround for preventing the tickets from being assigned to an OOO user (unless you make a note in a shared communication channel), but you could create a filter that would show you the tickets owned by that particular user. You could then reassign them as needed if any new tickets are assigned during the day. You could also consider having the OOO user change their user's name in HubSpot to include "OOO" or "Don't Assign" or something like that, but they would need to remember to change their name before and after their time out.
There is a HubSpot app called Distibutely that allows you to set up OOO rules for contact, company and ticket assignments. This way when someone is off, they can be skipped in the assignment rules and assigned to someone else who is active. I highly recommend checking it out.
If you're interested in learning more about the app or would like a live demo, let me know and I can connect you with the team!
Hi All! Using a workflow combined with owners/contacts scopes of the API I have been able to create this functionality.
Step 1: Create a new property on contacts. This will be where you store your Out of Office or Available status for your team members (owners).
Step 2. Create a branch in the workflow to filter out any tickets that have no Owner - add the following steps to the branch for tickets where Owner is known.
Step 3: Use a custom code step in your workflow to get owner for the ticket owner. Note that you will need to have a Secret selected and pull in the Ticket Owner property in from the trigger step. Also ensure that you have the outputs added to the Data outputs section:
Step 4 - Create a branch based on the value of of availability
Step 5 - On the branch where availability equals "Out of Office", create a step to clear Ticket Owner.
Step 6 (Optional) - You can also use the API to create a note and associate it with the ticket from your trigger. Make sure to select the appropriate outputs from your first code step as inputs in the Properties to include in code section in this code step. Here is an example of what we did, although you can edit the verbiage in the hs_note_body section:
const fetch = require('node-fetch');
exports.main = async (event, callback) => {
const ACCESS_TOKEN = process.env.SECRET_NAME;
const ownerFullName = event.inputFields['ownerFullName'];
const ownerFirstName = event.inputFields['ownerFirstName'];
const hs_ticket_id = event.inputFields['hs_ticket_id'];
const current_timestamp = Math.floor(new Date().getTime());
console.log(current_timestamp);
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer ' + ACCESS_TOKEN,
},
body: `{
"associations": [
{
"to": {
"id": "${hs_ticket_id}"
},
"types": [
{
"associationCategory": "HUBSPOT_DEFINED",
"associationTypeId": 228
}
]
}
],
"properties": {
"hs_note_body": "<p>The customer responded to this ticket, but the original owner (<strong>${ownerFullName}</strong>) is out of office. This ticket should be reassigned to another support rep so that they can respond to the customer.</p><br><h2><strong>Note to new assignee:</strong></h2><p>Please assess and proceed based on the following scenarios</p><ol><li>If there is not enough information to proceed with the ticket on your own, the issue is non-urgent, and ${ownerFirstName} will be back within 2 days: <strong>Email the customer to ask how you can help or if they would like to wait for ${ownerFirstName} to return</strong></li><li>If there is not enough information to proceed with the ticket on your own and ${ownerFirstName} will be out for more than 2 days after you have received the ticket: <strong>Take ownership of the ticket moving forward.</strong></li><li>If there is enough information to proceed with the ticket on your own: <strong>Resolve or work on the ticket until ${ownerFirstName} returns. When they return, if it makes more sense for you to keep working on this issue, retain ownership.</strong></li><li>If none of the scenarios above apply, reach out to your team lead to see how to proceed.</li></ol>",
"hubspot_owner_id": "WHATEVER ID YOU WANT",
"hs_timestamp": "${current_timestamp}"
}
}`,
};
fetch('https://api.hubapi.com/crm/v3/objects/notes', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
callback({
outputFields: {
}
});
}
Here is your TLDR on how this works:
- first code snippet will find the Ticket Owner's Email address using their ID
- as long as there is a corresponding contact in your Hubspot CRM with the same email address as the owner, the code will look at the Availability property on that contact and return the Out of Office value or Available value. The email that you see in the top-right corner when you click the dropdown should be the email of the contact you set the Availability value for:
It's not a perfect solution, but it should get the job done. When members of the team go out on vacation, they are instructed to set their Availability to Out of Office before they leave, and if someone calls out sick, a leader will go set it for them.
I am not an expert at this stuff, but actively learning and would love feedback if anyone runs across this and finds ways to make it better. Let me know if you have any questions or concerns!
There is a HubSpot app called Distibutely that allows you to set up OOO rules for contact, company and ticket assignments. This way when someone is off, they can be skipped in the assignment rules and assigned to someone else who is active. I highly recommend checking it out.
If you're interested in learning more about the app or would like a live demo, let me know and I can connect you with the team!
There are other users asking for this functionality. I strongly encourage you to upvote this HubSpot Ideas thread and share your thoughts and use case for the best shot at making this a reality.
I'm not sure if there's an intuitive workaround for preventing the tickets from being assigned to an OOO user (unless you make a note in a shared communication channel), but you could create a filter that would show you the tickets owned by that particular user. You could then reassign them as needed if any new tickets are assigned during the day. You could also consider having the OOO user change their user's name in HubSpot to include "OOO" or "Don't Assign" or something like that, but they would need to remember to change their name before and after their time out.