Twilio

35 posts

In 2008, Evan, John, and I started Twilio with little more than a to-do list scrawled on the back of a pizza box and an idea that we could democratize communications for developers. We've taken that simple idea, and turned it into an amazing global business. Today, Twilio powers more than 1.7 trillion interactions a year for more than 306,000 customers across the world, producing more than $4 billion in annual revenue. In our most recently reported quarter, we generated nearly 20% free cash flow margin, and added 17 points of non-GAAP operating margin in just 12 months. In 30 quarters as a public company, we’ve met or beat revenue and earnings estimates every single quarter. The time has come for me to pass the reins of this extraordinary company to a new CEO to lead Twilio through its next chapter. Khozema Shipchandler will succeed me as CEO, starting today. Kho knows Twilio inside and out. As CFO, he steered the company through a global pandemic with his trademark steady hand. Later as COO, he scaled Twilio’s systems and processes, creating the controls, mechanisms, and predictability we needed to mature as a company. As the leader of Twilio Communications, he’s pivoted the business toward profitable growth and built strong customer relationships over a short period. And importantly, Khozema is an incredibly humble and inclusive leader who lives and breathes our values - the Twilio Magic. There is no better person than Kho to lead Twilio through its next phase. Over the last fifteen years, we've innovated time after time. We invented the notion of an API-first company, leading the now prevalent developer-economy. Just prior to Twilio’s IPO, we dedicated 1% of our company's equity to create Twilio.org – enabling us to help thousands of nonprofits to change the course of half a billion lives with our products. We invented the CPaaS market, and continually pushed the definition to include more and more – from voice only to messaging, email, contact center, and now customer data and AI. We practically power the digital economy – from startups to the biggest enterprises. In short – the Twilio team has drawn a lot of owls together, and I'm incredibly proud. One of the early Twilio values was to “leave a team as your legacy.” True success for any leader is not defined by what they accomplish as an individual, but by the team they leave behind. This rings true for me today as I think about the thousands of people who have built this company alongside me. Twilio’s mission, to unlock the imagination of builders, is one of the most important ideas in the world. Throughout time, builders have shaped the world we live in. And serving them, Twilio powers their ideas, their ambitions, their businesses and more broadly – the continual inventiveness of humanity in the digital era. Twilio, I can’t wait to see what you all build next. Onward, - jeffiel *This post includes non-GAAP financial measures such as non-GAAP operating margin and free cash flow margin. Important information about the non-GAAP financial measures used herein, including limitations about such measures and reconciliations to the most directly comparable GAAP measure, can be found here and here.

Jeff Lawson, Twilio co-founder1/8/2024

With the introduction of Engagement Suite, Twilio Messaging is enabling a simpler developer experience, improved marketing performance, and better overall engagement with customers. What is Engagement Suite Twilio Messaging Engagement Suite is an innovative group of features and enhanced data for analytics and messaging optimization. For SMS, MMS, and WhatsApp, Engagement Suite helps businesses schedule messages around their customer’s preferred time periods, optimizes shortened hyperlinks for deliverability and clicks, and provides advanced dashboards for A/B testing and granular analysis. All for a single, low premium per message. “[Twilio Messaging] is certainly a better product [than other solutions and] developers appreciate using [it]. They have been positive in any feedback that they’ve given around integration with Twilio [Messaging], using their console, [and] using their APIs.” VP of e-commerce in the food service industry | Forrester TEI Study: The Total Economic ImpactTM of Twilio Messaging Message Scheduling in Engagement Suite Twilio Messaging customers expect to have an amazing developer experience that helps reduce the time and cost associated with building functionalities that are necessary for effective messaging. One such example is scheduling messages for future delivery. Whether used for notifications and alerts, appointment reminders, or marketing, businesses need to ensure their messages are delivered at a time that is compliant with regional regulations, convenient for the recipient, or during periods of less traffic congestion. Message Scheduling in Engagement Suite solves for this need. It enables users to schedule SMS, MMS, or WhatsApp messages with a single API call and forgo the need to use alternative methods such as cron jobs or polling which demands engineer’s time, requires maintenance when schedules are altered, and introduces risks of human error. “Message Scheduling allowed our team to better manage demands on our application - especially during peak times.” Ken Saitow, Co-Founder | RiskWire, LLC With the launch of Engagement Suite, Twilio has also enhanced Message Scheduling to better meet the needs of our customers. Distributions can now be scheduled as soon as 15 minutes away to as far as 35 days away. Previously, the timeframes were 60 minutes to 7 days away. Additionally, our Messaging Insights readily available dashboards have been enriched with advanced data to provide Engagement Suite users with an understanding of the volumes of scheduled messages to be delivered over various time frames as well as assess delivery, errors, latency and more. Link Shortening with Click Tracking in Engagement Suite Engagement Suite also solves the need for businesses to shorten hyperlinks in a manner that increases clicks, reduces carrier filtering, and enables granular analytics like A/B testing. Twilio’s Link Shortening with Click Tracking is an included feature of Engagement Suite and is being introduced into General Availability. With this feature, long URLs in the message body will be automatically detected and shortened at run time of the message send request, which means that there is no need to make separate API calls to shorten the links and then send the message. Businesses also benefit from having their company branded name within the URL which increases trust with customers, improves engagement rates via measurable clicks, and increases deliverability due to reducing the risk of carrier filtering. Just like Message Scheduling, our Messaging Insights out of the box dashboards have been enhanced so that users can easily track the effectiveness of their shortened URL campaigns and view advanced data for A/B testing. Examples of Link Shortening data included are deliverability rates, volumes, clicks, and click-through-rates. “One of the ancillary benefits of using Twilio is that it was easy to set up. I could not have set all this up in a day and a half with any other provider.” Rohit Chandrashekar Principal Software Engineer | JobGet Data and performance analysis with Engagement Suite Engagement Suite delivers the capability to test, measure, and optimize the ROI of SMS, MMS, and WhatsApp communications with advanced data and dashboards. Twilio’s readily available, out-of-the-box dashboards in Messaging Insights provide analytics on every message. With Engagement Suite, the dashboards have been enhanced to display information beyond standard delivery insights to display an understanding of message scheduling and engagement such as clicks and click through rates (CTR). For businesses who wish to tailor their analytics functionality to meet their specific needs, Engagement Suite provides the capability to leverage Twilio Event Streams (available Jan 8, 2024), webhooks or csv downloads from Logs in Console. Whether it’s conducting deliverability optimization, ROI reporting, click tracking, A/B testing, or granular engagement analysis down to the individual recipient, Engagement Suite has the data needed in the format desired! Getting started and pricing for Engagement Suite Getting started with the features in Engagement Suite is simple! If you already have a Twilio account, visit our docs for Messaging Scheduling or Link Shortening with Click Tracking to begin using the services. Alternatively, you can get access to a free trial of Twilio Communications within 30 seconds and if you’d like some guidance or best practices, check out our Guide to Architecting a Messaging Solution for High Deliverability, Resiliency, and Scalability. Once you begin using the features within Engagement Suite, your dashboards within Messaging Insights will automatically include your respective data. Billing will also automatically begin without the need to take any further steps. The charges for Engagement Suite are for successful outbound SMS, MMS, or WhatsApp messages that include 1 or more of Engagement Suite features and the charge will be added to the base message fee. Engagement Suite enables you to try and test the features for free, without risk. You can send up to 1,000 messages per month with Engagement Suite features for free. For usage based pricing beyond the 1,000 free, see our SMS/MMS pricing page or our WhatsApp pricing page. If you expect to send a high monthly volume of messages with Engagement Suite features, we encourage you to discuss pricing with your Twilio Account Team. _____________________________ Build deeper customer relationships at scale with a messaging platform based on trust & compliance, quality & scale, and seamless omnichannel engagement — Twilio Messaging. We can’t wait to see what you build!

Bill Higbee1/4/2024

Customer data platforms (CDPs) and customer relationship management (CRM) solutions are powerful tools for businesses looking to understand customers better and improve the customer experience. But how do you know which is the best fit for your business's needs? Here, we'll explore the key differences between CDPs and CRMs and help you understand which option is best for your business. What is a CDP? A customer data platform is software that cleans, collects, and consolidates customer data from every touchpoint and brand interaction. With customer data in one place, businesses can build complete customer profiles that track an individual’s entire relationship history with a product or service. Then, using those profiles, businesses can use segmentation to understand audiences better and serve more personalized content and campaigns to users. Key features of a CDP include: Collects and unifies data from online and offline sources to provide a complete view of the customer Enforces data quality standards and controls to ensure data accuracy Gives businesses access to actionable data in real time Empowers marketing teams to personalize customer interactions, communications, and experiences What is a CRM? As its name suggests, a customer relationship management tool manages your company’s relationships with customers and prospects. It stores user data, tracks customer-facing interactions (like email, chat, phone calls, meetings, and more), and monitors the progress of sales opportunities. A CRM’s main focus is on sales-related activities, with the goal of helping your team improve customer relationships and grow your business. Key features of a CRM include: Stores user data to help manage customer and prospect relationships Tracks customer interactions and sales activities Helps manage and nurture leads and opportunities to drive sales pipeline What are the main differences between a CDP and a CRM? While CDPs and CRMs may seem quite similar upon first glance, there are some stark differences to note: 1. The type of data each collects The biggest difference lies in the types of data each tool collects. Customer data platforms are responsible for collecting and consolidating user data from all channels and touchpoints. This includes: Personal data, like a customer’s name, contact information, income, job title, and more Behavioral data, like how a customer interacted with your mobile app, website, social media accounts, chatbots, emails, and more Transactional data from past purchases and returns In addition to collecting personal data, CRMs focus primarily on these additional types of data instead: Descriptive data, or information that conveys who a customer is and what motivates them (like hobbies, interests, marital status, business pain points, and more) Lead data, like what stage of the customer journey an individual is in and what their lead status is Qualitative data, or any notes your sales or customer service teams share after a conversation with the customer Quantitative data, or data points that show how an individuals has interacted with your business (like past purchases, product ratings, average order value, and more) Depending on your needs, choose the datasets that would be more beneficial for your employees. 2. The intended users Both systems keep different end users in mind. For example, CDPs help marketers, product teams, engineering teams, and business leaders understand their customers and make better, data-informed decisions. CRMs, by contrast, mainly support sales teams and customer success representatives, helping them win over new business and retain existing clients. 3. The platform purpose While both CDPs and CRM solutions handle customer data, each serves significantly different functions. A CDP aims to manage and understand all customer data. By unlocking a 360-degree customer view, CDPs empower businesses to make data-driven business decisions and build personalized experiences for users. On the other hand, a CRM tracks sales activities and manages customer relationships. By providing a history of every customer’s relationship with your brand, your sales and service teams can tailor their interactions with customers to win over their trust and loyalty. CDP vs. CRM: Which option is best for a business? When it comes to customer data management, companies often face the decision of choosing between a CDP and CRM solution. While both tools can be valuable in helping businesses build better relationships with customers, each has its own strengths that make it more suitable for certain types of businesses and use cases. Here’s a closer look at the benefits of each platform to help you select the best choice for your business and needs. The benefits of a CDP 1. Provides a single source of data Organizations have a mean of 400 unique data sources. Having this data spread across so many systems causes information to be siloed, inaccurate, inconsistent, and unusable for businesses. Luckily, a CDP can help you make sense of the noise. Using identity resolution, a CDP unifies user history across devices and channels to create a single customer view for each user. That gives your entire organization access to all your customer data in one platform, allowing your teams to make data-driven decisions about your customers. 2. Enables dynamic segmentation With unified customer profiles, your business can effortlessly build custom audiences and target customers based on demographic, attitudinal, behavioral, or transactional data. For example, you can build an email campaign to re-engage past purchasers who haven’t shopped with your brand in the last three months. Or you might choose to set up a display ad campaign that targets users with a specific job title to entice them to attend your upcoming industry event. With all your customer data at your fingertips, you can define audience segments quickly and build campaigns in minutes, significantly reducing the time from idea to launch and helping your business engage customers in real time. 3. Makes personalization and targeting effortless Lastly, CDPs help you activate your data. Once you’ve identified your audience segments, you can create and send targeted messages or offers tailored specifically for your users. With a tool like Twilio Engage, you can even design omnichannel campaigns across email, WhatsApp, and SMS—all from a single, consolidated multichannel marketing solution. Plus, CustomerAI Predictions allow you to predict customer behavior in real time and at scale to serve the right message to the right person at the right time. CustomerAI then saves these predictions directly to user profiles, helping your team to build audiences, trigger user journeys, and send data to downstream destinations, like your email service provider and third-party ad platforms. The benefits of a CRM 1. Improves customer service With a running log of all customer interactions with your business, customer service representatives can quickly review a user’s profile to gain the necessary context and insights they need to help a customer resolve their issue quickly and painlessly. Plus, service agents can provide a concise overview of a user's problem and its resolution within their profile. This enables other agents to swiftly review and reference the information if the user calls back with a recurring issue. 2. Increases sales Similar to how it helps customer service representatives, CRMs give salespeople the ability to quickly review every interaction they’ve had with a prospect or client to gain the context they need to personalize their reach outs. Salespeople can also track lead scores and what stage of the customer journey a user falls into to quickly understand whether a lead is hot or cold and what types of content would help them move them further down the sales funnel. Plus, CRMs can help automate sales emails and follow-ups, allowing salespeople to use more consistent messaging that builds trust with prospects. 3. Drives customer retention Better customer service means happier customers and less user churn. CRMs power more personalized service and communications, helping your salespeople and service agents serve your users better. When your users enjoy doing business with your brand, they’re more likely to stick around and be long-time customers. CDP vs. CRM: Which to choose Still wondering which software solution to choose for your businesses? The answer depends on what your business needs most—whether collecting more comprehensive data about your customers to power personalization or managing existing relationships to drive sales. Of course, if your budget allows, you can always use both. CDPs can work alongside your CRM system to enhance your customer data and help your business provide more personalized customer experiences. Here’s how: Advanced data consolidation: A CDP like Twilio Segment can collect customer data from all your different channels and unique customer touchpoints, consolidate it, and send it directly to your CRM. This ensures your CRM has the most up-to-date information about your customers while reducing the chance of data inaccuracies and errors. Enhanced customer profiles: Integrating with your CDP gives your CRM access to unified customer profiles. You can share user interactions, like page views, clicks, and actions taken in your app or on your website, with your sales team to understand customer interests and intent better. Improved personalization: With these in-depth customer profiles, your customer service and sales teams can use your CRM to build more personalized experiences for your customers based on real-time customer behaviors. Two platforms can be better than one. Together, a CDP and CRM solution can enhance your customer data management, unlock more accurate customer insights, and help your teams build more efficient workflows. Of course, having both systems means you can empower all your employees—marketing, sales, customer service, product, and more—to make the best of your customer data. Use a CDP to build more personalized experiences for your users while leveraging the CRM to drive sales and grow your business. Get the most out of your customer data with Twilio Segment Think a CDP is just what your business needs? Twilio Segment is here to help. Our customer data platform helps businesses unlock a complete view of customers, empowering any team to use trusted, insightful data to build one-to-one personalized experiences at scale. Get a Segment demo now to help your business take control of your customer data to build better experiences for your users.

Lyssa Test12/14/2023

Using multiple communication channels is paramount to meeting customers at the right time and at the right place. As businesses grow their channel usage, having to onboard and continuously manage these separate platforms is time consuming. Until now, Twilio, Segment, and SendGrid have been siloed in their login experience, creating frustration with the signup, login, and management process. Now, Twilio has rolled out the first step towards a unified sign-up and login experience across all Twilio products through the new Product Switcher feature. The Product Switcher feature provides Twilio users with the ability to have a single identity and seamless cross-product navigation experience for SendGrid and Segment. Note: This feature will not currently be available for Twilio SSO users or trial accounts. Simplified channel sign-up Existing Twilio customers can now sign up for a new SendGrid or Segment account directly in their Twilio Console. With a unified identity on the Twilio platform, they can use their existing Twilio credentials which reduces friction when onboarding to these products. Users can then log in to SendGrid or Segment with their existing Twilio login. A single Twilio identity A single identity across Twilio reduces the pain and security exposure of managing multiple user identities and passwords. A user will have one set of credentials and will share user settings, including email and two-factor authentication (2FA) setup, for all products being used. User information updates will have to be done only once in a centralized place in the Twilio Console. Existing Segment users will also have the ability to link to their existing Twilio user and decrease the number of passwords to manage. This will be coming soon for SendGrid, too. Please reach out to your SendGrid contact or our support team for manual support. Multi-channel experience Twilio invested in both the Segment customer data platform and SendGrid email platform to provide a multi-channel experience for customers to increase customer engagement. To continue that vision, the single identity across Segment and SendGrid allows customers to seamlessly navigate between these product consoles for ease of use. The Product Switcher will be visible in the respective consoles once your Segment or SendGrid user is linked with Twilio. Your user sessions across these products will be shared with a unified login and logout. Seamless cross-product navigation with Twilio The Product Switcher feature is unique to Twilio and is a big step in connecting the Twilio, SendGrid, and Segment products. Twilio will continue to make it easier for customers to adopt, use, and expand their channels as they scale their communications strategy. Stay tuned for future improvements to ease the use of Twilio Console, Segment, and SendGrid products! To learn more, please visit the Twilio documentation to get started.

Richard Hu12/14/2023

Infrastructure as Code (IaC) has revolutionised the way organisations manage and provision their IT resources, making setups more reproducible, scalable, and maintainable. By treating infrastructure as code, businesses can version, review, and automate the deployment of their infrastructure, much like they do with software applications. This approach not only eliminates the manual and error-prone process of setting up infrastructure but also ensures consistent environments across development, staging, and production. For Twilio users, harnessing the power of IaC through tools like Terraform means quicker and more reliable setups for communication workflows. They can provision and scale Twilio resources on-demand, while ensuring a consistent experience for their end-users. In essence, IaC amplifies Twilio's potential, making it easier to harness its full spectrum of capabilities in an automated and error-free manner. In this tutorial, you'll gain hands-on experience in creating Twilio Serverless functions and configure different environments using industry-leading IaC tool, Terraform. By the end of this guide, you'll be equipped to automate your Twilio infrastructure, enhancing efficiency and reducing the potential for human error in your communication systems Prerequisites Twilio account – Sign up here. Terraform version 1+. Ensure you have Terraform installed, otherwise follow these installation instruction guides. VS Code or your preferred IDE Getting Started Navigate to your preferred terminal and run the following command to create a working folder in your preferred location. mkdir terraform-twilio && cd terraform-twilio touch main.tf provider.tf Navigate to the Twilio Console to create and verify your account on Twilio. When creating the account, state the Twilio project you would like to use, in this case select Serverless. In the resulting dashboard, take a note of the ACCOUNT SID and AUTH TOKEN, which we will use for authenticating locally. Export the following environment variables your terminal with the following command: export TWILIO_ACCOUNT_SID=<your_account_sid> export TWILIO_AUTH_TOKEN=<your_auth_token> If you are on windows, run: set TWILIO_ACCOUNT_SID=<your_account_sid> set TWILIO_AUTH_TOKEN=<your_auth_token> Creating Twilio Serverless using Terraform Now that we have the base setup done, open the project in your favourite IDE and add the following code in the provider.tf file and main.tf file respectively. terraform { required_providers { twilio = { source = "twilio/twilio" version = ">=0.4.0" } } } provider "twilio" { } resource "twilio_serverless_services_v1" "service" { friendly_name = "Demo Service for Terraform & Twilio" unique_name = "TerraformTwilioIntegrationDemo" } resource "twilio_serverless_services_environments_v1" "environment" { service_sid = twilio_serverless_services_v1.service.sid unique_name = "DevelopmentEnvironment" domain_suffix = "com" } resource "twilio_serverless_services_functions_v1" "function" { service_sid = twilio_serverless_services_v1.service.sid friendly_name = "Demo Function for Service" } This Terraform code in the provider.tf file specifies the configuration for the Twilio provider. The terraform provider block acts as a crucial bridge, translating Terraform code into actionable API calls for specific third-party services, such as AWS, Azure, or Twilio. This allows Terraform to seamlessly communicate and manage resources across diverse platforms. Providers encapsulate the specifics of each service, ensuring that Terraform-driven infrastructure remains consistent, readable, and adaptable regardless of the underlying platform or service. The required_providers block within the terraform section declares the providers the configuration depends on. Here, Twilio indicates the use of the Twilio provider. The source attribute points to the official Twilio provider's location, and the version constraint ensures the use of version 0.4.0 or newer. The provider "twilio" { } block is where specific configurations for Twilio would be placed, though it's currently empty. The main.tf file outlines the setup for serverless infrastructure within Twilio. Starting with the creation of a serverless service, it proceeds to configure an environment tailored for that service, culminating in the deployment of a specific function. Through this streamlined configuration, users can effortlessly orchestrate and manage their serverless applications on Twilio. Service creationThis block of code creates a Twilio serverless service resource: resource "twilio_serverless_services_v1" "service" { friendly_name = "Test service" unique_name = "terraform_twilio_demo" } resource "twilio_serverless_services_v1" "service": This tells Terraform that we're creating a new resource of type twilio_serverless_services_v1 and its locally named service in the Terraform state file. friendly_name = "Test service": This is a human-readable name for the service, primarily for your reference. unique_name = "terraform_twilio_demo": This is a unique identifier for the service. It ensures that each service can be distinctively identified within your Twilio account. Environment Configuration This segment configures an environment for the previously created service: resource "twilio_serverless_services_environments_v1" "environment" { service_sid = twilio_serverless_services_v1.service.sid unique_name = "dev" domain_suffix = "com" } resource "twilio_serverless_services_environments_v1" "environment": Initiates the configuration for a serverless environment resource in Twilio. service_sid = twilio_serverless_services_v1.service.sid: This links the environment to the service created in the previous block by referencing its Service ID (SID). unique_name = "dev": Assigns a unique name to this environment, in this case, indicating it might be a development environment. domain_suffix = "com": Specifies the domain suffix for the environment's URL. Function Creation This block sets up a function within the context of our serverless service: resource "twilio_serverless_services_functions_v1" "function" { service_sid = twilio_serverless_services_v1.service.sid friendly_name = "Test Function" } resource "twilio_serverless_services_functions_v1" "function": Declares a new serverless function resource within Twilio. service_sid = twilio_serverless_services_v1.service.sid: This associates the function with the previously created service by referencing its SID. friendly_name = "Test Function": Gives a descriptive name to the function for easier identification. Executing the Terraform Code Before diving into the execution of your serverless function, it's crucial to understand the preparatory steps involved. As you may recall, we previously exported crucial credentials - the Twilio Account SID and Auth Token - which will play a pivotal role in ensuring a seamless connection between our Terraform configuration and the Twilio platform. To kick things off, navigate back to the terminal or command prompt where you previously exported these credentials. The next step involves initializing the Terraform configuration and creating an execution plan. Here's how you can do that: terraform init && terraform plan terraform init: This command initializes your Terraform configuration, preparing the working directory for other commands. It also checks for any required plugins and if they aren't found, it downloads them to your system. terraform plan: Once initialization is complete, this command creates an execution plan. It determines what actions are necessary to achieve the desired state described in your configuration. This step is beneficial as it allows you to review any changes before applying them, ensuring greater control and predictability. The text below shows what to expect after running terraform plan. # twilio_serverless_services_environments_v1.environment will be created + resource "twilio_serverless_services_environments_v1" "environment" { + domain_suffix = "com" + id = (known after apply) + service_sid = (known after apply) + sid = (known after apply) + unique_name = "DevelopmentEnvironment" } # twilio_serverless_services_functions_v1.function will be created + resource "twilio_serverless_services_functions_v1" "function" { + friendly_name = "Demo Function for Service" + id = (known after apply) + service_sid = (known after apply) + sid = (known after apply) } # twilio_serverless_services_v1.service will be created + resource "twilio_serverless_services_v1" "service" { + friendly_name = "Demo Service for Terraform & Twilio" + id = (known after apply) + include_credentials = (known after apply) + sid = (known after apply) + ui_editable = (known after apply) + unique_name = "TerraformTwilioIntegrationDemo" } Plan: 3 to add, 0 to change, 0 to destroy. After reviewing the execution plan, you can proceed to apply the changes to create your Functions service and the Twilio Serverless Function should be visible in the Twilio UI console: terraform apply It's important to mention another critical Terraform command: terraform destroy. This command deletes Terraform-managed resources. Use it with caution, especially when working with resources in a production environment. Wrapping Up Congratulations on making it this far! You've now acquired the skills to harness Terraform as an Infrastructure as Code (IaC) tool to construct Twilio resources. It's essential to note that mastering tools like Terraform not only simplifies and automates infrastructure deployment but also brings consistency and repeatability to your processes. As you continue your journey in the realm of IaC and cloud services, remember to always keep an eye on best practices and the evolving features of both Terraform and Twilio. With this knowledge in hand, you're well-equipped to further streamline and optimise your development and deployment workflows. Happy coding!

Felistas Ngumi12/1/2023

Following on from SIGNAL 2023 (which had plenty of announcements for developers), we hosted SIGNAL London in October, and SIGNAL Singapore in November. These events were in-person only, but if you didn't join us at the events, don't worry. In this post we'll recap the developer content and announcements from CEO and co-founder Jeff Lawson, regional leaders from Europe and Asia-Pacific, guest speakers, Twilio Developer Evangelists, and our robot companion Ameca. Plus, we’ll show you how Twilio is merging large language models (LLMs) with solid, compliant data to create even better customer experiences. At the end of the day, that all boils down to sending better communications. Alright, let’s talk about SIGNAL! Keynotes featured Twilio’s CEO and co-founder Jeff Lawson along with Chief Privacy Officer Amy Holcroft Provide more personalised engagement with CustomerAI and Segment Artificial Intelligence (AI) will revolutionise the internet and also transform how we, as developers, build solutions and tools for customers. AI integrations will be table stakes across the web. You’re probably wondering: how can developers and companies differentiate themselves once AI is everywhere? It all starts with customer data. Typically, customer data is siloed in various databases, data warehouses, and third-party SaaS platforms. To really delight your customers, you need to understand as much as you can from all this data about who they are and how they want you to serve them. This is where Twilio Segment’s customer data platform (CDP) comes in. As the #1 CDP in worldwide market share for the fourth year in a row according to IDC, Segment collects real-time data across channels into unified profiles leading to more personalised customer experiences. And since customer data is most often siloed across dozens of systems, Segment helps build a single view of the customer—without having to write all the ETL (Extract, Transform, Load) operations. With Segment, you can: Gather data from Sources, such as websites or cloud applications Track a complete view of your customers across their journey and deliver personalised experiences using Unify Act on data and learn about your customers in real-time using Destinations When you gather this data about your customers in Segment, you have the opportunity to infuse it into every interaction your company has with its customers. That’s what we do with CustomerAI, a set of capabilities woven throughout all our products that couples the power of LLMs and predictive AI with real-time customer data flowing through Twilio’s Customer Engagement Platform. CustomerAI will help you to truly listen to your customers, interpret the signals they’re sending you across channels, and activate them through personalised experiences for every individual. Now you can inject some of AI’s reasoning ability to enhance your understanding of customers and create more personalised experiences. A more enjoyable customer experience To give you a better picture of what Segment and CustomerAI can do for you, our developer track featured a fictional Party Cookies store in a series of connected demos in which the website, WhatsApp, voice communications, and even Ameca had access to enough contextual information to chat about your recent orders and favourite cookie flavours. Using AI without relevant customer data, the communications are intelligible yet generic. They lack personalization, such as the customer’s name or detail about recent orders, and require the customer to answer follow-up questions to gather more information. When you have access to Segment and CustomerAI, relevant data, traits, and events are available to be passed to other systems and LLMs for a more personalised response. Because the customer’s data profile is already in Segment, we automatically understand the customer’s name and order details and make a prediction about the customer’s intent, creating a truly personalised customer experience with comms and offers which meet the customer's desires. Wouldn’t you much rather shop at a place with an experience like this? Ameca giving attendees an experience of AI-powered communication AI and fraud detection With the rise in popularity of generative AI through models such as OpenAI’s ChatGPT, developers are harnessing the power of AI to help solve challenging problems. While generative AI focuses on making new content, predictive AI uses machine learning (ML) models to excel at decision making. And here at Twilio, we’re using predictive AI to proactively combat fraud. SMS Fraud results in billions of dollars of charges each year at the expense of individual companies. One known attack, called SMS Traffic Pumping (sometimes styled Artificially-Inflated Traffic, or AIT), was projected to result in financial losses of $4.5 billion in 2021. SMS Traffic Pumping is when fraudsters use phone number input fields for one-time passcodes, app download links, or other messages sent via SMS without adequate controls to inflate traffic and exploit your app. Using bots, attackers send thousands of messages controlled by a specific mobile network operator (MNO) to exploit the input field. As a result, the targeted business incurs charges and the attacker receives a share of the generated revenue from the MNO. To combat fraud, such as SMS Traffic Pumping, and improve your SMS one-time passcodes (OTP) conversion, we introduced Twilio Verify Fraud Guard. Fraud Guard uses AI to proactively help detect SMS pumping fraud and prevent attacks. Twilio has data across hundreds of thousands of customers and billions of text messages, and our model can discern good actors from bad actors to proactively block fraudsters. We are so confident about this feature that we offer a 100% guarantee on this Verify feature[1]. Fraud Guard is already paying dividends for our customers. We estimate we saved customers over $30 million in fraudulent charges, blocking over 141 million fraudulent attacks through 7/14/23. Verify Fraud Guard is one of many features to combat SMS Pumping attacks, including SMS Pumping Protection and Lookup SMS Pumping Risk. Currently in public beta, Lookup SMS Pumping Risk provides a risk score for phone numbers and allows you to act on the result—potentially saving you from dealing with SMS Pumping Fraud before it even begins. SMS Traffic Pumping is when fraudsters send multiple messages through an input field then receive a share of the generated revenue. AI and data privacy With the amount of data that companies harvest, it’s no surprise when customers have concerns about data privacy. That’s why at SIGNAL, Twilio announced the adoption of a set of CustomerAI trust principles and privacy ladder framework to guide the responsible development, use, and deployment of predictive and generative AI across all of Twilio’s products and features. Twilio's CustomerAI Privacy Ladder The Segment Privacy Portal takes a proactive approach to privacy. It allows you to gain real-time visibility into what personal information you’re collecting, where you’re collecting it from, and where you’re sending it. Then, you can set up rules to automatically protect it. Privacy Portal gives developers the out-of-the-box ability to identify PII data, create their own identifiers, categorize them, and block incoming event PII data, right at the source. Segment encourages an architecture where you're thoughtful about getting data out, applying a layer of governance, layering privacy controls, and getting your data where it needs to go. Voice Intelligence For many reasons customers will sometimes want to call and speak to a representative from your company. These conversations will naturally be for more complex issues, sometimes multiple themes in a single conversation. To help extract valuable insights and signals from these unstructured conversations, we showed how Twilio Voice Intelligence can be used to transcribe voice calls and use AI-powered language operators to infer intent. Voice Intelligence extracts structured data from unstructured conversations We also showed how to use a newly-completed transcription as a trigger for a Twilio Studio Flow, which gives a low or no-code programming environment to determine which actions to take next based on your operator results. Content Template Builder At SIGNAL London, we were happy to announce the General Availability of the Twilio Content Template Builder.. The Content Template Builder enables you to create and manage rich messaging templates and use them across all supported messaging channels, including SMS, WhatsApp, Google’s Business Messages, and Facebook Messenger. Send engaging rich messages to users no matter where you reach them with the Content Template Builder. New features: Build rich conversational experiences with content templates in Studio Send personalised outbound campaigns and notifications at a future time using content templates sent with Message Scheduling Create content templates with dynamic header text for WhatsApp Combined with Segment and CustomerAI you can make sure your customer communications are as functional as they are helpful. What’s next? For developers at SIGNAL London and SIGNAL Singapore, we created self-paced workshop tutorials on Messaging, Voice Intelligence, Segment, and Studio, all available to explore in your own time. Learn how Twilio can help developers get the most out of AI, rewatch the Developer Keynote from the U.S. event, and catch up on what’s possible to build with Twilio, now available on-demand for free on the SIGNAL platform. We can’t wait to share what’s next! Matthew Gilliard is a Staff Developer Evangelist for Twilio based in the UK, specialising in Java and other JVM languages. When he's not coding you can find him writing about code, at a meetup or other developer event, or at home scaring himself with a horror movie. [1] Terms and Conditions Apply.

Matthew Gilliard11/22/2023

Think about the last time you contacted an organization for help. What was your experience like? Did it feel disconnected, where the contact center agent needed to ask a myriad of questions to understand anything about you and your issue? Or did it feel seamless and efficient, with the agent knowing most of the information already so you could focus on a solution? The difference between these two scenarios is the use of customer data for personalization. More specifically, the difference is organizations that have broken down silos between departments for an uninterrupted flow of customer data throughout the customer journey. But while 90% of organizations claim to have sufficient data for personalization, operational silos impede its effective use. This leads to lost opportunities to increase customer satisfaction and retention*. Think about it: Would you want to continue business with an organization if every interaction felt disconnected? Twilio commissioned Forrester Consulting to learn more about the challenges organizations face when providing personalized experiences through the custom journey. Here’s what they learned.* Read the full study by Forrester Consulting commissioned by Twilio Companies need to better establish customer context to drive personalization Just 5% of leaders believe their teams can provide high levels of personalization across all stages of their customers’ purchase journeys. At this point, having customer data available for personalized experiences is table stakes for contact centers. But many organizations struggle to build a context-rich customer profile to provide that experience. The Forrester study showed that while most companies appear to have sufficient technology and data needed for this, up to 90% reported challenges in delivering impactful, contextual insights in a timely manner.That’s because these insights are strewn across multiple locations within the organizations. Basically, it’s not easy for agents or sales representatives to access this information in a timely manner, if at all. And as a result, businesses are struggling to understand and engage with customers. Disparate data collection, storage, and analysis creates data access challenges However, any business knows that this is easier said than done. The Forrester study found that organizations struggle with unified data collection due to three reasons: Poor integration of customer-related data systems across the whole customer journey Difficulty establishing cross-channel customer context to deliver cohesive, actionable insights at the right time Lack of modern, centralized data platforms hindering personalization insights Let’s dive in deeper with each of these. Customer-related data system integration issues While most organizations are, in fact, collecting the data needed to provide deeply personalized customer experiences, they are doing so across several applications. That means the valuable data that contact centers are collecting isn’t available to the organization’s marketing and sales team, and the reverse is also true. In order to gain a holistic, in-depth understanding of their customers, organizations need these applications to become integrated. Cross-channel customer context difficulties Organizations also collect and store their data across system types, including customer relationship management software (CRMs), customer feedback, analytics, and contact center solutions. And while there isn’t inherently wrong about this, contact center agents and representatives often don't have access to all of this information—especially in real time. Ninety percent of respondents reported to Forrester that greater access to real-time customer data would significantly enhance their company’s capacity to serve their customers. But half of the leaders surveyed said that agents and representatives do not have full access to cross-channel contextual customer data collected and stored across these systems. Need for modern, centralized data platforms When agents and representatives need to switch between applications to gather the data needed for personalization, they lose an average of eight minutes per customer interaction. As in, it takes eight minutes longer to work through any issues customers are presenting. However, organizations have been historically hindered by data across systems, applications, and even between on-premises and cloud solutions. This information needs to be centralized. One way leaders reported unifying this data is with tools such as customer data platforms (CDPs), which centralizes customer data from multiple sources and makes that data available to systems of insight and engagement. Connect the dots with a unified data platform Tools such as a CDP can help unify data across contact centers, sales representatives, and even marketing departments. That unified information can be used to create a thorough customer profile that the organization can use to solidify customer relationships. The Forrester report found that respondents expect improving access to customer data to lead to a myriad of benefits, including: Higher customer satisfaction Higher rate of call resolution Improved agent productivity Higher purchase satisfaction Better sales conversions This leads to empowered customer service and sales representatives. And as a result, loyal customers. Dive in deeper with the Forrester study’s recommendations for businesses seeking to unify data to create more personalized customer experiences by reading the full study here.

Jessica Nath11/20/2023

Spring Boot is the most popular framework for Java applications, and with the Web module enabled is a great way to quickly start building a web app. Both Boot and Web have a lot of preconfigured behaviours to make common tasks easy, and extension points for when you need something custom. In this post we'll look at one such extension point, so that our HTTP endpoint methods need deal only in the types that are meaningful for us, while still converting to HTTP responses correctly. With Spring Web if you return Java objects from methods annotated with @GetMapping or @PostMapping (or the catch-all @RequestMapping), Spring can turn that object into a JSON response automatically. For a lot of cases this is enough - JSON over HTTP is the lingua franca of web APIs. It's not the only game in town though - you might find cases where you want to create a response from a custom Java type and have control over how the response body and headers are generated. This can be the case when working with Twilio as responses to Twilio webhook requests need to contain valid TwiML with an application/xml content type. Let's look at a short method and see 3 different ways to create the same response. Hand-written Responses It's quite possible to return a String from your HTTP-mapped method (which needs to be in a @RestController-annotated class): @RequestMapping(value = "/twiml/hand-written", produces = "application/xml") public String handwritten() { return """ <Response> <Say>Hello hello and welcome</Say> </Response> """; } With multi-line strings (added in Java 15) this doesn't even look too bad, but if you need to build your TwiML dynamically it can get tricky to make sure you're creating valid TwiML, and is laborious to maintain. Object Conversion to String Our Java Helper Library provides a few classes to build response objects programmatically and generate valid TwiML at the end. Sticking with the same example as before: @RequestMapping(value = "/twiml/to-xml", produces = "application/xml") public String toXml() { return new VoiceResponse.Builder().say( new Say.Builder("Hello hello and welcome").build()) .build() .toXml(); } Here we have created a VoiceResponse and called .toXml() to convert it to a String. This is helpful but a couple of problems remain: we have to remember the produces = "application/xml" line on each method, and we have to call .toXml() on the VoiceResponse object which is another thing to remember every time. A more subtle problem is that this method is hard to unit test. By forcing the VoiceResponse into a String our tests will need to rely on fragile string-matching, or use an XML parser to turn the String back into a VoiceResponse. This is untidy, and Spring Web is hugely customizable to enable us to avoid this kind of mess. Can we have Automatic Response Generation? Ideally we would write our method as minimally as possible, like this: @RequestMapping(value = "/twiml/converted") public VoiceResponse converted() { return new VoiceResponse.Builder().say( new Say.Builder("Hello hello and welcome").build()) .build(); } If you add this code Spring will assume you want the VoiceResponse turned into JSON and will do that without hesitation. It's great when you need it, but does not spark joy in this moment. Ideally we could tell Spring that any time we return a VoiceResponse it needs to serialize the object for HTTP by calling the .toXml() method and set application/xml in the headers, and we should only need to say that once, not on every single method. Using Spring's HttpMessageConverter This is precisely what we can do with a MessageConverter: import com.twilio.twiml.TwiML; import org.springframework.http.HttpInputMessage; import org.springframework.http.HttpOutputMessage; import org.springframework.http.MediaType; import org.springframework.http.converter.AbstractHttpMessageConverter; import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.http.converter.HttpMessageNotWritableException; import org.springframework.stereotype.Component; import java.io.IOException; import java.nio.charset.StandardCharsets; @Component public class TwiMLMessageConverter extends AbstractHttpMessageConverter<TwiML> { public TwiMLMessageConverter() { super(MediaType.APPLICATION_XML, MediaType.ALL); } @Override protected boolean supports(Class<?> clazz) { return TwiML.class.isAssignableFrom(clazz); } @Override protected boolean canRead(MediaType mediaType) { return false; // we don't ever read TwiML } @Override protected TwiML readInternal(Class<? extends TwiML> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { return null; } @Override protected void writeInternal(TwiML twiML, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { outputMessage.getBody().write(twiML.toXml().getBytes(StandardCharsets.UTF_8)); } } Our new converter is annotated as a @Component, and extends AbstractHttpMessageConverter<TwiML>. This means that Spring will find the class when scanning the project, and use the methods in this class whenever it needs to convert a matching object to an HTTP response. VoiceResponse is one of the subclasses of TwiML so by using TwiML.class.isAssignableFrom in the booleans supports method we are claiming VoiceResponse and all the other subclasses of TwiML as ours to convert. The actual conversion happens in the writeInternal method, which is a one-liner. The content-type header we need is specified in the constructor. HttpMessageConverters can also read HTTP requests into Java objects but we have no need for that so return false for all requests in canRead and leave the readInternal method as empty as possible (it won't be called unless canRead returns true). That's it - add the TwiMLMessageConverter to your project and all your TwiML responses will be automatically converted to XML and have the right header set. Note that this is best used purely for creating correctly formatted responses, although you could do any kind of manipulation to the object before you write the response, this converter is not the place for extra database calls or other business logic. Are you building with Twilio and Java? I'd love to hear from you at mgilliard@twilio.com

Matthew Gilliard11/20/2023

In a surprise announcement, Apple shared that it plans to offer support for the Rich Communication Services (RCS) Universal Protocol in 2024. While that means that Android and Apple users messaging one another will finally get closer to a more modern messaging experience than SMS (which just celebrated its 30th birthday last year), it likely has no immediate impact on the world of business messaging. If you’ve ever texted with an Android user on an iOS device, you’ve likely noticed the green and blue bubbles, the inability to “react” to messages, lower-resolution images, lack of read receipts, and more. That’s because Android and iOS devices support different data-based messaging services. To navigate that lack of interoperability, the unsupported message type is delivered over SMS or MMS. This change means a greater level of interoperability between devices and will likely make texting friends a little more engaging. However, it’s not going to change the green and blue bubble dynamic, and it won't offer Android users the ability to send iMessages. Why the differences between consumer and business messaging matter So, what does this mean for business messaging? Nothing, just yet. But, it does show promise for the future of rich messaging. While this announcement only impacts the person-to-person experience (P2P), businesses and consumers engage over application-to-person (A2P) channels. While it can seem like alphabet soup, RCS is the P2P messaging option supported on Android devices, and iMessage is the P2P protocol for iOS devices. Both Android and Apple also offer business messaging or A2P options – RCS Business Messaging (RBM) and Apple Messages for Business, respectively. Much like the world of A2P SMS, these A2P and P2P versions of these channels represent different technologies with different requirements and feature support. Like other over-the-top (OTT) messaging channels, both Apple and Android support branded profiles, read receipts, and other rich messaging features, but they still don’t have the reach of channels like SMS, MMS, or even other OTT channels like WhatsApp (in part because they only serve a portion of the device market). Even with this announcement and move toward P2P interoperability, the world of business messaging remains complex. And that’s before we take into account the unique preferences of consumers all around the world. The inconsistent feature functionality, opt-in requirements, use of phone numbers as identities on some and user IDs on others, and reliance on developers to incorporate these new technologies into applications, has made it hard for businesses to fully embrace a multichannel rich messaging experience across use cases. Doing so is developmentally challenging, and committing resources to a truly multichannel experience is a leap of faith. Preparing for increased adoption of OTT channels That’s not to say this isn’t a big deal – it is. The level of attention this announcement is getting is a recognition of the desire for richer messaging experiences. Since business messaging innovation tends to follow consumer messaging innovation, there’s huge potential for greater adoption of rich messaging in the A2P world. GSMA estimates we’ll see 6.3 billion mobile subscribers by 2030 – and since many of us are attached to our phones, that’s billions of opportunities for businesses and organizations to engage consumers wherever they are. As channels mature into entire digital ecosystems with ads, shopping, and more, businesses can create engaging, one-click experiences that don’t require consumers to switch apps. Consumers are excited about that future, too. Our Conversational Messaging Trend Report found 77% of consumers want to use conversational messaging to get help with selecting a product or service and 58% would use messaging channels to purchase a product or service if they had the option. The rapid innovation and adoption of AI and large-language models gives businesses even more ways to engage in personal ways, at global scale. That’s why partnering with the right customer engagement platform matters. To fully embrace the increased adoption of AI and rich communications, platforms need to offer multichannel APIs that give businesses confidence that their applications are future-proofed for new channels and functionality. They should also offer ways for both developers and technologists to build and manage templates across those channels without needing to build against the specific channel functionalities. And, that provider should also offer easy integrations and native support for tools that power self-service interactions, since rich messaging can result in as much as a 10x increase in engagement from consumers. While Apple’s announcement may not have a direct impact on business messaging, it’s exciting to see what the future will hold for digital interactions as the world continues to embrace new channels, new AI technology, and prioritize investment in customer engagement to drive loyalty.

Dave Esber11/17/2023

With traditional password-based logins, users often need to go through a "password reset" process when they forget their credentials. This creates an additional step and potential vulnerability. Not only does it introduce security risks, but it can also sabotage user experience by requiring frequent password resets. That's where “magic link authentication” comes to the rescue. Magic Link Authentication is a passwordless login method that allows users to access your application by clicking a unique link sent to their email. It eliminates the need to remember passwords and provides a secure and user-friendly way to verify user identity. In this blog post, you will build a passwordless authentication system using Next.js 13 (with the new app router), SendGrid, and Auth.js. With this system, users can access your application by simply clicking on a link sent to their email. Prerequisites In order to follow along with this tutorial, you will need the following: A SendGrid account - Sign up here to send up to 100 emails per day completely free of charge Node.js Installation Setting up the project Start by creating a new Next.js 13 project using the following command: npx create-next-app@13.4 magic-link-auth You will be prompted to select settings for the new project, make sure to follow these choices: For TypeScript, select No because this tutorial uses JavaScript. Feel free to choose any option for enabling ESLint. Choose Yes for Tailwind CSS. Exclude the src/ directory by selecting No, which is the default option. Enable App Router by selecting Yes, which is the recommended option. Lastly, select No for import alias configuration. Change the working directory to your new Next.js project, magic-link-auth, and run the application to make sure everything is fine: cd magic-link-auth npm run dev Building the Homepage and Sign in Page Before you start building the Homepage and Sign in page for this demo application, here’s an example of how routing works in Next.js 13’s new app directory: app ├── signin │ ├── page.js ├── layout.js ├── page.js Next.js 13 uses a router where folders are used to define routes. A special page.js file is used to make the route segment, which maps to a URL, publicly accessible, so the app/signin/page.js defines the UI for the /signin route. The app/page.js file in your project defines the UI for the / route. Open up the newly created project directory on your preferred IDE and replace all the code in the app/page.js with the following code: 'use client' import { useRouter } from "next/navigation"; export default function Home(context) { const router = useRouter() return ( <main> <div className="container px-5 py-24 mx-auto flex flex-col justify-center items-center text-center"> <h1>Homepage</h1> <button onClick={() => router.push('/signin')}>Sign in with Email</button> </div> </main> ) } (You can also remove all the code from global.css except the first three lines of code.) Now, if you go to the / route of your application, you should see “Homepage” written at the center of the screen and below it, a button which says “Sign in with Email”. If you click on it, it should navigate to the /signin route. But you don’t have it yet in your application. Create a new folder in the /app directory called signin and within it a new file called page.js with the following code: 'use client' export default function Signin() { return ( <main> <div className="container px-5 py-24 mx-auto flex justify-center"> <div className="bg-slate-100 rounded-lg p-8 flex flex-col w-1/2 mt-10 md:mt-0 relative z-10 shadow-md"> <h2 className="text-gray-900 text-lg mb-1 font-medium title-font">🌐 Magic Link</h2> <p className="leading-relaxed mb-5 text-gray-600">Sign in by clicking a link in the email</p> <div className="relative mb-4"> <label className="leading-7 text-sm text-gray-600">Email</label> <input type="email" id="email" name="email" className="w-full bg-white rounded border border-gray-300 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 text-base outline-none text-gray-700 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out" /> </div> <button className="text-white bg-blue-500 border-0 py-2 px-6 focus:outline-none hover:bg-blue-600 rounded text-lg">Log in / Sign up</button> </div> </div> </main> ) } If you go the /signin route of your application you should see a dialog box which prompts the user to input email for signing in. Setting up NextAUTH NextAUTH is a powerful authentication library specifically tailored for Next.js. Open a new tab on your terminal and enter the following command to install the next-auth and nodemailer packages: npm install next-auth nodemailer Create a new file named route.js within the directory structure app/api/auth/[...nextauth], (you will need to create these three nested folders), and add this code: import NextAuth from "next-auth/next"; import EmailProvider from "next-auth/providers/email"; const authOptions = { providers: [ EmailProvider({ server: { host: process.env.EMAIL_SERVER_HOST, port: process.env.EMAIL_SERVER_PORT, auth: { user: process.env.EMAIL_SERVER_USER, pass: process.env.EMAIL_SERVER_PASSWORD, } }, from:process.env.EMAIL_FROM, }) ], pages: { signIn: '/signin', }, session: { strategy: 'jwt', }, jwt: { secret: process.env.NEXTAUTH_JWT_SECRET, }, secret: process.env.NEXTAUTH_SECRET } const handler = NextAuth(authOptions) export { handler as GET, handler as POST }; Here, the authOptions object defines the authentication options and settings for NextAuth handler. providers is an array that specifies the authentication provider(s) to use. In this case, it's using the EmailProvider for email-based authentication. Wrap all your components with a SessionProvider NextAuth.js handles user authentication as well as session management. To ensure that all components or pages in your application have access to session-related data you need to wrap all your components in layout.js with a SessionProvider. In Next.js, a layout is UI that is shared between routes. The root layout (app/layout.js) is the top-most layout in the root app directory and is used to define the <html> and <body> tags and other globally shared UI. SessionProvider is a component provided by the NextAuth.js library that helps manage user sessions and authentication state in your application. When a user successfully authenticates through one of these providers, the SessionProvider helps manage the user's session and provides access to their authentication state and user data. But when you try to use SessionProvider directly within the body of layout.js, it might not work as expected because the client-side context is not available at that point in the HTML structure. You can use a work-around. Create a folder named components within the app folder and then create a file named Provider.js in the app/components directory. It will work as a custom Provider component that wraps the SessionProvider. When you use this Provider component to wrap your children, it effectively ensures that the SessionProvider is used on the client side. Add this code to Provider.js: 'use client' import { SessionProvider } from "next-auth/react" const Provider = ({children}) => { return <SessionProvider>{children}</SessionProvider> } export default Provider; Now within the layout.js file, update the RootLayout() function by importing the Provider component and wrapping the {children} with <Provider></Provider>: import './globals.css' import { Inter } from 'next/font/google' import Provider from './components/Provider' const inter = Inter({ subsets: ['latin'] }) export const metadata = { title: 'Magic Link', description: 'Passwordless Authentication System using Nextjs 13, SendGrid and NextAUTH', } export default function RootLayout({ children }) { return ( <html lang="en"> <body className={inter.className}> <Provider> {children} </Provider> </body> </html> ) } While you are at it you can also modify the metadata of your app in layout.js. You’ll need to define the following environment variables in your .env file in the root directory of your project: EMAIL_SERVER_HOST= EMAIL_SERVER_PORT= EMAIL_SERVER_USER= EMAIL_SERVER_PASSWORD= EMAIL_FROM= NEXTAUTH_JWT_SECRET="NEXT-JWT-SECRET" NEXTAUTH_SECRET="NEXT-SECRET" NEXTAUTH_URL=http://localhost:3000/ DATABASE_URL= If you don’t already have a .env file in the root of your project directory, create one and paste the above code snippet inside it. To set the values of these variables you need to get the API key and other information from your Twilio SendGrid account which you’ll see in the section. Preparing the SMTP Server using Twilio SendGrid SMTP stands for Simple Mail Transfer Protocol. It is a standardized protocol used for sending and receiving email messages between email servers. For your magic link authentication system to work seamlessly, you need a reliable email delivery service. Twilio SendGrid is an excellent choice for this purpose. Go to the SendGrid website. For this tutorial, select a free plan, provide required details, and sign up! After signing up, navigate to the Dashboard, and on the left sidebar go to : Settings > Sender Authentication. Perform the sender authentication (single sender verification in this case) by verifying your email address. After verification, create a new sender by filling in the required details. Once the verification is done, add that email to the .env file in your application as the value for EMAIL_FROM. In your SendGrid Dashboard on the left sidebar, select Email API > Integration Guide. You will find two options: Web API and SMTP Relay. Select SMTP Relay. Create an API key by entering a name for your first API key, you can set it as “apikey” for this tutorial. You should get your API key which starts with “SG”. Copy your newly created API key immediately and paste it as the value of EMAIL_SERVER_PASSWORD in your .env file. Here are the values you should be adding for the rest of your environment variables: EMAIL_SERVER_HOST=smtp.sendgrid.net EMAIL_SERVER_PORT=465 EMAIL_SERVER_USER=apikey EMAIL_SERVER_PASSWORD="add sendgrid api key here" EMAIL_FROM="add the email your verified here" NEXTAUTH_JWT_SECRET="NEXT-JWT-SECRET" NEXTAUTH_SECRET="NEXT_SECRET" NEXTAUTH_URL=http://localhost:3000/ DATABASE_URL= You can use those values for NEXTAUTH_JWT_SECRET and NEXTAUTH_SECRET as placeholders during development or as part of your initial configuration, but it's crucial to replace them with secure and unique values in a production environment. The last empty environment variable you have in your .env file is DATABASE_URL, you will take care of that in the next section. Integrating MongoDB Database You can use MongoDB to store user data, authentication tokens, and session information. To connect your Next.js application with a MongoDB database, all you need is a connection string. There are two ways to set up a MongoDB cluster and acquire a connection string. The first option is to host your MongoDB cluster in the cloud using MongoDB Atlas. The second option is to host MongoDB locally on your development machine, which is suitable for testing and development purposes. Paste the connection string for your mongodb database in your .env file as the value for DATABASE_URL, it should look something like this: “mongodb+srv://username:password@cluster0.bmw9merc.mongodb.net/” Next, navigate to your terminal and install mongodb and mongodb adapter in your project: npm install @auth/mongodb-adapter mongodb Add the MongoDB client The MongoDB adapter does not handle connections automatically, so you will have to make sure that you pass the adapter to the MongoClient that is connected already. Create a folder called lib within app/api/auth/[...nextauth] and within the lib folder create a file called mongodb.js and add this code (this is directly taken from the Auth.js documentation): import { MongoClient } from "mongodb"; if (!process.env.DATABASE_URL) { throw new Error('Invalid/Missing environment variable: "DATABASE_URL"'); } const uri = process.env.DATABASE_URL; const options = {}; let client; let clientPromise; if (process.env.NODE_ENV === "development") { // In development mode, use a global variable so that the value // is preserved across module reloads caused by HMR (Hot Module Replacement). if (!global._mongoClientPromise) { client = new MongoClient(uri, options); global._mongoClientPromise = client.connect(); } clientPromise = global._mongoClientPromise; } else { // In production mode, it's best to not use a global variable. client = new MongoClient(uri, options); clientPromise = client.connect(); } // Export a module-scoped MongoClient promise. By doing this in a // separate module, the client can be shared across functions. export default clientPromise; This code sets up and exports a MongoDB client instance, checks for the DATABASE_URL environment variable, sets connection options, and manages the client instance. The exported clientPromise resolves to the connected MongoDB client, ensuring that the application can establish connections to the MongoDB database. Configure NextAUTH for MongoDB Finally you need to configure NextAuth.js to use MongoDB as the authentication data store and provide access to the MongoDB client. Add imports for the Mongodb adapter and clientPromise at the top of your route.js file in your app\api\auth\[...nextauth] directory: import { MongoDBAdapter } from "@auth/mongodb-adapter"; import clientPromise from "./lib/mongodb"; Add this configuration in the authOptions object, just above the providers array: adapter: MongoDBAdapter(clientPromise), Final Steps Now that you have set up NextAUTH, Sendgrid and MongoDB, you just need to implement NextAUTH methods in your /signin and / routes. Sign in page In your app/signin/page.js make the following imports: import { signIn } from "next-auth/react"; import { useState } from "react"; And add this just above the return statement within the SignIn() function: const [email, setEmail] = useState(''); Here, you're using the useState hook to create an email state variable and an associated setEmail function. This state will be used to manage the value entered into the email input field. Replace the existing input element within SignIn() with the following input element: <input onChange={(e) => setEmail(e.target.value)} type="email" id="email" name="email" className="w-full bg-white rounded border border-gray-300 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 text-base outline-none text-gray-700 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out" /> The <input> element for the email address is modified to include an onChange event handler. When the user types into the input field, the onChange event handler is triggered, and it updates the email state variable with the current input value using setEmail(e.target.value). This ensures that the email input value is dynamically tracked as the user types. Then, replace the button element with the following to add an onClick event handler to the “Log in/ Sign up” button: <button onClick={() => signIn('email', {email, callbackUrl:'/'})} className="text-white bg-blue-500 border-0 py-2 px-6 focus:outline-none hover:bg-blue-600 rounded text-lg">Log in / Sign up</button> When the "Log in / Sign up" button is clicked, it triggers the signIn function from NextAuth.js. It specifies the 'email' provider, indicating that the user intends to sign in or sign up using their email address. The email state variable holds the value entered by the user in the email input field, and callbackUrl is set to '/' as the destination URL after authentication. Homepage In this section, we will be making modifications to the homepage of our Next.js application. Start by adding the following imports to your app/page.js file: import { signOut, useSession } from "next-auth/react"; Just above the return statement add: const {data: session} = useSession(context) The useSession hook is used to retrieve session data from the context. This data includes information about the authenticated user, such as their email. Then, replace the button element below h1 element with: {session && <> <div> <p>Signed in as {session.user.email}</p> <button onClick={signOut}>Sign Out</button> </div> </>} {!session && <> <button onClick={() => router.push('/signin')}>Sigin with Email</button> </> } Here, conditional rendering is used based on the presence of a “session”. A session refers to the authenticated user's state and the associated data that is stored for that user during their authenticated session. If a session exists, the homepage displays the user's email and a "Sign Out" button. When the "Sign Out" button is clicked, it triggers the signOut function to log the user out. If there is no session, it displays a "Sign in with Email" button. Test your work Save and close all your files. In your command prompt, navigate to your project’s root folder, magic-link-auth. Run the following command to start your local server: npm run dev Once your app is running, head to your browser and visit localhost:3000 (or whatever your port is), and click on Signin with Email, you should see the signin route: Type your email and click on the blue Login button: You should see this message on the screen: Check the inbox of your email and you should get a login link: When you click on the “Sign in” button on that email, you will be authenticated and a new user will be created in your mongoDB database. You will be redirected to the “/” route and should see the email that you signed in with written on the screen: If you click on “Sign Out” your user session will end and the Homepage components will reload to display the “Sign In” button. Conclusion Congratulations! You have successfully created a magic link authentication system using Nextjs 13, NextAUTH and SendGrid. The source code for this project can be found here: Magic Link Authentication. What’s next? Add features in the home page Improve upon the design of the application. Create a custom “Email Sent” Notification page. Avinash Prasad is a Software Developer and Content Creator. He has a passion for simplifying complex technical topics, making them accessible to a wide audience. He is the host of DevStories podcast. He can be reached via email and Twitter.

Avinash Prasad11/14/2023

In light of the recent announcement that as of November 8, 2023, verification will be required for all Restricted (formerly called “Unverified”) toll-free phone numbers before they can be used for messaging, here’s a developer’s guide on toll-free registration using the Messaging Compliance API. As an alternative method of registration (via UI), you can submit your verification directly from the Twilio Console by following our Console onboarding guide. However, the Messaging Compliance API is better suited for handling large quantities of registrations and seamlessly integrating into existing application workflows. What is happening? The messaging industry, along with Twilio, is continuing its shift towards a more compliant and transparent ecosystem to protect users from bad actors, spam, and unwanted communications. With Trusted Communications, Twilio is committed to partnering with the industry to build this trusted ecosystem so consumers are more likely to engage with legitimate messages from businesses and organizations. Once submitted, toll-free numbers enter a Pending state and will continue having sending limits; however starting January 31, 2024, messages sent through a Pending toll-free number will be blocked and subject to messaging fees. The following are the current sending limits (not guaranteed maximums and are subject to change) for Pending numbers: Daily: 2,000 message segments Weekly: 6,000 message segments Monthly: 10,000 message segments What is a Message Segment? Every builder is required to comply with these requirements. Although we understand that this process introduces friction and can slow you down, it’s one of the ways we work to ensure messages are protected from spam and bad actors. Taking these steps will enable you, as developers, to continue building and innovating with messaging. What number type should developers be using? Twilio offers a range of phone number types, each with its own capabilities and use cases. 10DLC, or 10-digit long codes, are standard phone numbers with messaging and voice capabilities. These numbers are great for use cases where localized, personalized communication is valued as 10DLC provides you with a local identity. These numbers offer high throughput and high delivery rates and are typically meant for individuals or businesses. Toll-free numbers are also 10-digit phone numbers but they usually start with something like 1-833 or 1-888. They are great for universal brand identity and in the past were suited for support/sales lines but expanded their reach by supporting 2-way messaging, promotions, and notifications. Toll-free numbers are designated for medium/large business messaging and are not meant to be used for hobbyist developers. If you are a student, hobbyist developer, or someone trying out Twilio messaging, we are exploring various solutions for you. One possibility is a Virtual Phone experience within the Twilio Console. More details will be provided closer to the launch. If you are a business owner or ISV, you might consider 10DLC or toll-free, depending on your business needs (use case, deliverability requirements, etc). I’m getting an error code (30032), what does that mean? After sending a message with a toll-free number, you might get the error code (30032): Toll-free Number has not been verified. This could mean: Your toll-free number has not been verified Your toll-free verification request was rejected To avoid this, submit your toll-free number for verification with the Messaging Compliance API, guidance in the following section. I’m getting an error code (30007), what does this mean? After sending a message with a toll-free number, you might get the error code 30007. This could mean: Your toll-free phone number has been verified, but the message was filtered as spam Your toll-free phone number has been submitted for verification (i.e. pending), but the message was filtered as spam How do developers use the Messaging Compliance API for Toll-Free verification? Option 1: Submit a Toll-Free Verification Request without a Customer Profile Note: If you are an ISV (Independent Software Vendor), you’ll need to create a TrustHub primary Customer Profile for your business (not your customer's) and be in an APPROVED state. Additionally, for each of your submissions, you need to provide your end-business (not your own) information as part of the submission. Toll-free verifications with ISV info will be rejected. If you set up your customers using an approved secondary Customer profile, you can then skip to Option 2: Submit a Toll-Free Verification Request with a Customer Profile. To create a toll-free verification record, make a POST request to the API endpoint: https://messaging.twilio.com/v1/Tollfree/Verifications Code snippets will be presented in cURL, however, the Messaging Compliance API supports other common server-side SDKs, each accompanied by relevant code samples. If you have not created a Customer Profile, your request will need the required parameters and may look like this: curl -X POST "https://messaging.twilio.com/v1/Tollfree/Verifications" \ # Business Address should be the business' physical location \ --data-urlencode "BusinessStreetAddress=123 Main Street" \ --data-urlencode "BusinessCity=Anytown" \ --data-urlencode "BusinessStateProvinceRegion=AA" \ --data-urlencode "BusinessPostalCode=11111" \ --data-urlencode "BusinessCountry=US" \ --data-urlencode "BusinessContactFirstName=firstname" \ --data-urlencode "BusinessContactLastName=lastname" \ --data-urlencode "BusinessContactEmail=email@company.com" \ --data-urlencode "BusinessContactPhone=+1231231234" \ # Business Name is the end business the customer is engaging with \ --data-urlencode "BusinessName=Owl, Inc." \ # Business Website is the end business website, business social media links are acceptable \ --data-urlencode "BusinessWebsite=http://www.company.com" \ --data-urlencode "NotificationEmail=support@company.com" \ # Use Case Categories cover one or more values that work best for the message traffic pattern. Make sure these match one of the allowed enums - see highlighted values. \ --data-urlencode "UseCaseCategories=ACCOUNT_NOTIFICATIONS" \ --data-urlencode "UseCaseCategories=MARKETING" \ # Use Case Summary explains how the message will be used by the business \ --data-urlencode "UseCaseSummary=This number is used to send out promotional offers and coupons to the customers of John's Coffee Shop" \ # Production Message Sample is a sample message the end business will send. It should match the Use Case Category. \ --data-urlencode "ProductionMessageSample=lorem ipsum" \ # Opt-In Image URLs should demonstrate where the end-user opts in to your message \ --data-urlencode "OptInImageUrls=https://zipwhiptestbusiness.com/images/image1.jpg" \ # Opt-In Type should outline how end users provide consent to receive messages. Make sure these match one of the allowed enums - see highlighted values. \ --data-urlencode "OptInType=VERBAL" \ # Message Volume is the estimated volume you expect \ --data-urlencode "MessageVolume=10" \ --data-urlencode "TollfreePhoneNumberSid=PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN Explore more and find examples of the request parameters in our detailed guide on Toll-Free Verification request parameters. Option 2: Submit a Toll-Free Verification Request with a Customer Profile Note: If you are an ISV (Independent Software Vendor), you’ll need to create a TrustHub primary Customer Profile for your business (not your customer's) and be in an APPROVED state. Additionally, for each of your submissions, you need to provide your end-business (not your own) information as part of the submission. Toll-free verifications with ISV info will be rejected. If you set up your customers using an approved secondary Customer profile, you can then skip to Option 2: Submit a Toll-Free Verification Request with a Customer Profile. If you are an ISV submitting your Customer’s Profile, and you’ve already created a profile for them at Twilio, you can re-use it here. This is best for ISVs who have created Secondary Customer Profiles at Twilio which are well-supported across products. Your verification request will require different parameters, notably the Customer Profile SID. To retrieve the Customer Profile SID, make a GET request like so: curl -X GET 'https://trusthub.twilio.com/v1/CustomerProfiles' \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN Copy the Customer Profile SID (String starting with BU), from the response, and save it for later. { "sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "policy_sid": "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "friendly_name": "friendly_name", "status": "draft", "valid_until": null, "email": "email", "status_callback": "http://www.example.com", "date_created": "2019-07-30T22:29:24Z", "date_updated": "2019-07-31T01:09:00Z", "url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "links": { "customer_profiles_entity_assignments":"https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments", "customer_profiles_evaluations":"https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations", "customer_profiles_channel_endpoint_assignment":"https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments" } } Using the copied Customer Profile SID from the previous request, make a new API request to the Verifications endpoint: curl -X POST "https://messaging.twilio.com/v1/Tollfree/Verifications" \ # Customer Profile SID should be in an APPROVED state \ --data-urlencode "CustomerProfileSid=BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ --data-urlencode "BusinessName=Owl, Inc." \ --data-urlencode "BusinessWebsite=http://www.company.com" \ --data-urlencode "NotificationEmail=support@company.com" \ --data-urlencode "UseCaseCategories=ACCOUNT_NOTIFICATIONS" \ --data-urlencode "UseCaseCategories=MARKETING" \ --data-urlencode "UseCaseSummary=This number is used to send out promotional offers and coupons to the customers of John's Coffee Shop" \ --data-urlencode "ProductionMessageSample=lorem ipsum" \ --data-urlencode "OptInImageUrls=https://zipwhiptestbusiness.com/images/image1.jpg" \ --data-urlencode "OptInType=VERBAL" \ --data-urlencode "MessageVolume=10" \ --data-urlencode "TollfreePhoneNumberSid=PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN Status of your Toll-Free Verification Request After your POST, in either scenario, you’re response may look like this: { "sid": "HHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "regulated_item_sid": null, "customer_profile_sid": null, "trust_product_sid": null, "status": "PENDING_REVIEW", "date_created": "2021-01-27T14:18:35Z", "date_updated": "2021-01-27T14:18:36Z", "business_name": "Owl, Inc.", "business_street_address": "123 Main Street", "business_street_address2": null, "business_city": "Anytown", "business_state_province_region": "AA", "business_postal_code": "11111", "business_country": "US", "business_website": "http://www.company.com", "business_contact_first_name": "firstname", "business_contact_last_name": "lastname", "business_contact_email": "email@company.com", "business_contact_phone": "+1231231234", "notification_email": "support@company.com", "use_case_categories": [ "ACCOUNT_NOTIFICATIONS", "MARKETING" ], "use_case_summary": "This number is used to send out promotional offers and coupons to the customers of John's Coffee Shop", "production_message_sample": "lorem ipsum", "opt_in_image_urls": [ "https://zipwhiptestbusiness.com/images/image1.jpg" ], "opt_in_type": "VERBAL", "message_volume": "10", "Additional_information": null, "tollfree_phone_number_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "rejection_reason": null, "error_code": null, "edit_expiration": null, "resource_links": {}, "url": "https://messaging.twilio.com/v1/Tollfree/Verifications/HHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "external_reference_id": null } In the request without a Customer Profile, for the response customer_profile_sid will be null as it’s an asynchronous process. You’ll get a webhook and an email with the customer_profile_sid. In the response, you’ll see a status for your verification. To monitor this status, make a GET request with the Toll-Free number used for verification: curl -X GET 'https://messaging.twilio.com/v1/Tollfree/Verifications?TollfreePhoneNumberSid=PNXXXXXXXXX' \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN Here’s an overview of each verification status from the API: Verification Status Toll-Free Phone Number Traffic Traffic Limits PENDING_REVIEW Restricted Starting on November 8, 2023, ALL Restricted traffic will be blocked. IN_REVIEW Pending Verification Sending Limits (not guaranteed) Daily: 2,000 message segments Weekly: 6,000 message segments Monthly: 10,000 message segments. TWILIO_APPROVED Approved 3 SMS segments per second by default, but can be increased. TWILIO_REJECTED If re-submittable, Pending. If not re-submittable, Blocked. If after the 7-day resubmission response window, Restricted Blocked. Additionally, you can list all Toll-Free verification records and view their status by making a GET request to the Verifications endpoint with an optional PageSize parameter: curl -X GET "https://messaging.twilio.com/v1/Tollfree/Verifications?PageSize=20" \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN In addition to making requests for monitoring the verification status, you can receive status updates through emails or get notified via webhooks through Event Streams. Rejected Verifications or Error Codes If your Toll-Free verification request has been rejected, you can edit and re-submit the verification depending on the returned error code. It's best to edit and resubmit within 7 days. Alternatively, you can delete the verification submission in the Twilio Console. The Future of Trusted Communications This November 8, 2023 date when all messages sent from Restricted (or “Unverified”) toll-free phone numbers will be blocked is the next step towards a fully verified and trusted messaging ecosystem. As the messaging and communications ecosystem continues to change around the world, Twilio is dedicated to creating a trusted and compliant ecosystem for our customers. For additional information, please reference our Docs on Toll-Free Verification API Onboarding.

Twilio10/30/2023

Billions of customers start their purchasing journeys by doing online research using Google Search or seeing an ad on their Facebook timeline. It’s no surprise that over 47% of digital ad spend is on Google and Meta platforms to capture the eyes of these potential customers. But are you converting ad impressions into sales and engagements with your company? Google’s Business Messages and Facebook Messenger represent key channels that many customers are already familiar with, so they should be part of your engagement experience. We are delighted to announce that Twilio Flex now provides native integrations* for Google’s Business Messages and Facebook Messenger, configurable directly from the Twilio Flex Console and requiring zero code. This simplifies the addition of Google’s Business Messages and Facebook Messenger into your customer communication strategy by enabling your teams to quickly switch between channels in Twilio Flex’s single user interface. No-build setup Facebook Page and Google Business Account linking, channel address setup and Studio and TaskRouter routing are all configured by Admins in Twilio Console Rich experience Flex UI v2.4 adds native Agent UI support for these channels, including the ability to send and receive attachments Live and historic data Supervisors can monitor tasks in real time on dashboards and review completed activity stats in Insights reports. *Integrations are in Public Beta Engage directly from Google Search and Map results Google (and Google Images) currently holds 92.58% of the total search engine market share. In a competitive digital landscape, you can differentiate your business by enabling customers to engage directly from the search results. Google’s Business Messages provide customers a way to ask a virtual agent questions and receive responses quickly. Your team is able to use Twilio Flex to re-engage within 30 days of their initial outreach using rich text and images to provide additional value to their experience. Take the friction out of engagements by meeting customers where they already are. Communicate directly with customers from Facebook Ads or Pages Facebook is used by over 3 billion people worldwide. It enables your business to promote product offerings and provide a place where customers can gather to build valuable brand communities. A key aspect of building a brand community is communication, with 74% of online adults saying they feel more connected with a business when they can message the business directly. Twilio Flex allows you to connect directly with your customers through Facebook Messenger to remove friction from engagements and to encourage dialogue. Transform your digital engagement with omnichannel Having the flexibility and control to meet your customers where they already are – in this case, searching and browsing on Google or Facebook – is the first step toward differentiating your customer engagement experience. Communication channels need to complement each other to provide consistent value during every interaction with your customers. Google’s Business Messages and Facebook Messenger are amazing channels to use to drive engagement early in the customer journey. Pre-sales interactions can be used to answer customer questions, simplify discovery, and start a conversation that can evolve over time. It’s also possible to customize the agent and customer experience on these channels using Flex’s Interactions API to create custom workflows. This allows for developers to customize all Flex Conversations channels through a single API, meaning any customizations you’ve already made can be applied to these new channels. To learn more about adding digital channels to your contact center or Sales workflows, read our documentation on the Flex Conversations API. Availability Google’s Business Messages and Facebook Messenger integrations are currently available to customers globally as Public Beta with Twilio Flex through the Conversations API. Twilio Flex customers can add these channels on their own by reading through the documentation or reaching out to our Account teams for assistance. Interested in learning more about how Twilio Flex can transform your digital engagement? Talk to our sales consultants today to learn more. Stu Crew is a Principal Product Manager at Twilio who has nearly 10 years of experience in the contact center industry with a background in user experience design. Stu's current focus is on using his expertise to enhance agent experiences and satisfaction in Twilio Flex.

Stu Crew10/26/2023

13 milliseconds. That’s how fast the human brain can process images. For reference, that’s about 10x faster than it takes to blink an eye—and practically turbo mode compared with how long it takes to read a short sentence.  If this was a plain SMS message, there’s a chance your customers could've stopped reading by now. But what if there was something snappy before the message that could instantly capture customers’ attention? Something like (you guessed it) a GIF. Using GIFs for text messaging is a straightforward way to keep your audience engaged with your marketing materials. Even better, GIFs are an opportunity to showcase your brand personality and build deeper customer relationships at scale. Below, we’ll explain how to text a GIF, including helpful tips for maximizing your SMS marketing.  What is a GIF? Whether you pronounce it “giff” or “jiff,” GIF or graphics interchange format is a type of image file. But unlike other image formats, like JPEG or PNG, a GIF can either be a still or animated image.  A GIF can store multiple pictures at once, then load these pictures sequentially to generate a flip-book-style animation. Often containing larger file sizes, GIFs don't have sound, and you can't fast-forward or rewind them like a video. It’s also critical to note that an animated GIF isn't the same as a video file, like MP4 or MOV. Why use GIFs? The reason is simple: modern media is reactionary. Like emoji or stickers, GIFs are ideal for communicating emotions in as few characters as possible.  Picture the love and like react buttons on social media platforms, like Facebook and TikTok—those same functions now appear in SMS messaging for iOS and Android. GIFs follow the same concept, which is to convey an emotion or reaction with minimal words. Most modern cell phones even include an option to directly reply to texts with GIFs.  Additionally, GIFs for text messaging are particularly beneficial for business-to-consumer marketing. With 15+ billion phones around the world and most equipped to receive GIFs via text, these are a popular image format to reach consumers. Plus, since you can make GIFs with any image sequence, you can incorporate personality (like jokes and pop culture moments from popular movies and TV shows) into your SMS marketing for a more personalized customer experience. How to text a GIF GIFs are sent through text as MMS messages or images instead of plaintext.  When deciding how to add a GIF to a text for marketing, you might find it more convenient to use messaging software to avoid the ins and outs of coding.  Twilio’s communication APIs, software, and professional services empower businesses to leverage MMS by building on our infinitely extensible and developer-friendly platform. Additionally, with a no-code solution like Twilio Studio, you can send GIFs for text messaging without configuring an MMS solution. Our drag-and-drop user interface allows you to select the GIF most appropriate for your message, send it, and forget it.  Tips for using GIFs in marketing texts It's critical to be careful and considerate when using GIFs in marketing. Choose the wrong GIF, and it could confuse (or upset) certain customers. But if you choose the right one, you could win a customer over. The key to using animated GIFs in marketing is to select media that's on brand for your business and on target with your audience demographics. GIFs can drive serious customer engagement, but only when contextually fitting the message.  Consider these six tips for using GIFs in SMS messaging.  Use GIF files for product demos or instructions: The flip-book style of GIFs makes them ideal for showcasing step-by-step demonstrations.  Leverage existing marketing materials to create GIFs: From customer testimonials to social media posts, convert videos into animated GIFs.  Ensure your chosen GIFs are brand appropriate: Like any asset, GIFs in marketing initiatives must align with your brand and audience. Include GIFs in interactive campaigns: A GIF in SMS polls, contests, and other types of interactive campaigns can drive customer participation.  Take an omnichannel approach: GIFs in marketing are pretty ubiquitous, so don’t restrict yourself to SMS—embed GIFs in your emails and more. Deploy a solution to streamline sending GIFs in texts: Learning how to text a GIF at scale can be tricky, so explore business messaging solutions.  Start using GIFs in your texts with Twilio Want to engage your audience more with your business using GIFs? We've got you covered. Twilio's Programmable Messaging API can help you launch and scale your next marketing campaign with GIFs reliably. Plus, with over 157+ billion messages sent and received annually, Twilio's a platform you can trust. Explore our messaging solutions to get started.

Twilio10/25/2023

For many businesses, the contact center is one of the most vital ways to influence customer experience—it’s available around the clock and is often a customer’s first point of contact. It's also vital because it encompasses many different customer touchpoints, including your call center, social media, mobile apps, and chatbots. As a customer experiences more positive interactions with your company, the more likely they’ll stay loyal and evangelize their experience to others, spreading positive sentiment in a way that even the savviest marketing campaigns can’t replicate.    Let us show you how your company can achieve meaningful improvements in customer loyalty. First, we’ll explain the basics of what impacts your contact center experience, then demonstrate how you can make these essential changes within your system.  What is contact center experience?  According to Twilio's 2023 State of Customer Engagement Report, 86% of consumers say that personalized experiences are essential in increasing their loyalty to specific brands. After a bad contact center experience, customers can let their frustration carry them to a competitor, who may be able to offer a more positive experience.   Understanding your contact center experience and how to improve it is vital to ensuring customer loyalty and retention. So what's a contact center experience? Here's a definition:  A contact center experience is any interaction a customer has with your customer service staff. The touchpoints may vary depending on what methods of contact you offer, but can include: Calling into a call center Commenting or direct messaging on social media   Using a chatbot Browsing a mobile app Emailing a support agent   Contact center vs. call center It’s crucial to differentiate a contact center from a call center. Many businesses operate a call center, where employees can address issues and answer questions via telephone even after traditional business hours. A contact center, on the other hand, refers to the multichannel hub where businesses process customer communications. It involves more inputs than a call center.   Using the phrase contact center rather than call center reflects the myriad of options available for customers to reach support staff in the modern world and the new technologies available to facilitate this.   What impacts the contact center experience? Many factors play a part in shaping the interactions between your customers and service representatives. Here are some of the most impactful: Agent competence and skill: Knowledgeable staff who communicate well and proactively address the customer’s needs can have a huge impact on customer satisfaction. Technology: Efficient, user-friendly solutions facilitate positive experiences compared to outdated and slow tools prone to inefficiencies. Design and organization: Organizational and design choice within your contact center environment should simplify customer interactions and make navigation more straightforward.  Customer feedback and data analytics: Invaluable tools such as these for understanding and enhancing the customer experience help you leverage valuable data and insights that can help improve your contact center customer experience. Why is contact center experience important? Regardless of how customers get in touch—either over the phone, on your app, or on social media—establishing a positive experience that focuses on their needs simplifies things not just for them but for your team as well. Enabling customers to take care of their own needs quickly on an app or online reduces wait times and query volume across your entire contact center.  Here are a few specific reasons why improving your contact center experience is critical for the overall success of your business. 1. It improves customer relationships A faulty process that results in a customer waiting on hold for too long can damage trust in your business. In fact, 64% of brands said inconsistent experiences frustrate customers. This makes sense since it’s difficult to have faith in organizations with contact centers that don't work effectively. Developing an excellent customer experience through every channel or hub within your contact center helps to establish a rapport with customers, improving relationships and growing customer loyalty. 2. It reduces turnover and generates positive feedback Customer loyalty brings several positive effects. The primary impact is reduced customer turnover, which improves customer acquisition costs. After all, acquiring a new customer costs a lot more than retaining an established one. Satisfied customers are also fantastic ambassadors of your brand, offering the types of positive comments online and in person that will do more to convert new customers than any marketing campaign. In fact, according to Nielsen's Trust in Advertising survey, 88% of consumers trust personal recommendations from friends and family over all other forms of marketing messaging.    3. It provides better customer insights Customer surveys and feedback are some of the best ways to gather key insights that can inform strategic decision-making. Companies can use this data to identify areas for improvement, adjust product offerings, and tailor marketing strategies to align with customer preferences better.  These insights and data provide a competitive edge that can help make them more responsive and ready to evolve in an ever-changing market.   Types of contact center experiences Depending on your business, the technology stack you use and your audience, your organization can offer several contact center experiences: Inbound contact center: Often referred to as a call center, this is the most typical type of contact center experience that people imagine. Customers call into your system and speak to an agent who can resolve their concerns. Standard technologies used for these facilities include Voice Over Internet Protocol or interactive voice response tools. Outbound contact center: Also referred to as telemarketing, organizations hire staff to contact customers directly to solicit sales, make appointments, follow up on complaints or queries, and conduct market research. Multichannel contact center: Using various methods that can include telephone calls, chatbots, apps, and email, a multichannel contact center allows a dedicated staff to handle customer communication in a more personalized and efficient way. Omnichannel contact center: Like a multichannel contact center, an omnichannel contact center offers customers the choice to get in touch with business representatives using whatever contact method they choose. However, rather than centralizing all the technologies in one place, an omnichannel approach provides a seamless experience between channels, allowing for greater customer personalization. While there are many contact center options available, the omnichannel contact center has become the most popular option for forward-thinking businesses. Not only does it provide a seamless and consistent experience regardless of the chosen contact method, but it also allows for better data collection, more efficient issue resolution, and higher levels of customer satisfaction. How to improve the contact center experience Regardless of your current capacity or technology stack, your contact center is a pivotal point of interaction with your customers. Use it to deliver excellent customer service, build positive relationships, and foster meaningful customer loyalty. Twilio offers the resources to help make this happen. Our game-changing Twilio Flex is a flexible digital engagement solution that stretches across every touchpoint on the customer journey.   Whether aiming to boost customer satisfaction, streamline operations, or gain a competitive edge, our expert insights can guide you on the path to creating a more efficient and customer-centric contact center. 1. Use the right metrics and key performance indicators (KPIs) The right metrics and KPIs are crucial for delivering a better contact center experience. These metrics provide valuable data that can offer insight into your contact center's performance, helping you understand what happens and where there's room for improvement. Reviewing these metrics weekly, quarterly, or yearly (or a combination of all three) enables you to establish benchmarks, set achievable goals, monitor productivity, and improve your overall contact center experience. While there are many metrics and KPIs to choose from, your team doesn’t need to monitor all of them at once. Pick a few to focus on based on your current needs, then add or subtract once you have a few months of data.  Here are some metrics we’d recommend focusing on to start: Customer satisfaction score Customer retention rate  Average call transfer rate  Average customer waiting time  2. Track performance efficiently It’s hard to improve what you can’t measure. To ensure you have consistent data to work with, set up the KPIs and metrics you want to focus on, then establish reliable ways to track performance. Software and survey formats from performance measuring or customer relationship tools should provide reliable results.  3. Provide agents with a seamless way to see customer information across all platforms When you don't provide your contact center agents with a reliable and seamless way to view customer information across all channels, you put them at a considerable disadvantage.  To deliver a personalized customer experience, they need information from every customer touchpoint. By offering an omnichannel contact center experience, you show customers more flexibility. At the same time, you provide your staff with the knowledge and support they need to deliver a great customer experience every time.   4. Solicit employee feedback Your agents, sales representatives, and other contact center staff have the most direct access to your customers. Soliciting their feedback and insights on customer relationships is a meaningful way to improve strategy across your whole organization. 5. Survey customers regularly Aside from requesting feedback from your staff, run regular customer surveys. This offers your organization relevant qualitative data, in addition to the quantitative data gathered from tracking KPIs and metrics. These regular, open-ended surveys also help customers feel more connected to your business and provide insights that may not come up anywhere else. 6. Provide ongoing training Ongoing training offers agents support in improving their communication skills and sales techniques. It also covers new product updates and addresses gaps in technology proficiency. Agents who are well-prepared and confident in their abilities can provide quicker and more accurate assistance, leading to higher customer satisfaction and loyalty. This ongoing training can also help agents stay engaged and provide a path toward advancement, reducing turnover and ensuring a high standard of service every time. Boost your contact center customer experience with Twilio Delivering exceptional customer experiences at your contact center is all about personalization. This requires a custom-built platform to support your customers with technology that provides continual connection and seamless workflows. Twilio Flex delivers all this and more. Our cloud-based contact center platform supports a wide network of customer touchpoints, including email, voice, SMS, chat, WhatsApp, and Facebook Messenger. Using your unique understanding of your customers, you can create intelligent routing and seamless workflows that provide them with excellent service day or night. Plus, you can integrate Flex with your business’ chosen applications and use APIs to pull in information from across your technology and productivity suite. Sign up for a free Twilio account today to test the platform and see it all for yourself.

Twilio10/23/2023

Today’s businesses collect immense quantities of customer data. From online channels like website, social media, and email interactions to offline interactions like direct mail, in-person shopping, and events, your business has its work cut out for it when it comes to analyzing this data and turning it into actionable insights. That’s why many companies are fervently exploring ways in which artificial intelligence (AI) can help understand, predict, generate, and engage each individual customer in real-time and at scale. But in order to unlock the full potential of customer data and AI, many marketing teams have to lean on their data and engineering teams for support. To make AI more than a buzzword within your organization, marketers need a scalable way to: Gain a deeper understanding of customers with trusted data Use accessible and actionable AI tools Create, activate, and iterate faster for better results Luckily, the right AI tools can help your marketers leverage AI and trusted user data to build unique and personalized customer experiences. Here are four steps your marketing team can take to turn every customer interaction into a unique customer experience. Plus, learn how Twilio’s CustomerAI technology can help your marketing team leverage AI to better serve your customers. 1. Contextualize your data Your AI is only as good as your data. To start, your business needs a way to consolidate customer data across your many online and offline touch points. By seamlessly connecting all of your data sources in one place, your team can begin to understand the nuances and complexities of every customer’s relationship to your brand in real-time. These "unified customer profiles” allow your business to understand every user’s complete journey, so you can send them targeted offers, messaging, content, and more. Check out our guide, 10 essential steps to build an AI-ready organization, for tips on how to ensure your data is clean, accurate, complete, compliant, and (most importantly!) ready to help you get the most out of AI. 2. Predict user behavior for better personalization Next, you’ll need to make the switch from reactive to proactive data usage. With customer profiles updated in real-time, your business can unlock newfound visibility into your customers and their journeys. This information can help you predict which user groups will be more likely to convert, allowing you to send them the right message at the right time and push them further down the funnel. While marketing teams usually need the support of data and engineering teams to pull actionable customer predictions from data sets, Twilio’s CustomerAI empowers marketers to self-serve and draw these powerful conclusions on their own. With Predictive Traits and Audiences, marketers can: Create more precise, predictive audiences out-of-the-box Trigger timely customer journeys Personalize experiences based on a customer’s predictive lifetime value (LTV) or likelihood to purchase, churn, or perform any tracked event Your team can use the tool to identify users with, for example, a high propensity to purchase, refer a friend, or use a promo code. By saving these predictions to a user’s profiles, you can then build your own audiences, trigger journeys, and send data to downstream destinations. 3. Create relevant customer experiences in minutes When you’re ready to build personalized campaigns, don’t start from scratch. The beauty of AI is that it can help your team generate ideas, copy, and ultimately campaigns in a fraction of the time it takes a human. In just minutes, with CustomerAI Generative Journeys and Emails, you can use customer-aware generative AI to automate who to target, how to build the journey, and what messages will resonate best with real-time insights for better results. Not only can you expedite your idea-to-execution timeline for your email campaigns, you can use AI to drive better engagement with the click of a button. Plus, take advantage of AI-powered email headlines, images, and calls-to-action to build your emails in a fraction of the time. This allows you to spend less time building emails and more time honing your marketing strategy. Looking for even more ways AI can help improve your campaigns? Read 7 ways to use AI to superpower your marketing strategy for ideas on how to automate manual tasks and build better customer experiences using AI. 4. Personalize LLMs with your customer data It’s important to get your customer data AI ready. Twilio’s AI Personalization Engine infuses greater customer understanding and personalization into every customer interaction with a seamless API connection between your customer data and ChatGPT or other large language models (LLMs). Take all of your scattered, disjointed data and unify it so it’s clean, consistent, compliant, and instantly actionable. Also, your AI assistants, agents, and campaigns get even smarter with a seamless API that pulls the most relevant information into chat conversations, emails, and SMS messages. Unlocking the true power of AI with Twilio Finding actionable customer insights is no longer like finding a needle in a haystack. It’s like finding a needle in a stack of needles. In order to keep up with the ever-growing amount of customer touchpoints and user data, marketers need to make use of AI without burdening their technical teams. With Twilio’s CustomerAI, marketers can achieve a 360-degree view of their customers and use this information to build more targeted, personalized experiences. Learn more about Twilio’s CustomerAI technology and how it can help you combine real-time engagement data with AI to know your customers better.

Lyssa Test10/13/2023

In today's digital landscape, the mobile phone number stands out as a widely recognized means of confirming one's identity. It has the ability to provide a way for businesses to contact their customers through diverse communication channels such as SMS, WhatsApp, Email, Voice and more, but also gives the potential to reveal information about the user's identity. This particular method of identity verification can assist businesses in evaluating whether the user poses a risk to their platform and its user community. Being able to confirm that a user is submitting their true identity information not only safeguards the platform but also has the potential to enhance conversion rates by maintaining a healthy user base and providing a positive user experience. Lookup Identity Match is your ally for this goal. And we are proud to announce that we are moving it from Public Beta to Generally Available. Lookup Identity Match (now generally available) Lookup Identity Match efficiently verifies the identity associated with a provided phone number by cross-referencing user-supplied information with reliable sources, all while maintaining security and ease of use. This process is both secure and convenient, eliminating the need for users to submit official documents like passports or proof of address. How Lookup Identity Match works Lookup Identity Match uses real time confirmation of user-supplied data such as first name, last name, and address during account registration against authoritative sources. It provides matching scores for each data element so your business can prevent user registrations if the identity data submitted is not accurate. All while keeping personal identifiable information secure. During onboarding, Identity Match also builds a strong relationship with the end user who owns a particular mobile phone number, allowing businesses to use the same mobile phone number for two factor authentication possession checks (using Twilio Verify) in all account transactions (Logins, account updates, transactions) Who can use it Lookup Identity Match is designed for any consumer-facing business that needs to securely confirm the identity of its customers or users and simplify the onboarding experience. What the difference is Lookup Identity Match increases security in your onboarding flow without disrupting the user experience. For example, Tradier improved their KYC process by reducing the approval time by 90% using Identity Match. As Peter Laptewicz mentioned “We’re not just relying on traditional methods but also relying on these new signals that can help prevent fraud. It is safe to say that we have caught several signals of fraud using Identity Match”. Another example, twenty of our beta customers realized 24,000 queries during the month of September. About 78% of those queries received a response from Identity Match, meaning that for 8 out of 10 users they were able to assess whether their identities matched or not what the phone number had in other authoritative data bases. Accelerating the onboarding process reduces the risk of users getting frustrated and abandoning it. This also translates into users spending more time engaged with your app or platform. Click here to learn more about

Sebastian Del Aguila Fiocco10/12/2023

As a result of industry-wide changes, on November 8, 2023, all restricted (formerly called “unverified”) toll-free numbers will require registration. In the future, messages sent from a toll-free number that has been submitted for registration and in the pending state will be blocked and subject to messaging fees. Pending messaging limits are also subject to change. With the introduction of US A2P 10DLC routes in 2020, the messaging industry continued its shift towards a more compliant and transparent ecosystem for Application-to-Person (A2P) messaging. This April we communicated new industry requirements that made toll-free numbers the latest phone number types that required registration and vetting. These requirements are consistent with industry-wide, global moves to require registration for all A2P messaging traffic with the goal of drastically reducing spam and fraud. While these changes add additional steps to start sending messages, they represent important efforts to preserve the value of business messaging and reduce the impact of bad actors on consumers. Consumers are understandably tired of the phishing scams, shady messaging practices, and the spam they receive, meaning that a handful of bad actors are eroding the trust that you’ve built with your customers. These compliance requirements are in place to eliminate bad actors and spam from the messaging ecosystem and ensure the trust of consumers. More stringent compliance and vetting requirements are just one of the many ways the industry is working to build Trusted Communications so that we can continue to engage with our customers and ensure they continue to trust the brands and organizations with whom they do business. What do you need to do? If you use restricted toll-free numbers to send messages and you haven’t submitted them for registration, you need to start the registration process today. To determine the status of your toll free numbers (restricted, pending review, or verified), head to the Phone Numbers section in Console. Review our Toll-Free Verification Console documentation to learn how to identify these numbers. If you have restricted toll-free numbers, you’ll see a new badge next to “messaging capability”. You can start the registration process in Console or use our API solution, which we built for registering large volumes of toll-free numbers. For best practices and more information, review our Toll-Free Verification guide. Our vision for Trusted Communications Registration and vetting is the first step in creating a global messaging ecosystem built on trust. With Trusted Communications, your consumers are more likely to trust that a call or text is legitimate, increasing engagement. This means that the communications that consumers engage with are more valuable for businesses because they are more likely to drive the intended action and ultimately build long standing loyalty. We continue to partner with the messaging ecosystem to build trust, advocate for our customers and consumers, and power innovation with software-based solutions to compliance, onboarding, and registration.

Twilio10/9/2023

Migrating from an on-premise contact center solution to a cloud based one such as Twilio Flex comes with significant upsides but a fair number of questions, including: Should you rip and replace and start from scratch? Will there be any downtime for your customers? How can you train your employees on a new platform with minimum interruption? Sometimes ripping and replacing is just not realistic for businesses with customers who depend on their critical services. That’s where Terazo and Twilio can help. Terazo is a Twilio Gold Consulting Partner, meaning Terazo builds upon Twilio’s comprehensive suite of contact center, customer engagement, and communications software to create impactful experiences across industries. Together, these businesses offer customers tailored support options for migrating from an on-premise solution to a cloud contact center solution at their own pace with a custom roadmap designed to support each customer’s needs and goals. Here’s how. Terazo’s incremental migration approach 211 Maryland, a nonprofit organization that provides health and human service referrals to residents in Maryland, is one example of an organization whose journey to the cloud was incremental. With a 150% increase in calls during the COVID-19 pandemic, 211 Maryland saw a new opportunity to help those in need and launched the Health Check Program, built with Twilio’s SMS technology and Twilio’s Voice API. Then, in 2021, Terazo built and launched an online resource lookup database and an API for 211 Maryland, which led to even more opportunities. Finally, the success with SMS and Voice led to a proof of concept that integrates Twilio Flex’s contact center technology and Twilio Segment’s customer data platform capabilities into 211 Maryland’s Outpatient Care Program. This program aims to enable hospitals to create referrals for outpatients in need of resources for substance use disorders, intellectual disorders, developmental disorders, and mental health conditions. Check out a demo of what the future of 211 Health Check could look like once Flex and Segment are implemented. Mike Blakeney is Terazo’s Senior Director of Solution Architecture. He said Terazo’s solutions journey path for customers is based on Gartner’s Five-Layer CPaaS Architecture, which presents different architectural layers for the contact center platform as a service, as seen below. The journey to cutting-edge customer engagement with Twilio is not a destination, but rather an iterative journey, according to Blakeney. Gartner's five-layer CPaaS Architecture “Building solutions can be complex and requires a clear understanding of your journey,” Blakeney said. “We approach this by building and designing architectures that introduce complexity incrementally rather than just deploying a single complex design.” Terazo’s solution approach The other approach Terazo offers is what they call the solution approach, ideal for organizations that want to jump right in with Flex instead of working up to it incrementally. That’s the case for T Bank, which went with Terazo’s solution approach. This financial institution, which has more than $17 billion in assets, wanted to build a platform that provided credit cards as a service for its customers. As a large organization with a long history in the banking industry, T Bank knew using Twilio Flex would help them drive more sophisticated outcomes. “The challenge was the need to use lots of different systems,” Blakeney said. “They decided to go straight into Flex and integrate it with ZenDesk along with their other API platforms to bring everything under a single user interface [UI] for agents.” After integrating Flex, T Bank saw the following results: 50% faster time to market Unified white label agent dashboard Ready for customer onboarding and production launch in 6 months “With the Flex platform, we were able to have a single pane of glass for their credit card as a service program and completely reskinned the Flex UI, providing a branded and seamless experience for agents and customers,” Blakeney said. Helping customers build custom solutions quickly with Twilio and Terzo “Modernizing without ripping and replacing, along with quickly validating ideas, are real challenges, no matter which journey you take,” Blakeney said. “We recognize the need to reduce this friction of the jump [to Flex] for our customers.” That’s why Terazo created Kickstarters, tailored bundle solutions that help customers build out the capabilities they need more quickly and efficiently. With their Kickstarters, Terazo aims to make it easier for businesses to build the Twilio solutions they need to find success in their unique business environments. “We get you started on Flex with a robust preset bundle of features that allow you to optimize value immediately, creating more customer stickiness and retention and giving you the platform to grow and reach new customers,” said Amee Mungo, Terazo Chief Strategy Officer. Terazo then helps businesses imagine new opportunities and develop innovative solutions, building on the success of their Kickstarter experience. “Today's digitally enabled customers demand and expect personalized content via omnichannel communications,” Mungo said. “This requires a new level of agility and sophistication for today's businesses to not only meet and communicate with customers where they are, but predict their most important needs and/or their propensity to learn, spend and share.” To learn more about Twilio and Terazo’s approach to switching from an on-premise solution to a cloud contact center solution, check out their full SIGNAL session here.

Jessica Nath9/25/2023

It's fun to get creative! Read on to learn how to create AI-generated images via SMS using Replicate and Twilio Programmable Messaging. Do you prefer learning via video more? Check out this TikTok summarizing this tutorial. Prerequisites A Twilio account - sign up for a free Twilio account here A Twilio phone number with SMS capabilities - learn how to buy a Twilio Phone Number here Replicate account to use the Stable Diffusion text-to-image model – make a Replicate account here Python installed - download Python here ngrok, a handy utility to connect the development version of our Python application running on your machine to a public URL that Twilio can access. ngrok is needed for the development version of the application because your computer is likely behind a router or firewall, so it isn’t directly reachable on the Internet. You can also choose to automate ngrok as shown in this article. Replicate Replicate offers a cloud API and tooling so you can more easily run machine learning models, abstracting away some lower-level AI concepts and handling infrastructure so you can focus more on your own applications. You can run open-source models that others have published, or package and publish your own, either publicly or privately. Configuration Since you will be installing some Python packages for this project, you need to make a new project directory and a virtual environment. If you're using a Unix or macOS system, open a terminal and enter the following commands: mkdir replicate-prompt-to-image-sms cd replicate-prompt-to-image-sms python3 -m venv venv source venv/bin/activate pip install replicate flask twilio If you're following this tutorial on Windows, enter the following commands in a command prompt window: mkdir replicate-prompt-to-image-sms cd replicate-prompt-to-image-sms python -m venv venv venv\Scripts\activate pip install replicate flask twilio Grab your default Replicate API Token or create a new one here. Run this command in the terminal in your current folder: export REPLICATE_API_TOKEN={replace with your api token} Now it's time to write some code to receive a prompt via SMS and return an AI-generated image! Turn a Prompt into an AI-generated image via SMS with Replicate Make a file called app.py and place the following import statements at the top. import replicate from flask import Flask, request from twilio.twiml.messaging_response import MessagingResponse Next, make a Flask app so your app can receive the inbound text message to your Twilio phone number. That string is then passed to Replicate 's stable diffusion model to generate photo-realistic images given that prompt. app = Flask(__name__) @app.route('/sms', methods=['GET', 'POST']) def sms(): resp = MessagingResponse() inb_msg = request.form['Body'].lower().strip() output = replicate.run( "stability-ai/stable-diffusion:27b93a2413e7f36cd83da926f3656280b2931564ff050bf9575f1fdf9bcd7478", input={"prompt": inb_msg} ) res_prompt = "prompt was " + inb_msg msg = resp.message(res_prompt) img = output[0] msg.media(img) return str(resp) if __name__ == "__main__": app.run(debug=True) On the command line, run python app.py to start the Flask app. Now it's time to set up a Twilio phone number so you can text it a prompt and get an AI-generated image back! Configure a Twilio Number for the SMS Chatbot Now, your Flask app will need to be visible from the web so Twilio can send requests to it. ngrok lets you do this. With ngrok installed, run ngrok http 5000 in a new terminal tab in the directory your code is in. You should see the screen above. Grab that ngrok Forwarding URL to configure your Twilio number: select your Twilio number under Active Numbers in your Twilio console, scroll to the Messaging section, and then modify the phone number’s routing by pasting the ngrok URL with the /sms path in the textbox corresponding to when A Message Comes In as shown below: Click Save and now your Twilio phone number is configured so that it maps to your web application server running locally on your machine and your application can run. Text a prompt of a picture you'd like to generate to your Twilio number and you should get an AI-generated image of whatever you sent over SMS! Instead of ngrok, you could alternatively use another tunneling service like Tailscale–my teammate Rishab reviewed this post, and kept getting a 403 error with ngrok. The solution was to switch port numbers with ngrok–it seems that Tailscale has more privileges to the network settings compared to ngrok. You can view the complete code on GitHub here. What's Next for Replicate and Twilio Programmable Messaging? There is so much fun for developers to have around building with LLMs! Replicate offers so many models to play with like sdxl, a text-to-image generative AI model that creates beautiful 1024x1024 images, or you can fine-tune your own. I can't wait to see what you build with AI–let me know online what you're working on! Twitter: @lizziepika GitHub: elizabethsiegle Email: lsiegle@twilio.com

Lizzie Siegle9/21/2023

Twilio's new Help Center site begins rolling out to a small number of Twilio customers on Thursday, September 21, 2023. We will be adding additional customers every week until it becomes available to the full Twilio customer base mid-October. This new site launch will take the place of our existing Console Support Center Overview and support.twilio.com sites, and comes with a host of improvements. In this blog, we’ll explain the updates, and how users will receive access. Who is the new site for? Our new Help Center site will be one place for all Twilio customers to get support from Twilio. This initial release only supports Twilio branded communications and software products that are currently covered on the existing support.twilio.com site. But don’t fret if your product isn’t included just yet! Our new site was built to provide a uniform customer support experience to all customers across our entire product catalog. If you use Authy, Segment, or SendGrid products, you should continue to submit requests for these products on their respective sites for the time being. Once the new site is live for all Twilio customers, we’ll begin preparing to migrate support.authy.com. We’ll share updates as we continue to work through additional product and brand integrations. What’s changing? Our new site is where you’ll find our brand new platform, improved site search, and updated ticket submission form. This experience was built from the ground-up to not only replace the old Support Center, but be a better experience for all Twilio customers. Here’s what you can expect. Improved searching The Help Center includes a new smart search engine. It has all of our content indexed - Twilio API docs, Twilio Blog posts, and our Support docs - so you can find helpful content no matter where it’s posted. The new search engine also learns the more it’s used. It allows you to rate search results with thumbs up or thumbs down selections, and marks known helpful content as Recommended. Once it understands a question, it may even suggest a helpful search string to give you better results. If you find a search result that solved your issue, give it a thumbs up to help your fellow developers! Improved ticket submission form Our new ticket submission form does away with the product drop-down menu. This menu had too many options, and was confusing to a number of our customers. Instead, we’ve trained a machine learning (ML) model to understand your issues, and route them to the right support team in seconds. This results in easier ticket submission, fewer mis-routes, and quicker responses. When submitting a request to our Support team, be sure to share as much detail about the issue as possible, so we can get you help faster! Personalized Support features We have additional features specifically for our Personalized Support customers. These customers have access to a ticket submission form from the navigation panel, and a new support plans page with contact numbers for their Support team. For more information on our support offerings, see Twilio’s Support Plans page. For full details on these changes, see Twilio’s New Customer Help Center for Personalized Customers. New platform The all-new website platform gives our engineering team more flexibility than ever before. Along with this initial set of improvements, we’re planning additional features and integrations in the future to make sure you get world-class support. How do I get access? We’ll begin migrating users to the new site on Thursday, September 21st. We’ll start with a small set of randomly selected Account SIDs, and then review feedback and error logs to ensure the new help center is stable. The rollout is planned over 30 days, with weekly releases to additional Accounts, and continuous monitoring. Since the Account SIDs are selected randomly, we are unable to add specific accounts early. Please note that accounts will see no changes if they have not yet received access. Ticket submission in Console will remain live for these accounts until the site has been rolled out to everyone. Where can I learn more? For full details, including detailed instructions, please see our Support article.

Twilio9/21/2023