Can you break me?

I'm here to issue a challenge to every member of our community!

I've been a Text Blaze power user for years, way before I even joined the team. And one thing I've discovered, is that there's almost always a way to make a snippet better.

So, I'm here to challenge you :grin:

Share your favourite snippet in this thread, and let's see whether I can find a way to make it even more efficient for you.

And don't be shy. Your snippet can be super simple or super complex. It's all in good fun :slight_smile:

It's win-win really. You get a better snippet, and I get to scratch my itch for playing with this amazing tool.

I'll also explain to you what I've done and how it works, so you can learn to apply those principles in your other snippets and become a Text Blaze wizard yourself.

So, let's have at it. Show me what you've got.

P.S. Make sure you replace any sensitive or personal content with dummy data when sharing.

Actually, let's make things interesting. Let's see whether some of our more experienced users can stump me.

@Peter_Monterubio, @martinhgps, @Dmitrij_Moreinis, @Josh_Whitchurch, @Sean_P_O_MacCath-Mor, @Diego_Suancha, @Brad_Hedinger, @Juan_Murillo

@Cedric_Debono_Blaze Great idea to have a challenge! Here is one for ya.

TERM OMIOT{key:tab}{wait: delay=.1s}{key:backspace}{wait: delay=.1s}{key:tab}{key:tab}{click}{wait: delay=.1s}{key:enter}{wait: delay=.1s}{key:enter}{wait: delay=.1s}{key:tab}{key:tab}{key:tab}{key:tab}{wait: delay=.3s}SELECT CORRECT CONTACT NAME{wait: delay=.3s}{wait: delay=.1s}{key:tab}{key:tab}{key:tab}{key:tab}{key:tab}{click}STUDENT_NAME - STUDENT_NUMBER is taking a One Month IOT effective DATE(day after LDA) and will return DATE(calendar date of term start) due to REASON.
TERM COURSE(S) should receive a grade of W/WP/WF.
LDA:
MTF: (Salesforce>Program Enrollment>Student Engagement)
If MTF is at 85% or above in Salesforce: STOP! DO NOT CREATE THIS TASK. Transfer student to available SAT Agent or use sat_sl_followup Slack channel and provide a BTC

Assign Last Names (A-H) To: Agent Name
Assign Last Names (I-Q) To: Agent Name
Assign Last Names (R-Z) To: Agent Name{key:ctrl-a; mac=cmd-a}{key:leftarrow}

@Brad_Hedinger - awesome!

Can you give me a few more details please? What do the acronyms stand for? Where are you getting the data and are you currently inputting it manually? And can you describe the desired workflow as a step-by-step process? I want to make sure I give you the desired outcome.

1 Like

Sure thing! Hope this helps.

This is a task-creation automation & template for creating a specific type of task in a Salesforce Lightning case. The automation starts the same for every user.

Workflow:
1.They must place their cursor in the Subject field of the blank task. They then trigger the snippet and it runs from there.

  1. "TERM OMIOT" is placed in the Subject field.

  2. Then it tabs down to the Task Owner field which by default will display the users name who is creating the task. That name is deleted and the field left blank. This is a required field in Salesforce so leaving it blank ensures that the user cannot mistakenly save the task with it not be assigned to anyone.

  3. Then it tabs down to the Contact field which is where the user selects the Contact record for which the task is to be attached to. Most of the time, auto-pressing the down arrow key will result in the correct Contact name being displayed first, which the snippet could then auto-click on and continue. However, if the user has more than one Contact Tab open in Salesforce, and just before they created this task, they happened to have clicked on a different Contacts Tab other than this one they are creating the task for, then having Autopilot arrow down will likely display the wrong Contact and attach the task to them. Therefore, the text "SELECT CORRECT CONTACT NAME" is put in there by the snippet so that it is a visual reminder to the user that they must manually select the correct Contact to assign the task to.

  4. Then it tabs down through a handful of fields such as Date and Case Relation, which the snipped accepts the auto-displayed information.

  5. Then it tabs down to the Comments field where that large chunk of text is inserted starting with "STUDENT_NAME" and ending with "Agent Name (hidden for privacy)". This template of text contains a number of data points that the user must manually type in so that the user who the task gets assigned to can pick up the process in their workflow.

Acronyms:
TERM: This is not an acronym. It is a placeholder of text to tell the user that they must replace the word "TERM" with a numeric reference to what academic month & year the task is in reference to. For example, 2109 would be September 2021.

OMIOT: One Month Interruption Of Training.

STUDENT_NAME: The user is to copy/paste the students name from the Case into this field of the comments.

STUDENT_NUMBER: Same as above.

SELECT CORRECT CONTACT NAME: The task needs to be assigned to one of the 3 Agents listed at the bottom of the comments field, according to alpha last name of the Contact. Those names are listed there as reference for the user so they know who's name to ultimately put in the Task Owner field which has temporarily received the place holder text.

I know there is a lot of opportunity here for RegEx, which I have written and it works flawlessly. The problem I am having is that most of the users on my team who need this Snippet, are on the Basic TB version. Therefore, the limits of functionality are extensive.

@Brad_Hedinger - thanks for the challenge.

I agree with your workflow in the initial steps to ensure that the ticket cannot be submitted without making sure the data is entered correctly.

I think the main part to improve is the comments section. Since most of your team aren't on Pro, the solution is going to be far from elegant, but it's a possible workaround.

Here's how I would do it:

  1. Create a snippet with the template text for the comments section
  2. Go to the page where the data points to be used, exist.
  3. Find the selectors for each data point, use the {site:text; selector=} command to extract each data point, then add the respective commands inside the snippet.

You'll need to run this snippet somewhere on the page where you're extracting the data, so that Text Blaze can read it. Once you've inserted the snippet, copy the output, and use it in the new ticket being created.

Hopefully this makes sense. If it doesn't let me know and we can fine-tune it.

As I said earlier, Text Blaze Pro would offer a much cleaner solution for your workflow. But that's a decision to be made by your teammates (or management).

On a final note, I've responded to your post about getting on a call. When we set it up, we can discuss this specific workflow too, maybe I've missed something. It's very hard to understand the nuances of a workflow such as this when you're just reading about it :slight_smile:

Here I go, Cedric.

This is an airway management snippet. It´s for my anesthesia team.

Thanks,

Luis Herrera

<edited by Cedric - replaced copy/pasted snippet with link to snippet in exchange for ease of reading>

1 Like

@Luis_Andres_Herrera - wow, that's one massive beast :grinning_face_with_smiling_eyes:

It's best to use the Snippet Exchange when working with such big snippets.

I've placed your version here:

First of all, I noticed duplicate entries in your dropdown menus.

For instance, notice how "adecuado funcionamiento" shows up twice in the example below.

{formmenu: name=fndye; adecuado funcionamiento.; neumotaponador con fuga.; fibrobroncoscopio: test de fugas (+).; default=adecuado funcionamiento.}

This is happening because you're adding the item twice (one of them as a default). You don't need to do that. Here's what it should look like:

{formmenu: name=fndye; default=adecuado funcionamiento.; neumotaponador con fuga.; fibrobroncoscopio: test de fugas (+).}

Next, I don't understand why you have an {if} command at the top. I'm referring to this:

{if: `Hora VA` <> ""}{endif}{formtext: name=Hora VA; cols=9}

What is it supposed to achieve exactly? Nothing changes regardless of whether I enter text in the "Hora VA" field or not.

Let's tackle these points for now. Then we'll move on to the rest.

Good morning, @Cedric_Debono_Blaze.

  1. About the duplicate entries in your dropdown menus: it´s true. When I began in TB I use to do it in that way. I´ll improve it. Thanks.

  2. About "I don't understand why you have an {if} command at the top". That was because I was searching why snippet was taking so much time to run, especially in text box filling, and I began proving using {if} instead of text but I figured out that there is an issue with the random pack. I told that to @scott and I had a meeting whith him and another very kind guy. Let´s see if something occurr about it.

Nowaday this is the way that that {if} runs:

{formtoggle: name=ABORDAJE DE VA (INTUBACIÓN, LARINGOSCOPIA, VIDEOLARINGOSCOPIA, MÁSCARA LARÍNGEA).; default=yes}{if: `Hora VA` <> ""}Hora: {endif}{formtext: name=Hora VA; cols=9}

Let me tell you that these snippet its only a part of an even bigger compounded snippet. When you use random pack in many snippets (that are going to be part of a bigger one) your "great" snippet runs very very slowly when you try to copy down something in a text box. So I began using {if} for the initial hour box and, certainly, there is not a difference there. I will correct that part.

One example:
{import:advertenciatb-}{import:chequeo1-}
{import:plananestésico-}
{import:ingreso-}
{import:chequeo2-}
{import:inducción-}
{import:mva-}
{import:va-} (Here is this part. As you see ti is just a little bite of the "real" snippet)
{import:sonda-}
{import:vasoactivos-}
{import:posición-}
{import:profilaxis-}
{import:inicio-}
{import:analgesia-}
{import:termina-}
{import:chequeo3-}
{import:extracción-}
{import:traslado-}
{import:recuperación-}
{import:alta-}

On my current snippet I´ll make those corrections.

I really appreciatte your job and cooperation.

Thanks,

Luis Herrera

@Luis_Andres_Herrera - so if I understand correctly, having the {random} command in multiple snippets that are being imported slows down the app? Could you get me a screengrab of this, or maybe we can get on a call so I can record it myself? This would be of interest for our dev team.

Hi, @Cedric_Debono_Blaze

I already had a call with @scott about this issue. I hope they will tell you. But if you need anything else, please, just tell me.

Thanks a lot.

Luis Herrera