<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by turbonemesis on Medium]]></title>
        <description><![CDATA[Stories by turbonemesis on Medium]]></description>
        <link>https://medium.com/@turbonemesis?source=rss-ca7857a6a0ca------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6BFlQbb1zvU2psSH-J8bJQ.jpeg</url>
            <title>Stories by turbonemesis on Medium</title>
            <link>https://medium.com/@turbonemesis?source=rss-ca7857a6a0ca------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 14:25:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@turbonemesis/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Twilio Flex Bonus Content]]></title>
            <link>https://medium.com/twilioflex/twilio-flex-bonus-content-f84e5e0b3047?source=rss-ca7857a6a0ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/f84e5e0b3047</guid>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[flex]]></category>
            <category><![CDATA[twilio]]></category>
            <category><![CDATA[rest]]></category>
            <category><![CDATA[programmablecontactcenter]]></category>
            <dc:creator><![CDATA[turbonemesis]]></dc:creator>
            <pubDate>Mon, 01 Mar 2021 01:37:48 GMT</pubDate>
            <atom:updated>2021-04-20T01:57:25.807Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lHdMXzqo-65CKM49ulCzzA.jpeg" /></figure><h3>Twilio Flex Plugins/Serverless Functions Examples</h3><p>I’ve been aggregating a bunch of Twilio Flex examples I’ve found under a new github organization shown below. Most every example has one or more serverless function definitions as well as an independent Twilio Flex plugin that interacts with the serverless functions to achieve the desired result.</p><p>P.s. As of right now my team just adds any of the example plugins we like in the following org to our own existing flex plugin. (aka we only build/deploy one flex plugin and we only deal with one package.json, one appConfig.js, and one index.ts file) Because otherwise we’d have to maintain, build, and deploy each one separately — both the functions and the frontend plugins themselves — which just isn’t a priority for us right now — so we have one functions folder within our root folder that we add everything to and we just import any of the other frontend plugins examples we like into our main index.ts file of our core plugin.</p><p>👇👇👇🔥👍</p><p><a href="https://github.com/twilio-contact-center">twilio-contact-center</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f84e5e0b3047" width="1" height="1" alt=""><hr><p><a href="https://medium.com/twilioflex/twilio-flex-bonus-content-f84e5e0b3047">Twilio Flex Bonus Content</a> was originally published in <a href="https://medium.com/twilioflex">TwilioFlex</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automator script to convert .mov to .mp4 file using quick actions]]></title>
            <link>https://turbonemesis.medium.com/automator-script-to-convert-mov-to-mp4-file-using-quick-actions-c8033e8d734?source=rss-ca7857a6a0ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8033e8d734</guid>
            <category><![CDATA[movies]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[medium]]></category>
            <dc:creator><![CDATA[turbonemesis]]></dc:creator>
            <pubDate>Tue, 21 Jul 2020 02:35:50 GMT</pubDate>
            <atom:updated>2021-08-09T04:58:34.705Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*Gi2RkpNoezTmxCkpXT7s1Q.gif" /><figcaption>This shows how we can quickly convert a .mov file to .gif format using Automator and Apple’s quick actions</figcaption></figure><h3>Convert .mov to .mp4 or .gif using Automator Quick Actions</h3><p>First things first, we are going to create a Mac “Quick Action” automator script which automatically converts .mov to .mp4 for you. Next we will create another Mac “Quick Action” automator script which instead outputs your movie files as .gifs. Let’s get started!</p><h3>Prerequisites</h3><ol><li>Install ffmpeg — either via a direct download <strong>or</strong> using brew:</li></ol><h4>Direct download:</h4><p><a href="https://ffmpeg.org/download.html">Download FFmpeg</a></p><h4>Brew:</h4><p>brew install ffmpeg</p><h3>Automator script</h3><p>2. On your mac, press cmd + space then type in the word Automator and click on the Automator app.</p><p>3. Click on New Document</p><p>4. Click on Quick Action, click Choose</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sTGy75GbLwIQaJmEoS8bUA.png" /></figure><p>5. Do a search for Run Shell Script, within the Automator app itself, then double click on the Run Shell Script item when found.</p><p>6. Next we need the shell syntax itself.</p><p>On receive movie files from any application, we are going to just simply run a custom shell command as follows:</p><p>(Please note, your ffmpeg path may be different from mine, make sure you use YOUR ffmpeg installation location path where it says /Applications/ffmpeg in the code snippet below — yours may be installed in a different location)</p><pre>originalFilePath=$1<br>uuid=$(uuidgen)<br>uuidFilePath=$originalFilePath-$uuid<br>/Applications/ffmpeg -i $originalFilePath $uuidFilePath.mp4</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A_lwn2ypsNtovCBkBOqBhQ.png" /></figure><p>This essentially just takes a movie file path as input using quick actions in finder, and outputs the movie file in .mp4 format, using a unique uuid in the destination path name just so that you won’t run into any file already exists errors. (I’m sure there’s a better way of doing the file duplication uuid part, for instance, in the ffmpeg docs it says you can pass in the -y flag to overwrite the files instead of using a uuid[2])</p><h4>Fixing copyright permission issues</h4><p>You may run into some copyright permissions issues when running your new quick action for the first time, elevating the permissions of the ffmpeg installation file helps, but let me know in the comments if anyone finds a better way around this.</p><p>chmod u+s /Applications/ffmpeg (Again, this is dependent on your ffmpeginstallation location)</p><p>One other thing I noticed was after you first capture like a screen recording, you might need to simply rename your .mov file prior to it allowing you to run your quick action successfully, without it complaining about copyright permissions, but I’m still looking into exactly why that is and how to get around it. I personally use parallels tools to capture most of my screen recordings, but this might not be an issue in just normal movies or when your movie is recorded via different applications/devices.</p><h4>Save and run it!!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sVyuaX_x0qZ4ktlhPGDFbA.png" /></figure><h4>Just think what else you can do just knowing these simple tools!</h4><p>A few ideas:</p><p>Another script to convert back to .mov format</p><p>Convert heic photos to jpeg or png or svg (<a href="https://www.reddit.com/r/editors/comments/778t43/heic_got_you_down_i_got_the_cure/?utm_source=share&amp;utm_medium=web2x&amp;context=3">https://www.reddit.com/r/editors/comments/778t43/heic_got_you_down_i_got_the_cure/</a>)</p><p>Convert video to gif, etc..</p><p>ALL can be done via a similar ffmpeg command!</p><h4>Bonus content — converting a movie file to gif</h4><p>Follow steps one through five above.</p><p>Shell syntax:</p><p>(Please note, your ffmpeg path may be different from mine, make sure you use YOUR ffmpeg installation location path where it says /Applications/ffmpeg in the code snippet below — yours may be installed in a different location)</p><pre>originalFilePath=$1<br>uuid=$(uuidgen)<br>uuidFilePath=$originalFilePath-$uuid</pre><pre>/Applications/ffmpeg -i $originalFilePath -filter_complex &quot;[0:v] fps=20,scale=720:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse&quot; $uuidFilePath.gif</pre><p>This converts the input movie file to gif for you just like that! There are other settings you can tweak to your liking too! Just be careful to not do this on a super long video, after all, who would want to watch a gif that’s longer than just a few seconds anyways? (Decrease the gif file size, only convert a portion of the original video, output different resolution and color settings, etc, etc — see reference(s) below[¹] for more info on the settings you can change to your liking)</p><h4>References</h4><ul><li><a href="https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/">How to make GIFs with FFMPEG</a></li><li><a href="https://ffmpeg.org/ffmpeg.html#Main-options">ffmpeg Documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8033e8d734" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Twilio Flex as a New Flex Programmer]]></title>
            <link>https://medium.com/twilioflex/understanding-twilio-flex-as-a-new-flex-programmer-a255e9787d8a?source=rss-ca7857a6a0ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/a255e9787d8a</guid>
            <category><![CDATA[twilio-taskrouter]]></category>
            <category><![CDATA[twilio-frame]]></category>
            <category><![CDATA[twilio-sms]]></category>
            <category><![CDATA[flex]]></category>
            <category><![CDATA[twilio]]></category>
            <dc:creator><![CDATA[turbonemesis]]></dc:creator>
            <pubDate>Mon, 06 Apr 2020 00:26:56 GMT</pubDate>
            <atom:updated>2021-07-05T06:47:54.659Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*vbPUW0c2rOQcdS8lNQhjbw.png" /></figure><p>Created April 5, 2020 | Last updated May 3, 2021</p><p>So your boss went to Twilio-conf and came back and told you to implement Twilio Flex huh? Now you are in the middle of learning React, while trying to learn how to create Flex plugins, implement Typescript, Scss, etc, all-the-while you have a deadline due at the end of the week. This guide is for you my friend!</p><h3>Intro</h3><blockquote>My name is Chase Gibbons and I am over a team responsible for building out a fairly complex twilio flex project to ultimately replace our existing contact-center. My employer recently paid upwards of $50k for a few weeks of twilio expert services consulting in which I led the charge on. It was super rewarding and I’d definitely recommend twilio experts services for your own company if your employer can afford it. However, I do hope to try and share a sliver of what I’ve learned in working with flex myself over the course of a few medium posts. None of what I say should be considered to be endorsed by twilio in any way, the following comments are all my own.</blockquote><p>Let’s jump straight into it..</p><p>The following outlines the two main projects included within Twilio Flex.</p><h3>Flex-ui vs Flex-webchat-ui Summary</h3><h4>Flex-ui Project (call-center application)</h4><ul><li>Self hosted vs Twilio hosted — refers to whether Twilio controls the published index.html file for you, (accessible at flex.twilio.com) or whether you control it yourself. The default state for the plugin application is Twilio hosted. (Meaning all you end up deploying is a single JavaScript bundle and Twilio loads that bundle for you)</li><li>Based on a plugins model</li><li>Extends <strong>@twilio/flex-ui</strong> npm package</li></ul><h4>Flex-webchat-ui Project (webchat widget)</h4><ul><li>Self hosted only — meaning you control the published index.html</li><li>Not based on a plugins model but you can still add/remove/replace Twilio’s existing components</li><li>Extends <strong>@twilio/flex-webchat-ui</strong> npm package</li></ul><h3>Flex-ui</h3><p>The Flex-ui app is normally generated using twilio’s cli by first installing the `plugin-flex` cli plugin on top of twilio’s default cli and then by running twilio flex:plugins:create plugin-sample. (Always shoot to use the latest versions of everything if possible)</p><pre># Install the flex plugin for the cli <br>twilio plugins:install @twilio-labs/plugin-flex@beta<br><br># Now we can start with a template plugin with the create command<br>twilio flex:plugins:create plugin-sample --install<br><br># Or if you prefer a typescript project run<br>twilio flex:plugins:create plugin-sample --install --typescript</pre><p>It is perfectly normal to use twilio flex:plugins:create plugin-sample --install --typescript once and to have only one plugin for all of your entire apps changes, you simply add several add/remove/replace clauses within that one plugins project essentially. Twilio is adding support for being able to add more than one plugin per project, meaning you’d have more than one package.json per repo, but you have to join a beta program to officially try it out and from my experiences it becomes harder to maintain. It becomes harder to do like the ci/cd properly that way and whatnot — although there are a ton of cool pre-built plugins you should definitely check out. (Keep reading…)</p><h3>Flex-webchat-ui</h3><p>The Flex Webchat app on the other hand is normally cloned from the <a href="https://github.com/twilio/flex-webchat-ui-sample">https://github.com/twilio/flex-webchat-ui-sample</a> repo and is not associated with plugins at all. (It took me the longest time to fully wrap my head around some of this stuff initially..) That app is just a straight react app that you can still add/remove/replace Twilio’s default components from, but Twilio doesn’t end up hosting anything for you for the webchat. (i.e. it doesn’t end up controlling your webchat’s index.html file for you)</p><p>In my company’s case, we actually had to take the Flex webchat a step further and add support to be able to give each of our clients a small javascript snippet so that they could put our webchat on their own websites. This differs from the default setup in that we are not simply adding the webchat to our existing react application. We needed to be able to add it to ANY type of existing application via a javascript snippet, and have the ability to still track everything accordingly. (More on how we accomplished this in a future post)</p><h3>Similarities</h3><p>Both projects use the same MessagingCanvas component.</p><p>Both projects use @twilio/flex-ui-core under the hood. (Used to be called @twilio/frame-ui)</p><h3>Self hosted vs Twilio hosted</h3><p>This refers specifically to the <strong>Flex-ui</strong> app in particular, (aka call-center app) and how it is published. There are pros and cons to each method.</p><h4>Twilio hosted</h4><p>This means your code is published to and accessible from flex.twilio.com. This method is simple, you are able to use npm run deploy and have it deploy automatically for you. However Twilio controls the published index.html file in this case and you merely only control the code within your plugin. For instance, when you do npm run deploy all it ends up building is a single javascript bundle file. (No index.html) Therefore, you must load any third-party dependencies for you plugin(s) either by injecting a script tag or link tag on the page dynamically at runtime which does load the assets for you or else by using Twilios’ loadCSS, loadJS helper methods. (The latter is probably preferred)</p><p>Pros</p><ul><li>Ease of use</li><li>You maintain a nice clean controlled abstraction away from Twilio, which makes it less likely your code will ever break with a future release of one of their core flex libraries.</li><li>Plugins architecture</li></ul><p>Cons</p><ul><li>You are restricted by Twilio in what you are able to do. For instance, Twilio’s main @twilio/flex-ui library is still dependent on an older version of React, a version which does not support React hooks, therefore you have no control over anything like that other than if you join their beta program.</li><li>Their auto deploy feature still needs some work, for instance, if your build outputs any external assets other than js or inline css, like built svgs and whatnot, then they will not deploy correctly when you run npm run deploy</li><li>Cannot run service workers</li><li>Cannot deploy feature branches</li><li>Cannot utilize redux middleware</li><li>Stuck on an older version of React (pre-hooks) unless you join their beta program</li></ul><h4>Self hosted</h4><p>Self-hosted means your deployment is just like any other React app. This method requires you to set up your own deployment and your own server/s3 bucket and CloudFront configuration to access it from.</p><p>Pros</p><p>Literally the opposite of all the cons listed above</p><p>Cons</p><p>You risk losing the whole plugins architecture compatibility behind your flex application if you don’t do it right, and with that you risk your application becoming less and less compatible with Twilio’s core flex libraries in general over time.</p><p>You risk not being able to add other external plugins to your app going forward</p><h4>Both Twilio hosted and Self hosted?</h4><p>My team has actually managed to strike a balance of using both Self hosted and Twilio hosted deployments. Our boss was talked into twilio hosted being the best way to go by some representative from twilio previously so I just found a way around it for our feature deployments lol ;) We currently do self hosted on all our feature branches, (Any branch that isn’t develop or master) which allows QA to have a unique url to go to in order to test every single feature at any given stage in the process and it allows us to require gated check-ins with QA’s sign off being required prior to merging, which has substantially improved our quality.</p><p>And then when it comes to deploying to production, our ci/cd pipeline is ultimately configured to build and deploy our flex plugin bundle using thenpm run deploy method, whenever merging into master or develop branch, which use the Twilio hosted method. (We have two separate Twilio Flex projects set up in our Twilio Console, one for all our Dev stuff and another one for Production)</p><p>We were ultimately able to accomplish this unique balance by simply mimicking the exact scenario you see play out whenever you serve your plugin locally — then we just simply acted as Twilio and deployed their local index.html normally used to load the plugins locally to s3.</p><blockquote>The key point with this setup is we are still loading the separate plugin bundle just like how Twilio ultimately does it when you are twilio hosted— which doesn’t cause regressions or tight coupling in our self-hosting and makes our built plugin bundle capable of being deployed either the self-hosted route or the twilio-hosted route in our case.</blockquote><p>This is huge because one of the main gripes from twilio about self hosting is people start treating it like any other react app, not respecting the boundaries between the plugin bundle and the index.html file, etc, which just makes it so they’d have a difficult time ever going back to the twilio hosted plugins model and their code gets less and less predictable in terms of whether or not its going to continue to work with all the new flex-ui plugins releases over time.</p><p>Here is how you could do something similar to how we are doing it now, I call it a “hybrid approach”: <a href="https://drive.google.com/drive/folders/1HeWxj7tHrOzoHj2MaJxCTTE8AEH7cp5V?usp=sharing">https://drive.google.com/drive/folders/1HeWxj7tHrOzoHj2MaJxCTTE8AEH7cp5V?usp=sharing</a></p><h3>Twilio Flex Backend 💻</h3><p>As you can see in the diagram below, the flex-webchat-ui project first initializes a chat via Twilio’s programmable chat api, and upon the first message being sent, it hits the Webchat Studio Flow which creates a new Task in TaskRouter, the new Task is subsequently shown to the contact-center agents depending on the attributes the task is populated with. (And depending on the worker attributes as well, I’ll do a post on the task-routing portion later because it really is its own beast)</p><p>Upon an agent accepting the reservation, the flex-ui project actually joins the chat channel passed over via the task that was created in the Studio Flow, it does that by connecting the loop back to Twilio’s Programmable Chat API using the channelSid passed along in the task attributes. A similar process goes on for a phone call, except the Twilio API in question in that case is Twilio’s Programmable Voice API and the task attribute in that case is the callSid. Same for SMS which utilizes Twilio’s Programmable Messaging API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_tGaBhLXMFw6YCnlfIkYw.png" /></figure><p>Simply having a decent understanding of the high-level architecture shown above will do wonders for you in terms of being able to fully customize everything going forward.</p><h4>Webhooks</h4><p>There are a ton of different places where you can tap into everything that is going on in the flex-ui from a backend perspective, for instance, Twilio allows you to create webhooks just about everywhere. When a chat channel is created, when a message is sent, when a proxy session is created, when a task is created, updated, completed, when a voice call goes out or comes in, when a voice recording is finished, when an sms message is sent or received, etc, etc — and that’s not even the half of them.</p><h4>Actions Framework</h4><p>Alternatively you can tie into all sorts of different hooks from the frontend perspective as well using the Flex Actions Framework, however this method doesn’t capture all the abandons and it isn’t quite as reliable I would say. You are always going to have more consistent data if you tie into things from the backend perspective as opposed to the frontend, but in some cases you might not care that a chat or a call even took place unless you receive a frontend form submission, etc. In those cases the actions framework is perfect.</p><ul><li><a href="https://www.twilio.com/docs/flex/developer/ui/actions">Actions Framework</a></li><li><a href="https://assets.flex.twilio.com/releases/flex-ui/1.18.0/docs/Actions.html">Actions</a></li></ul><h3>Other</h3><p>Just some other random things that may or may not help you…</p><h4>Twilio Runtime</h4><p>Consists of Twilio Serverless Functions, Twilio Assets, etc. This is where your plugins are uploaded if you use the built-in npm run deploy method. You can think of Twilio’s Runtime as Twilio being its own cloud provider, just like AWS, Google Cloud Provider, etc. So Twilio Serverless Functions would map to AWS Lambda and/or to GCP Funtions, they are all essentially the same thing and they are all technically even interchangeable if you wanted. Twilio just makes it a little easier for you to use the Twilio sdk in their version is all. Then the Twilio assets are really just like aws s3 or google cloud storage, etc, etc.</p><h4>Passing data over from the Webchat</h4><p>On preEngagmentFormSubmit, you will have an opportunity to pass data over from the webchat project to the flex-ui project through the studio flow as task attributes. It’s best to not have the need to update the studio flow configuration every-time you want to pass through a new variable I have found. Therefore I recommend you take advantage of twilio studio’s liquid syntax to successfully pass json through your studio flow without having to change up the configuration each time.</p><p><a href="https://www.twilio.com/docs/studio/user-guide/liquid-template-language">Liquid Template Language</a></p><h4>Random Tips</h4><p>Flex is getting a lot better community examples nowadays and their docs aren’t changing quite as fast as they used to, so just google something if you can’t figure it out I have found. In addition, it’s not always going to be easy but you can learn a ton about how things work just by putting in the time digging into the sourcecode, looking at the typescript definitions, looking up examples, learning how all of Twilio’s microservices work together to achieve the ultimate result, etc, etc. (That’s how I learned a lot of what I know now)</p><p>Utilize the helpers Twilio Flex gives you out of the box on the frontend to make your life easier. withTaskContext([Component]) is one such example of a higher order component Flex gives you which provides your components with access to the currently selected task at any given time, including all the call info, conference info, chat channel info, etc. It makes it easy to re-invoke things like their TaskCanvas elsewhere.</p><p>Twilio also pre-exposes things like their chat-sdk, their task-router sdk, their insights sdk, their voice sdk, etc, all under the `Twilio.Flex.Manager.getInstance()` location. But I’d definitely take advantage of all their pre-exposed Actions first if I were you, because those are already pre-built into the flex-ui’s redux integration.</p><p>Use styled-components to override the styles of the default Twilio Flex components when re-invoking them elsewhere. With styled-components, you are allowed to easily re-style the default Flex components simply by overriding their styles using jss/css — without your styles bleeding out into the global scope.</p><p>Get comfortable looking into the Twilio Rest docs for different Twilio services, like the Twilio FlexFlow Rest Docs, Twilio Worker Rest Docs, Twilio Task Rest Docs, Twilio Chat Conversation Rest Docs, Twilio Flex Proxy Rest Docs, Twilio Voice Rest Docs, Twilio Messaging Rest Docs, etc, etc.</p><h3>Conclusion</h3><p>Feel free to let me know what you’d like to see/hear more on and I’ll be happy to expand on that particular subject. Good luck meeting your deadlines you guys! ;)</p><h4>Bonus Content 👇👇🔥</h4><p>The following links to a github organization I set up exclusively to house all the cool Twilio Flex Plugins/Functions related examples I’ve found thus far — you should definitely check it out — it may very well include at least one example demonstrating exactly what you are looking for.. Thanks for reading!!</p><p><a href="https://medium.com/twilioflex/twilio-flex-bonus-content-f84e5e0b3047">Twilio Flex Bonus Content</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a255e9787d8a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/twilioflex/understanding-twilio-flex-as-a-new-flex-programmer-a255e9787d8a">Understanding Twilio Flex as a New Flex Programmer</a> was originally published in <a href="https://medium.com/twilioflex">TwilioFlex</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding a supervisor chat transcript to Twilio Flex-ui]]></title>
            <link>https://medium.com/twilioflex/adding-a-supervisor-chat-transcript-to-twilio-flex-ui-33705193f28b?source=rss-ca7857a6a0ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/33705193f28b</guid>
            <category><![CDATA[chat]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[flex]]></category>
            <category><![CDATA[twilio]]></category>
            <dc:creator><![CDATA[turbonemesis]]></dc:creator>
            <pubDate>Thu, 09 May 2019 14:16:00 GMT</pubDate>
            <atom:updated>2021-07-05T06:33:11.821Z</atom:updated>
            <content:encoded><![CDATA[<h3>Adding a Custom Supervisor Chat Transcript Plugin to Twilio Flex-ui</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FfxyEopQnbG3sniFwskZCQ.png" /></figure><h3>V2 — Updated July 4, 2021</h3><p>To be clear, they have since updated their messaging canvas and you can now ultimately recreate/re-invoke their messaging-canvas a lot easier via their new autoInitChannel={true} feature introduced as follows:</p><pre>&lt;MessagingCanvas <em>autoInitChannel</em>={<em>true</em>} <em>sid</em>={<em>this</em>.state.channelSid} <em>key</em>=&#39;rd-task-lookup-view-messaging-canvas&#39; <em>ref</em>={<em>this</em>.messagingCanvasRef} <em>showWelcomeMessage</em>={<em>false</em>}&gt;&lt;/MessagingCanvas&gt;</pre><p>You no longer have to manually join the channel yourself and do all that jazz as stated below, but you still need the elevated supervisor programmable chat role on your user in order for it to be able to to auto-join the channels onInit correctly..</p><p><a href="https://assets.flex.twilio.com/docs/releases/flex-ui/1.22.2/MessagingCanvas.html#.MessagingCanvasProps">Flex UI API Reference</a></p><h3>V1 — Updated May 9, 2019 (Original Article)</h3><p>There are four main parts you need to worry about to successfully accomplish this feature on your own:</p><ol><li>Elevating your programmable chat user permissions to allow access to query other programmable chat user’s chat channels via the front-end Twilio.Flex.Manager.getInstance().chatClient.getChannelBySid(userChannelSid) sdk. (works regardless of whether the chat channel type is public or private) Simply lookup your user by its identity in the Twilio Programmable Chat console, (<a href="https://www.twilio.com/console/chat/dashboard">https://www.twilio.com/console/chat/dashboard</a>) and change its role from service user to service admin. Or better yet, do this automatically for super users upon login.</li><li>Add a new FlexPlugin.loadPlugin(SupervisorTaskCanvasFlexPlugin); invocation and create a new FlexPlugin which adds/replaces the Flex.Supervisor.TaskOverviewCanvas.Content section located on the teams route. (Only available to Supervisors)</li><li>Add Actions.addListener(“afterSelectTaskInSupervisor”, (payload: { sid: string, task: any }) =&gt; {…}) to your new FlexPlugin then subsequently invoke the Twilio.Flex.Manager.getInstance().chatClient.getChannelBySid(userChannelSid).then((channel) =&gt; {...})which you should now get a successful result, and finally set the channelsSid to a variable on the component and simply invoke the resultingchannel.join().then((r) =&gt; {...}); (Which loads everything successfully into Redux for us, from all other users, which happened to be the hardest part for me to figure out initially)</li><li>Lastly, add &lt;MessagingCanvas sid={this.channelSid} autoInitChannel={true} key=’supervisor-overview-canvas-message-canvas’&gt;&lt;/MessagingCanvas&gt; to the render() method of your new FlexPlugin child component and you should be golden!! (i.e. My SupervisorTaskCanvasFlexPlugin.tsx loads my SupervisorTaskCanvasComponent.tsx class, by replacing the Flex.Supervisor.TaskOverviewCanvas, and my replaced component subsequently renders the Flex.MessagingCanvas, passing the selected chat channelSid through, then I simply ultimately subscribe my supervisor user to any chat channel task I click on — or at least that’s the goal when it’s all through)</li></ol><p>Just figured I’d share some of my knowledge on the subject with the world, just in case there are any lost souls out there who are trying to accomplish the same thing themselves… Good luck!!!</p><h3>Gimme the code</h3><p>More elaborate examples of both v1 and v2 full implementations can be found here:</p><p><a href="https://gist.github.com/chase2981/5e3208e46ca747701eeb0219551823a9">https://gist.github.com/chase2981/5e3208e46ca747701eeb0219551823a9</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*yMNeyrsOiy8AmUnSpU-9kg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*hmO-Ny5_QDorLMkvKWf0Gw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*E8kzmSJKmZhJR1Vf4K6pgw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3REfG8Qh4_XvKRQA2hFFlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4F0fWAJqK5PVr5jNs4SXaA.png" /></figure><p>Feel free to give me a 👏 if this story helped you! (That way other people will have a better chance at finding it too!)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33705193f28b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/twilioflex/adding-a-supervisor-chat-transcript-to-twilio-flex-ui-33705193f28b">Adding a supervisor chat transcript to Twilio Flex-ui</a> was originally published in <a href="https://medium.com/twilioflex">TwilioFlex</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to override each call center agent’s full name in Twilio Flex Webchat dynamically]]></title>
            <link>https://medium.com/twilioflex/how-to-override-each-call-center-agents-full-name-in-twilio-flex-webchat-dynamically-28c3f6138dcd?source=rss-ca7857a6a0ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/28c3f6138dcd</guid>
            <category><![CDATA[flex]]></category>
            <category><![CDATA[twilio]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[turbonemesis]]></dc:creator>
            <pubDate>Tue, 05 Feb 2019 05:27:29 GMT</pubDate>
            <atom:updated>2020-04-05T23:13:24.863Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Assign a Friendly Name to Each User In Twilio Flex</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bqjHOGPve5oCSAEqDcvhA.png" /></figure><p>I decided to start writing some documentation of my own on Twilio Flex because I have had troubles finding docs on how to perform certain tasks. In this episode, I’ll cover what it ultimately takes to override the call center agent’s full name to a friendly name across the flex-ui and flex-webchat-ui projects. (Useful for security reasons, so the contact-center agent’s fullname isn’t exposed to the webchat users)</p><p>This task initially took me the better part of two days to track down the ultimate non-djanky solution. I eventually discovered the solution by looking into the minified source-code itself.</p><h3>Requirements</h3><ol><li>We need to do this in a way that doesn’t mess anything else up. (wfo reporting, team view, etc)</li><li>We need to do this in a way that persists after the Webchat and/or the Flex app is reloaded.</li><li>Everytime a user logs into the system, the task-router worker attributes are overwritten by the sso provider, if you have sso setup. Therefore, you will need to add the following logic to your sso handler if you want it to work for future agents, without having to do it all manually.</li><li>By default, the agent’s name throughout the entire Flex app is set using the task-router worker’s full_name attribute</li></ol><h3>Solution</h3><p><strong>If you want to override the agent’s </strong><strong>full_name in webchat for security reasons, like I was tasked to do, then you will also need to set the task-router worker’s </strong><strong>public_identity attribute to the friendlyName of your choosing.</strong></p><p>Walah!! Congrats, you have now successfully overriden the agent’s full_name to a more public-friendly name — the non-djanky way!! It turns out, the source code checks for a public_identity prior to using the agent’sfull_name attribute both in the flex-ui project and within the flex-webchat-ui project by default. That’s all folks!!</p><p>P.s. Please like this story if it helped you, it will help motivate me to continue to write more!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28c3f6138dcd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/twilioflex/how-to-override-each-call-center-agents-full-name-in-twilio-flex-webchat-dynamically-28c3f6138dcd">How to override each call center agent’s full name in Twilio Flex Webchat dynamically</a> was originally published in <a href="https://medium.com/twilioflex">TwilioFlex</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>