<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tihomir Dmitrović</title>
    <description>The latest articles on DEV Community by Tihomir Dmitrović (@tolecar).</description>
    <link>https://dev.to/tolecar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F805221%2F830ebed1-089e-4901-902d-81ca0a6110e0.jpeg</url>
      <title>DEV Community: Tihomir Dmitrović</title>
      <link>https://dev.to/tolecar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tolecar"/>
    <language>en</language>
    <item>
      <title>The GPT Site Assistant: A New Era of AI Integration with WordPress</title>
      <dc:creator>Tihomir Dmitrović</dc:creator>
      <pubDate>Thu, 02 Nov 2023 09:47:46 +0000</pubDate>
      <link>https://dev.to/tolecar/the-gpt-site-assistant-a-new-era-of-ai-integration-with-wordpress-2h8g</link>
      <guid>https://dev.to/tolecar/the-gpt-site-assistant-a-new-era-of-ai-integration-with-wordpress-2h8g</guid>
      <description>&lt;p&gt;We are already witnessing various AI integrations with WordPress, primarily in terms of generating content or other limited application tools. Besides them there are chatbots, but they are as a rule of thumb, not well-integrated and operate outside the context.&lt;/p&gt;

&lt;p&gt;One of the most significant advantages of Convoworks is its deep integration with the underlying system (WordPress), opening up a broad spectrum of possible usages. Combined with &lt;a href="https://platform.openai.com/docs/guides/gpt/function-calling" rel="noopener noreferrer"&gt;OpenAI function&lt;/a&gt; support, we can now have an AI assistant that can genuinely interact with the system.&lt;/p&gt;

&lt;h3&gt;
  
  
  OpenAI Functions
&lt;/h3&gt;

&lt;p&gt;OpenAI has introduced &lt;a href="https://convoworks.com/harnessing-the-power-of-gpt-functions-in-convoworks/" rel="noopener noreferrer"&gt;GPT functions&lt;/a&gt; that allow bots to send commands to your code in the form of function call responses. These specialized responses enable your code to receive meaningful, well-structured instructions on what actions the system (our code) should execute. After execution, the results are sent back to GPT, which then formulates a response based on the outcomes of the function execution your code returned. This process establishes a communication channel, enabling the AI to interact with your system in a remarkably reliable way.&lt;/p&gt;

&lt;p&gt;For GPT to be able to utilize these functions, we must define (in &lt;a href="https://json-schema.org/understanding-json-schema" rel="noopener noreferrer"&gt;JSON Schema&lt;/a&gt;) all exposed functions and pass them along with the API request. Doing so contributes to the request size, preventing the registration of all functions simultaneously. It is feasible, and we plan to implement a specialized mechanism in the future that includes only the necessary function definitions for given tasks. However, this is not easy to implement and will take some time to be ready.&lt;/p&gt;

&lt;p&gt;Operating within WordPress offers us a simpler alternative. PHP includes a &lt;code&gt;call_user_func()&lt;/code&gt; function that allows the invocation of any PHP function. Since GPT possesses extensive knowledge of PHP (and WordPress) functions, providing it with only the &lt;code&gt;call_user_func()&lt;/code&gt; definition enables the utilization of all available functions. This means that a comprehensive AI integration can be achieved using just a single function definition.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2023/10/func-call-log.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fconvoworks.com%2Fwp-content%2Fuploads%2F2023%2F10%2Ffunc-call-log.png" alt="GPT chat conversation with function call"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  GPT Site Assistant
&lt;/h3&gt;

&lt;p&gt;We've created a GPT-powered chatbot that has access to the &lt;code&gt;call_user_func_array()&lt;/code&gt; function. Although it's not perfect and comes with some quirks, it exemplifies what we can expect in the future - the extraordinary ability to communicate directly with your website!&lt;/p&gt;

&lt;p&gt;This tool allows you to perform a multitude of tasks. For instance, you can check your latest posts, update them, modify their taxonomy, and upload images from external URLs. It also has the capability to read and modify files, among other functionalities, leveraging PHP and WordPress functions to access or modify data as necessary. Intriguingly, it can sequentially call multiple functions before generating a final response.&lt;/p&gt;

&lt;h3&gt;
  
  
  Usage Examples
&lt;/h3&gt;

&lt;p&gt;Here are a few examples demonstrating how you can use it. These instances are meant to give you a rough idea of how it operates. Please note that the videos are edited, and the waiting time for a response in reality is considerably longer. In some cases, multiple GPT API calls are made before a response is ready, and occasionally, the GPT API may be slow.&lt;/p&gt;

&lt;h4&gt;
  
  
  .htaccess Update
&lt;/h4&gt;

&lt;p&gt;In this example, we demonstrate how it can access and modify files. Initially, we ask it to check the existence of the htaccess file, display its contents, and ultimately, modify it by adding an access restriction for the debug.log file.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/JE9U7umhgus"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  Hacker News API &amp;amp; New Blog Post
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/HackerNews/API" rel="noopener noreferrer"&gt;Hacker News&lt;/a&gt; has a simple API, which doesn’t require authentication and is available through straightforward GET requests, making it an excellent example. In most cases, GPT will use the &lt;code&gt;file_get_contents()&lt;/code&gt; function to read data from the API, but we have also observed it using &lt;code&gt;wp_remote_get()&lt;/code&gt; occasionally.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/kw9Q5asky4M"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Initially, we ask the bot if it is familiar with the Hacker News API. This question serves as a warm-up and provides context. We then instruct it to load the top three stories and fetch five comments from, for example, the second story, and generate a blog post about it, inserting it into the database with appropriate tags. We limit the number of items to load (3, 5, etc.) due to the structure of the Hacker News API, which would include too many function calls in a row, potentially exceeding the maximum token limit.&lt;/p&gt;

&lt;h4&gt;
  
  
  Other Ideas
&lt;/h4&gt;

&lt;p&gt;You can inquire about the installation status of the SOAP or some other PHP extension, the operating system in use, and the installed plugins. You have the option to ask it to load specific posts, update tags on them, or even attach images (from a URL) to them. Feel free to try and experiment. In some cases, you can give hints on what it should use or how it can solve potential problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installation and Setup
&lt;/h3&gt;

&lt;p&gt;Follow these simple steps to enable and try it on your own WordPress installation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Download and activate &lt;strong&gt;Convoworks WP&lt;/strong&gt; (available through the plugin installer).&lt;/li&gt;
&lt;li&gt;  Download and activate the &lt;strong&gt;Convoworks GPT package&lt;/strong&gt; (available at &lt;a href="https://github.com/zef-dev/convoworks-gpt/tree/main/build" rel="noopener noreferrer"&gt;https://github.com/zef-dev/convoworks-gpt/tree/main/build&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;  In your WordPress admin, navigate to Convoworks WP and create a new service from the template &lt;strong&gt;GPT Site Assistant&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;  Set the &lt;code&gt;API_KEY&lt;/code&gt; (OpenAI API key) in the service's &lt;strong&gt;Variables view&lt;/strong&gt; and save.&lt;/li&gt;
&lt;li&gt;  Navigate to the &lt;strong&gt;Test view&lt;/strong&gt; in your newly created service and start using it!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2023/10/gpt-assistant-template.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fconvoworks.com%2Fwp-content%2Fuploads%2F2023%2F10%2Fgpt-assistant-template-1024x549.png" alt="GPT site assistant template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Service Definition
&lt;/h3&gt;

&lt;p&gt;This service is based on our previous example described in our blog post, &lt;a href="https://convoworks.com/harnessing-the-power-of-gpt-functions-in-convoworks/" rel="noopener noreferrer"&gt;Harnessing the Power of GPT Functions in Convoworks&lt;/a&gt;. Here, we will focus only on significant parts.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prompt Structure
&lt;/h4&gt;

&lt;p&gt;In our approach, we divided the system prompt (instructions for the bot) into several system messages. The primary one contains the main system prompt/instruction, while subsequent messages offer additional context such as current user info, current date/time, installed PHP extensions, active themes, and active plugins. This separation allows us to easily toggle them on and off. For instance, in this example, system information is disclosed only to administrators.&lt;/p&gt;

&lt;p&gt;Additionally, the system prompts can be used to describe specific tasks and how they should be executed. Check our example on setting the featured post image and add your own if you wish.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2023/10/system-messages.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fconvoworks.com%2Fwp-content%2Fuploads%2F2023%2F10%2Fsystem-messages.png" alt="GPT System prompt structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Defining Functions
&lt;/h4&gt;

&lt;p&gt;In this instance, we utilize a singular function definition: "call_user_func_array". It is articulated through the &lt;strong&gt;Chat Function Element&lt;/strong&gt;, which meticulously outlines the function and its arguments. Once activated, it executes sub-components in the OK flow. The OK flow offers insights into how the actual function call is managed and how it produces values. Notably, we invoke wp_call_user_func_array through expression language syntax, passing the necessary arguments to it. This function mirrors call_user_func_array, with a slight variation - it attempts to include specific WordPress files if the function is momentarily unavailable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2023/10/function-def.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fconvoworks.com%2Fwp-content%2Fuploads%2F2023%2F10%2Ffunction-def.png" alt="GPT function call example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For a more comprehensive list of other functions usable in Convoworks, refer to the documentation for the &lt;a href="https://convoworks.com/docs/packages/core-package/functions/" rel="noopener noreferrer"&gt;core&lt;/a&gt; and &lt;a href="https://convoworks.com/docs/packages/wordpress-core-package/" rel="noopener noreferrer"&gt;wp core&lt;/a&gt; packages.&lt;/p&gt;

&lt;p&gt;It’s noteworthy that in this service, function calls have been exclusively enabled for administrators.&lt;/p&gt;

&lt;h3&gt;
  
  
  Other Configuration Options
&lt;/h3&gt;

&lt;p&gt;There are several more global variables you can adjust in the &lt;strong&gt;Variables view&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DEFAULT_MAX_TOKENS&lt;/strong&gt;, &lt;strong&gt;DEFAULT_MODEL&lt;/strong&gt;: The &lt;code&gt;gpt-3.5-turbo-16k&lt;/code&gt; model can support up to 16k tokens, while the &lt;code&gt;gpt-4&lt;/code&gt; model is limited to 8k tokens. The default configuration values have been tailored to align with the capabilities of the &lt;code&gt;gpt-3.5-turbo-16k&lt;/code&gt; model. If there is a plan to employ the &lt;code&gt;gpt-4&lt;/code&gt; model, it is recommended to halve the values assigned to &lt;code&gt;DEFAULT_MAX_TOKENS&lt;/code&gt;, &lt;code&gt;MAX_MESSAGES&lt;/code&gt;, and &lt;code&gt;TRUNCATE_TO&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MAX_MESSAGES, TRUNCATE_TO&lt;/strong&gt;: These parameters define the maximum number of messages that a conversation can hold. When this threshold is reached, the conversation content will be truncated. A summary of the truncated content will then be available in a separate additional message. These variables work in conjunction with the &lt;strong&gt;Messages Limiter Element&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MAX_EXECUTION_TIME&lt;/strong&gt;: This setting determines the maximum execution time allowed for PHP to manage extended operations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2023/10/variables.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fconvoworks.com%2Fwp-content%2Fuploads%2F2023%2F10%2Fvariables.png" alt="Configuration variables"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Operational Considerations
&lt;/h3&gt;

&lt;p&gt;GPT may occasionally attempt to call non-existing functions or generate random values if an ID is absent. It might also try to load an excessive amount of data, which the API might find challenging to handle due to the model’s maximum token restrictions. There’s also a possibility that GPT could repeatedly execute a function that fails, causing it to become stuck. To address these issues, we have implemented a detection mechanism; the system will halt execution after three unsuccessful attempts.&lt;/p&gt;

&lt;p&gt;GPT invokes functions using the JSON definition. However, the JSON generated by GPT can sometimes be malformed, causing the operation to fail.&lt;/p&gt;

&lt;p&gt;A more in-depth understanding of its operations can be gleaned from debug.log. For additional information on debugging, visit &lt;a href="https://convoworks.com/using-the-convoworks-log-files/" rel="noopener noreferrer"&gt;Convoworks Debugging Log Files&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Since Language Models (LMs) are known for their inconsistency, we do not recommend executing update/delete commands on a production server. Spend some time understanding how it operates in a development environment before proceeding with such commands in a live setting.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;This illustration primarily showcases the capabilities and potential of such integrative systems. While GPT manages to utilize &lt;code&gt;call_user_func()&lt;/code&gt; effectively, supplying it with actual, predefined functions still tends to deliver more reliable and accurate results. Looking ahead, we can expect the evolution of dynamic context and task definitions along with their corresponding functions. Envision a scenario where a plugin autonomously registers its task instruction definition, thereby enabling seamless utilization through a chat interface.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>nocode</category>
      <category>gpt3</category>
      <category>automaton</category>
    </item>
    <item>
      <title>Step-by-Step: Building a GPT-Enhanced Twitter Bot with WordPress and Convoworks</title>
      <dc:creator>Tihomir Dmitrović</dc:creator>
      <pubDate>Wed, 01 Nov 2023 21:41:38 +0000</pubDate>
      <link>https://dev.to/tolecar/step-by-step-building-a-gpt-enhanced-twitter-bot-with-wordpress-and-convoworks-2bdo</link>
      <guid>https://dev.to/tolecar/step-by-step-building-a-gpt-enhanced-twitter-bot-with-wordpress-and-convoworks-2bdo</guid>
      <description>&lt;p&gt;In our &lt;a href="https://convoworks.com/easy-twitter-api-integration-without-coding/" rel="noopener noreferrer"&gt;previous article&lt;/a&gt;, we introduced you to the basic usage of the Twitter API in conjunction with Convoworks. We guided you through the process of setting up a Twitter app, importing a service, testing it, and understanding its core functionalities. Building on that foundation, today we're exploring the development of a Twitter bot that tweets regularly about our articles.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Does This Bot Do?
&lt;/h3&gt;

&lt;p&gt;This bot automates the process of generating and posting tweets about content from your WordPress site. Operating on scheduled intervals, it selects a post, crafts a human-like tweet using GPT, and then sends it out to the Twitter. In fact, we're using this very bot over at Convoworks. To see it in action, check out our Twitter account &lt;a href="https://twitter.com/Convoworks" rel="noopener noreferrer"&gt;@Convoworks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2023/09/04-twitter.screenshoot.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fconvoworks.com%2Fwp-content%2Fuploads%2F2023%2F09%2F04-twitter.screenshoot.png" alt="Convoworks Twitter feed"&gt;&lt;/a&gt; Here's a more detailed breakdown:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;WordPress Integration&lt;/strong&gt;: Your site's posts serve as the primary content source, with the bot functioning as a WordPress scheduled task.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Advanced Language Processing with GPT&lt;/strong&gt;: Tweets aren't just automated; they're crafted using GPT to sound natural and engaging.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Testing Utility&lt;/strong&gt;: Ensure everything works perfectly. Use the built-in testing feature to check tweet generation or manually trigger the bot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Experience the seamless fusion of WordPress content with the power of automated Twitter engagement.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Steps to Get Started
&lt;/h3&gt;

&lt;p&gt;Here's a brief overview of the prerequisites and the initial setup. For a more comprehensive guide, please refer to our &lt;a href="https://convoworks.com/easy-twitter-api-integration-without-coding/" rel="noopener noreferrer"&gt;previous article&lt;/a&gt; which delves deeper into these steps.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;API Keys&lt;/strong&gt;: Ensure you have the necessary API keys from both &lt;a href="https://developer.twitter.com/" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and &lt;a href="https://platform.openai.com/" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Add GPT package&lt;/strong&gt;: Our example leverages the &lt;a href="https://convoworks.com/docs/packages/gpt-package/" rel="noopener noreferrer"&gt;Convoworks GPT package&lt;/a&gt;. This package is available as a separate plugin on &lt;a href="https://github.com/zef-dev/convoworks-gpt/tree/main/build" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, which you'll need to install and activate.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Download and Import&lt;/strong&gt;: Download the &lt;strong&gt;Twitter Bot&lt;/strong&gt; service definition (link provided below) and import it into Convoworks as a new service.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Variables&lt;/strong&gt;: Once imported, go to the &lt;strong&gt;variables&lt;/strong&gt; view in your service and input the required API keys and secrets (4 for Twitter, 1 for GPT).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2023/09/twitter-bot.json" rel="noopener noreferrer"&gt;Twitter Bot (JSON)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After completing these steps, navigate to the &lt;strong&gt;Test&lt;/strong&gt; view. From here, you can check its functionality. Input "info" to verify that the Twitter API is functioning correctly, or type "generate 123" to test the GPT functionality (replace 123 with an actual post id). If any issues arise, consult the debug panel. Alternatively, you can &lt;a href="https://convoworks.com/using-the-convoworks-log-files/" rel="noopener noreferrer"&gt;enable logging&lt;/a&gt; and review the log file.  &lt;br&gt;&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ELGI-DthhrM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Deep Dive into the Full Process
&lt;/h3&gt;

&lt;p&gt;After setting everything up, you can initiate a trial run with the "test" command. By default, this won't post real tweets, a feature controlled by the &lt;code&gt;AUTO_TWEET_ENABLED&lt;/code&gt; global variable. This ensures worry-free testing. Invoking this command activates the &lt;strong&gt;Task Executor - Daily Random Tweet&lt;/strong&gt; fragment, the same piece of logic used by our scheduled event hook handler, letting you observe its operations in action. &lt;em&gt;Fragments function as reusable workflow definitions, which can be invoked from various points. In our context, this includes the chat utility test command and the hook handler.&lt;/em&gt; To delve deeper, open your service editor and click on the &lt;strong&gt;Fragments&lt;/strong&gt; tab on the right. From there, select &lt;strong&gt;Task Executor - Daily Random Tweet&lt;/strong&gt;. The main section will display the constituent elements of this workflow, guiding you through each step of the process.  &lt;br&gt;&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/LJAZtiXiv3w"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  Fetching Posts
&lt;/h4&gt;

&lt;p&gt;To begin, we retrieve the post that will act as the foundation for our tweet using the &lt;code&gt;get_posts()&lt;/code&gt; WordPress function. The parameters we've defined specify that a random post, published after the date set by the &lt;code&gt;POSTS_AFTER&lt;/code&gt; variable, will be selected. You can modify these parameters based on your requirements. Since a random post is chosen, there's a risk of repeated selections. To mitigate this, we've configured the system to exclude the IDs of the last &lt;code&gt;EXCLUDE_LAST_POSTS_COUNT&lt;/code&gt; tweeted posts. Details of these tweets are retained in an option labeled &lt;code&gt;convo_twitter_bot_worklog&lt;/code&gt;. We'll discuss this feature in more depth later in the article. &lt;a href="https://convoworks.com/wp-content/uploads/2023/09/02-load-posts.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fconvoworks.com%2Fwp-content%2Fuploads%2F2023%2F09%2F02-load-posts.png" alt="Prepare arguments and load posts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Generating Tweet with GPT
&lt;/h4&gt;

&lt;p&gt;Once we've selected the post for the tweet, the next step is content generation. This logic is contained within the &lt;strong&gt;Generate Tweet&lt;/strong&gt; fragment. Here, GPT is instructed to craft a tweet, using the post's content as input, and subsequently save the generated content. &lt;em&gt;To navigate to the desired fragment, click the link in the INCLUDE element. Alternatively, explore fragments using the tabs on the right side.&lt;/em&gt; When working with GPT, we send one or more messages packed with the requisite instructions and data for generating meaningful content. By leveraging the &lt;a href="https://convoworks.com/docs/packages/gpt-package/" rel="noopener noreferrer"&gt;Convoworks GPT package&lt;/a&gt;, we've dispersed these instructions over multiple system messages, enhancing adaptability and simplifying maintenance. Inspect the &lt;strong&gt;Messages&lt;/strong&gt; flow within the &lt;strong&gt;GPT Chat Completion API v2&lt;/strong&gt; component.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Main system prompt&lt;/strong&gt;: This defines the agent's role and its objectives. For instance, it's depicted as a social media manager assigned the task of tweeting about our posts.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Additional contexts&lt;/strong&gt;: These auxiliary system messages supply the current date and time (always useful) and relay foundational information about the website and its associated product.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Previous tweets&lt;/strong&gt;: By furnishing insights from previous tweets, we ensure the generated content isn't redundant.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Post content&lt;/strong&gt;: At this juncture, we incorporate the post's content. It's worth noting the conversion from HTML to markdown, which conserves space in our API calls.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's worth emphasizing the ease with which you can tailor the context prepped for GPT completion, incorporating control structures, employing functions, or accessing WordPress data. &lt;a href="https://convoworks.com/wp-content/uploads/2023/09/03-chat-completion.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fconvoworks.com%2Fwp-content%2Fuploads%2F2023%2F09%2F03-chat-completion.png" alt="GPT Chat completion api element system message definitions"&gt;&lt;/a&gt; Upon completing the GPT request, the &lt;strong&gt;OK flow&lt;/strong&gt; elements are executed. Here, the output is stored in the &lt;code&gt;tweet_content&lt;/code&gt; variable. We also eliminate double quotes that GPT might include around the generated tweet. For those new to the GPT chat completion API, we recommend the &lt;a href="https://platform.openai.com/docs/guides/gpt/chat-completions-api" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt; or revisiting our previous &lt;a href="https://convoworks.com/harnessing-the-power-of-gpt-functions-in-convoworks/" rel="noopener noreferrer"&gt;articles&lt;/a&gt; on the GPT package.&lt;/p&gt;

&lt;h4&gt;
  
  
  Sending Out the Tweet
&lt;/h4&gt;

&lt;p&gt;Having crafted our tweet, it's time to send it out through the Twitter API. It's worth noting that we utilize the &lt;code&gt;AUTO_TWEET_ENABLED&lt;/code&gt; variable to easily toggle the dispatching of actual tweets. For the tweeting process itself, we rely on the same HTTP client-based approach that we showcased in our previous article.&lt;/p&gt;

&lt;h4&gt;
  
  
  Registering the Generated Tweet
&lt;/h4&gt;

&lt;p&gt;You may have observed our retrieval of options for posts to be excluded and the logging of prior tweets. The logic for preserving this data resides within the &lt;strong&gt;Register Posted Tweet&lt;/strong&gt; fragment. Besides cataloging the tweet content and recording the most recent post ID, it's important to note the &lt;code&gt;TWEET_HISTORY_SIZE&lt;/code&gt; parameter. This parameter limits the array of saved tweets. To access this data, you can use the test chat utility by executing the "dump" command.&lt;/p&gt;

&lt;h3&gt;
  
  
  Generating the Perfect Tweet
&lt;/h3&gt;

&lt;p&gt;In the previous section, we outlined the entire bot workflow. A critical stage within this is generating the tweet to be sent. This is an area where you might want to invest some time, refining prompts and testing the kind of results produced. You can test the tweet generation using the "generate" and "generate all" commands. The &lt;strong&gt;Test Tweet Generator&lt;/strong&gt; fragment encompasses these commands. Adjust the predefined post id or search arguments as per your preferences. As a quick reminder, you can specify a particular post id following the "generate" command. As previously discussed, tweet generation is encapsulated in the &lt;strong&gt;Generate Tweet&lt;/strong&gt; fragment. Navigate to this fragment within the Convoworks editor and modify the system message to suit your requirements. Also, take a moment to review and tweak the &lt;strong&gt;Additional Contexts&lt;/strong&gt; fragment. One of the most effective ways to refine a language model's writing style is to provide it with several examples. If you wish to adopt this approach, add a new &lt;strong&gt;System Message&lt;/strong&gt; element (by dragging and dropping from the toolbox on the left) and input something like, "Here are a few example tweets: ..." Besides context we provide to AI, there are two model options that you can adjust and experiment with.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;GPT_DEFAULT_MODEL&lt;/code&gt; allows you to change GPT model it will use. By default &lt;code&gt;gpt-3.5-turbo-16k&lt;/code&gt; and if you have access you might want to use &lt;code&gt;gpt-4&lt;/code&gt;. We tested it with both models and both models are producing good results.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;GPT_DEFAULT_TEMPERATURE&lt;/code&gt; allows you to tune up model's creativity. It can be value between 0 and 2, the higher value is, more creative responses will be (but also more likely to hallucinate).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Experimenting and fine-tuning the GPT output can be a delightful process, and we hope you'll relish the experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Testing
&lt;/h3&gt;

&lt;p&gt;Before allowing the bot to run autonomously, utilize the "test" command to trial the complete workflow. This command simulates the process that would typically be initiated by WP Cron. At this juncture, you may wish to review, and if necessary, adjust the post search arguments within the &lt;strong&gt;Task Executor - Daily Random Tweet&lt;/strong&gt; fragment. Tailor the &lt;code&gt;POSTS_AFTER&lt;/code&gt; and &lt;code&gt;EXCLUDE_LAST_POSTS_COUNT&lt;/code&gt; variables to your preferences. In addition to the "test" command, at this stage, consider using the "dump" command to view the current tweet log. There's also the "reset" command to purge this log. It's vital to note that the actual posting of tweets is controlled by the &lt;code&gt;AUTO_TWEET_ENABLED&lt;/code&gt; variable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Activating Your Automated Twitter Bot
&lt;/h3&gt;

&lt;p&gt;Once you've adjusted and tested your bot to your satisfaction, you're ready to activate its automated functions. WordPress event scheduling utilizes the &lt;code&gt;wp_loaded&lt;/code&gt; action, so we've allocated scheduling responsibilities to a separate, lightweight service for efficiency.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2023/09/twitter-bot-scheduler.json" rel="noopener noreferrer"&gt;Twitter Bot Scheduler (JSON)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install the &lt;strong&gt;Twitter Bot Scheduler&lt;/strong&gt; service definition after downloading. Within this definition, you'll find a variable &lt;code&gt;SCHEDULED_TIMES&lt;/code&gt; indicating when the bot will run each day. This variable consists of an array of string values, which you can tailor to fit your schedule. Next, activate the &lt;strong&gt;WordPress Hooks&lt;/strong&gt; platform for both services, which you can find under the &lt;strong&gt;Configuration&lt;/strong&gt; view. Finally, ensure the &lt;code&gt;AUTO_TWEET_ENABLED&lt;/code&gt; variable in the &lt;strong&gt;Twitter Bot&lt;/strong&gt; service is set to true. &lt;a href="https://convoworks.com/wp-content/uploads/2023/09/06-enabled-services.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fconvoworks.com%2Fwp-content%2Fuploads%2F2023%2F09%2F06-enabled-services-1024x347.png" alt="Fully configured and enabled services"&gt;&lt;/a&gt; If you have the &lt;a href="https://wordpress.org/plugins/wp-crontrol/" rel="noopener noreferrer"&gt;WP Crontrol&lt;/a&gt; plugin or a similar one that displays scheduled events, you should see one or more instances of the &lt;code&gt;convo_twitter_bot_daily_event&lt;/code&gt; listed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;With our visual editor, you have a wealth of customization options at your fingertips. Adjust the search query, set unique agent definitions for various post types, create a predefined list of hashtags for the bot to select from, or save generated tweets as custom post types. Should you have any questions or face any challenges, please reach out to us.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>gpt3</category>
      <category>twitter</category>
      <category>nocode</category>
    </item>
    <item>
      <title>Experimenting With GPT, WordPress, and Convoworks to Filter Spam</title>
      <dc:creator>Tihomir Dmitrović</dc:creator>
      <pubDate>Fri, 26 May 2023 06:59:39 +0000</pubDate>
      <link>https://dev.to/tolecar/experimenting-with-gpt-wordpress-and-convoworks-to-filter-spam-1lh5</link>
      <guid>https://dev.to/tolecar/experimenting-with-gpt-wordpress-and-convoworks-to-filter-spam-1lh5</guid>
      <description>&lt;p&gt;Hello everyone, as the founder and developer of &lt;strong&gt;Convoworks&lt;/strong&gt;, I am excited to share with you one of our newest packages, &lt;strong&gt;GPT&lt;/strong&gt;. This exciting new technology utilizes state-of-the-art language models to provide powerful classification capabilities.&lt;/p&gt;

&lt;p&gt;While Convoworks was primarily designed to manage conversational services, we found that it can be used to solve other common issues webmasters face, such as spam filtering.&lt;/p&gt;

&lt;p&gt;With the recent addition of the &lt;strong&gt;WordPress Hooks&lt;/strong&gt; package, we used it to create a simple yet effective spam filtering solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Functionality
&lt;/h2&gt;

&lt;p&gt;We've prepared a service template that you can quickly download and apply to your website. It incorporates a spam filter for &lt;strong&gt;Contact Form 7&lt;/strong&gt; and posts comments. The system stores messages in a custom post type, allowing you to review its workings and assess its effectiveness.&lt;/p&gt;

&lt;p&gt;For Contact Form 7, we're utilizing the &lt;code&gt;wpcf7_spam&lt;/code&gt; filter, while for comments, we use the &lt;code&gt;pre_comment_approved&lt;/code&gt; filter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up
&lt;/h2&gt;

&lt;p&gt;Getting started is straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install, and activate the Convoworks WP plugin from WordPress.org.&lt;/li&gt;
&lt;li&gt;Download, and install the &lt;strong&gt;Convoworks GPT plugin&lt;/strong&gt; from our &lt;a href="https://github.com/zef-dev/convoworks-gpt/tree/main/build"&gt;GitHub repository&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Download the &lt;strong&gt;Simple Spam Filter&lt;/strong&gt; service definition from &lt;a href="https://convoworks.com/wp-content/uploads/2023/05/spam-filter.json"&gt;our website&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;In the Convoworks admin GUI, navigate to the &lt;strong&gt;New service view&lt;/strong&gt;, and upload the downloaded service definition.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kuXGLIXg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/69714ojwp784cdgu4tcb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kuXGLIXg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/69714ojwp784cdgu4tcb.png" alt="Create a new service from the existing definition" width="693" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;Variables view&lt;/strong&gt; in your new service, and enter your &lt;strong&gt;OpenAI API key&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Now, navigate to the &lt;strong&gt;Configuration view&lt;/strong&gt;, and enable the WordPress Hooks platform. You can leave the default settings, and just click enable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qpZ2tmR6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2xqzs9hyhkdhgqxqjdwu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qpZ2tmR6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2xqzs9hyhkdhgqxqjdwu.png" alt="Enabling the WordPress Hooks" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Service Workflow
&lt;/h2&gt;

&lt;p&gt;Our service comprises a single step named "Hook Handler," which includes hook processors. There are three of these; each for a different hook. Two-handle the contact form and comments, and the third (optional) registers the custom post type.&lt;/p&gt;

&lt;p&gt;When the system checks the incoming message, it first prepares complete message information to use in the GPT Prompt. The GPT's job is to return a simple classification: &lt;code&gt;NOT_SPAM&lt;/code&gt;, &lt;code&gt;MAYBE_SPAM&lt;/code&gt;, or &lt;code&gt;SPAM&lt;/code&gt;. Our logic then acts based on this classification.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j8rfSUDZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/42vkus486tgy44lpx8ft.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j8rfSUDZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/42vkus486tgy44lpx8ft.png" alt="Contact Form 7 filter callback" width="800" height="617"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In its current form, our service stores all messages, but it can be easily modified to store them only in certain cases. You can achieve this by dragging and dropping components or using the copy/paste feature.&lt;/p&gt;

&lt;p&gt;We've implemented spam checking and database storage functionalities through reusable fragments for added convenience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oVY3qvZw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mpj9upmcz4na7b2reoii.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oVY3qvZw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mpj9upmcz4na7b2reoii.png" alt="Using the GPT API&amp;lt;br&amp;gt;
" width="800" height="578"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Custom Post Type
&lt;/h2&gt;

&lt;p&gt;You can set which custom post type should be used with the &lt;code&gt;CUSTOM_TYPE_SPAM_LOG&lt;/code&gt; service variable (Variables view).&lt;/p&gt;

&lt;p&gt;If you're using a plugin like ACF, you can register your custom post type through it. If not, our service hooks up to the &lt;code&gt;init&lt;/code&gt; action, registering a custom post type accessible through the WordPress admin interface (Spam log menu item).&lt;/p&gt;

&lt;p&gt;If you're using an ACF-defined post type, you can remove this filter.&lt;/p&gt;

&lt;p&gt;Otherwise, you can use the Admin Columns plugin to modify which columns on the Spam log view are displayed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Experiment and Customize
&lt;/h2&gt;

&lt;p&gt;I encourage you to play around with the service:&lt;/p&gt;

&lt;p&gt;Tweak the prompts to better handle your usual contact form messages or comments.&lt;/p&gt;

&lt;p&gt;Instead of custom post types, you can use Formidable Forms to store your messages. To do this, you'll need to enable the &lt;strong&gt;convo-forms&lt;/strong&gt; and &lt;strong&gt;convo-wp-plugin-pack&lt;/strong&gt; packages.&lt;/p&gt;

&lt;p&gt;As a developer, I recognize the value of robust, adaptable, and easy-to-use tools. Convoworks exemplifies these qualities, and with the addition of our new spam filtering solution, it continues to evolve and grow. Give it a try, and let us know your thoughts.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>gpt3</category>
      <category>nocode</category>
      <category>lowcode</category>
    </item>
    <item>
      <title>GPT-3 in Your Pocket? Why Not!</title>
      <dc:creator>Tihomir Dmitrović</dc:creator>
      <pubDate>Fri, 27 Jan 2023 11:15:25 +0000</pubDate>
      <link>https://dev.to/tolecar/gpt-3-in-your-pocket-why-not-9k5</link>
      <guid>https://dev.to/tolecar/gpt-3-in-your-pocket-why-not-9k5</guid>
      <description>&lt;p&gt;GPT has become a very popular topic in recent times and is being used in many different ways, from automated customer service to natural language processing.&lt;/p&gt;

&lt;p&gt;This tutorial will show you how to create a GPT-powered chatbot for the Viber app, using the WordPress and no-code plugin &lt;a href="https://convoworks.com/" rel="noopener noreferrer"&gt;Convoworks WP&lt;/a&gt;. In it, we'll explain how to set up the chatbot so that you can use GPT-3's natural language technology to ask questions and converse about any topic.&lt;/p&gt;

&lt;p&gt;Let's get started!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8hmpg1ww56zzxce7pueq.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8hmpg1ww56zzxce7pueq.gif" alt="GPT Demo chat" width="222" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;To begin setting up your GPT powered chatbot for Viber, you will need to have a WordPress installation that is publicly accessible so it can receive requests from the Viber app. Then, navigate to the Plugin Installer and install and activate Convoworks WP. Once that is done, open Convoworks WP and create a new service using the "Import from file" option. The service definition (json file) can be downloaded &lt;a href="https://convoworks.com/wp-content/uploads/2023/01/gpt-demo.json" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttwjkz4f4ibmik2272pm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttwjkz4f4ibmik2272pm.png" alt="Import Convoworks service definition" width="689" height="620"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create a Viber bot on &lt;a href="https://partners.viber.com/account/" rel="noopener noreferrer"&gt;https://partners.viber.com/account/&lt;/a&gt;. In order to do that, the only thing you need is an installed and working Viber app. Once you create it you will have an API access token which will be used in Convoworks. Note the QR code which you can use to invite users.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjiiyleb7wx1rvly1bv8b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjiiyleb7wx1rvly1bv8b.png" alt="Image description" width="800" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now open your service in Convoworks, navigate to the Configuration view and click to enable the Viber platform. Here you have to enter Viber “Auth Token” and the “Account ID”. You can find account id number in your Viber account url at &lt;a href="https://partners.viber.com/account/" rel="noopener noreferrer"&gt;https://partners.viber.com/account/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc2yml4rsi4t5w1fb32jm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc2yml4rsi4t5w1fb32jm.png" alt="Image description" width="709" height="703"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The last step is to set OpenAI auth key in the Convoworks service. In your service navigate to the Variables view and set the correct value. Here you can also set which model you are using and other parameters GPT API is using.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyep3nv9fe4y434m8kdt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyep3nv9fe4y434m8kdt.png" alt="Image description" width="800" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you just have to start using it. Go to your Viber app, open the More screen and tap on a QR code icon on top. Turn the camera to QR code on your Viber bot account page and you are in!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4p8avtxb2hbbxe0k62gj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4p8avtxb2hbbxe0k62gj.jpg" alt="Image description" width="800" height="1731"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it works?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The conversation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GPT (Generative Pre-trained Transformer) is a type of algorithm that can understand natural language and generate new text based on a given prompt. It works by using the input prompt to construct a context, and then using that context to generate text.&lt;/p&gt;

&lt;p&gt;The completion principle of GPT is that it will generate new text based on the context provided by the prompt. It is important to provide GPT with a prompt that provides enough context for the algorithm to generate related text. For example, if you provide a prompt like "What is the capital of France?", then GPT will generate text about France and its capital city.&lt;/p&gt;

&lt;p&gt;So, what we are doing here in Convoworks service, is simply setting the ${conversation} variable (empty at the beginning) which contains the full conversation (check for “Set parameter” element). We are adding to it both the user's inquiry and the bot’s responses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Http Query element&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This component allows us to create API requests and use the response data. It will fetch a completion response, add it to conversation and prepare response text we can return to the user. This functionality is placed in a fragment so we can use it in several places in the workflow.&lt;/p&gt;

&lt;p&gt;In this service we are using plain text filters to enable handling of the additional commands. Here is an example which catches “restart” or “start over” commands to reset conversation (sets ${conversation} variable to empty string).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faq3pjwa3eo4xtkxenw72.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faq3pjwa3eo4xtkxenw72.png" alt="Image description" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Text filter and special commands&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this service we are using plain text filters to enable handling of the additional commands. Here is an example which catches “restart” or “start over” commands to reset conversation (sets ${conversation} variable to empty string).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3725pwywwe4izdjagigm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3725pwywwe4izdjagigm.png" alt="Image description" width="777" height="817"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Future ideas
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Authentication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When Viber is sending requests, we are receiving the user's unique id too. If we have that id in our database, we could easily know user details and respond with a personalized message or conversation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt engineering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is much power in knowing how to form prompts to get most of the GPT. Forming the right prompt is crucial and you should play with it. Keep in mind that Convoworks is running inside WordPress and can access all its data., meaning that you can pre-populate a prompt with data from the database. You can put different conversation context if it is a new user, what was their last order … whatever you need.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;GPT-3 is an amazing technology, and it's incredible to see how it can be used to create powerful and useful applications. With the help of Convoworks, it's now possible to use GPT-3 within WordPress and Viber to create an intelligent, conversational bot. With a few simple steps, you can have GPT power in your pocket!&lt;/p&gt;

</description>
      <category>career</category>
      <category>discuss</category>
      <category>backenddevelopment</category>
      <category>uidesign</category>
    </item>
    <item>
      <title>Create your own Alexa skill with WordPress and Formidable Forms</title>
      <dc:creator>Tihomir Dmitrović</dc:creator>
      <pubDate>Fri, 15 Jul 2022 09:22:36 +0000</pubDate>
      <link>https://dev.to/tolecar/create-your-own-alexa-skill-with-wordpress-and-formidable-forms-24pf</link>
      <guid>https://dev.to/tolecar/create-your-own-alexa-skill-with-wordpress-and-formidable-forms-24pf</guid>
      <description>&lt;p&gt;Form builders are among the most popular WordPress plugins. There are dozens of them and with few having millions of active installations. Some of them are simple while others are powerful no-code tools allowing you to build amazing functionalities through them. In this article we will demonstrate how your users can access your forms through Amazon Alexa. For this example we are using a form built with &lt;a href="https://wordpress.org/plugins/formidable/"&gt;Formidable Forms&lt;/a&gt; plugin (free version).&lt;/p&gt;

&lt;p&gt;This article is followed with the attached Convoworks service and Formidable Form definitions which you can import into your system. In the article itself, we will just cover how to enable the skill and point out a few important parts in it.&lt;/p&gt;

&lt;h3&gt;Use case - Exercise Log&lt;/h3&gt;

&lt;p&gt;Let's say that you have a fitness website where your users can record their own activity and track progress. Now, instead of opening a web browser, your users will be able to save exercise results through Amazon Alexa skill - using voice only.&lt;/p&gt;

&lt;p&gt;Besides adding a new log entry, the skill can give you information about the last exercise, it tracks your maximum distance and you are able to delete the last entry. That way we covered most of the form operations you need and it should be rather easy to reuse examples in your own project.&lt;/p&gt;

&lt;p&gt;The example form we used for our skill is quite similar to the &lt;a href="https://formidableforms.com/form-templates/exercise-log-form/"&gt;Exercise Log Form Template&lt;/a&gt; available in the plugin premium version. In our example we skipped date/time and the comment fields. We also changed field keys to be readable (instead of having hash as a key) and we used just plain textual fields.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iB_kHIS---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d4dpkrmo23w6p65dj82p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iB_kHIS---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d4dpkrmo23w6p65dj82p.png" alt="Image description" width="394" height="676"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Prerequisites&lt;/h3&gt;

&lt;p&gt;There are several things to check and set up before you continue. &lt;/p&gt;

&lt;h4&gt;1. Publicly accessible WordPress installation&lt;/h4&gt; 

&lt;p&gt;Your server has to be able to accept request from Amazon. If you do not have server on your own, you can use online WordPress testing tools like &lt;a href="https://convoworks.com/create-your-first-amazon-alexa-skill-using-convoworks-wordpress-plugin-and-instawp-no-server-no-registration-required/"&gt;InstaWP&lt;/a&gt;. The second option is to install a &lt;a href="https://convoworks.com/developing-alexa-skills-locally-through-wordpress-with-ngrok/"&gt;tunnel&lt;/a&gt; and use your local installation.&lt;/p&gt;

&lt;h4&gt;2. Installed Formidable Forms plugin&lt;/h4&gt;

&lt;p&gt;Just go to your plugin installer and add Formidable Form Builder plugin.&lt;/p&gt;

&lt;h4&gt;3. Convoworks WP - Installed and connected to Alexa&lt;/h4&gt;

&lt;p&gt;Please make sure that your Convoworks plugin is linked and that you are able to create Alexa skills. You can find more on that in &lt;a href="https://convoworks.com/docs/publishers/platforms-configuration/amazon-alexa/"&gt;Amazon Alexa platform configuration&lt;/a&gt; or you can watch our &lt;a href="https://youtu.be/7lx5_ZqazvA"&gt;Connect to Amazon and create your first Alexa skill&lt;/a&gt; video tutorial. &lt;/p&gt;

&lt;h3&gt;Import and configure Exercise log Alexa skill&lt;/h3&gt;

&lt;p&gt;Few steps to import all definitions, eventual configuration and make the skill work.&lt;/p&gt;

&lt;h4&gt;1. Import exercise log form into the Formidable Forms&lt;/h4&gt;

&lt;p&gt;You can import the attached xml form definition (below). To build this form we used regular text editors for all fields except the &lt;b&gt;Activity&lt;/b&gt;, which is a radio selector. When communicating with form builders, we prefer keys over ids. Keys are persistent, while ids will vary from installation to installation. Here are the form and field keys we used in our example. Form is &lt;code&gt;exerciselog&lt;/code&gt;, while fields are &lt;code&gt;el_activity&lt;/code&gt;, &lt;code&gt;el_calories&lt;/code&gt;, &lt;code&gt;el_distance&lt;/code&gt;, &lt;code&gt;el_max_pulse&lt;/code&gt;, and &lt;code&gt;el_rest_pulse&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/07/exercise-log-form.xml" rel="nofollow"&gt;Formidable Forms  definition (XML)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6wi8uFXS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hcsfkm97h66477s71oyu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6wi8uFXS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hcsfkm97h66477s71oyu.png" alt="Image description" width="880" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;2. Create Exercise Log Convoworks service&lt;/h4&gt;

&lt;p&gt;Start a new service in Convoworks, and select &lt;strong&gt;Import from file&lt;/strong&gt; option. Use the service definition you can download below. If your form uses different keys for form and fields, navigate to the &lt;strong&gt;Variables&lt;/strong&gt; view and adjust values. You might also consider adjusting values for the app name (if you changed it) and the test user. We'll cover more on test user usage in &lt;strong&gt;Resolving the current user&lt;/strong&gt; section below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/07/exercise-log.json" rel="nofollow"&gt;Convoworks service definition (JSON)&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;3. Connect it to Alexa and enable account linking&lt;/h4&gt;

&lt;p&gt;Now go to &lt;strong&gt;Configuration / Amazon Alexa&lt;/strong&gt; in Convoworks. Check the &lt;strong&gt;Enable Account Linking for Alexa Skill&lt;/strong&gt; option and disable the &lt;strong&gt;Allow users to enable skill without account linking&lt;/strong&gt;. Save and wait for a minute until the service is fully built on Amazon. &lt;/p&gt;

&lt;h4&gt;4. Link account in your Alexa app&lt;/h4&gt;

&lt;p&gt;Open your &lt;a href="https://alexa.amazon.com"&gt;Alexa app&lt;/a&gt;, navigate to &lt;strong&gt;Your skills / Dev skills&lt;/strong&gt;. Press on the Settings button and link account. By doing it, each request that comes through Alexa to our skill will have an OAuth token, which will enable us to authenticate the current user.&lt;/p&gt;

&lt;p&gt;You can find more on it in our &lt;a href="https://convoworks.com/docs/publishers/platforms-configuration/amazon-alexa-account-linking/"&gt;Amazon Alexa account linking&lt;/a&gt; article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fNkt8E_6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gq38jiz8uqwb8evgctsj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fNkt8E_6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gq38jiz8uqwb8evgctsj.png" alt="Image description" width="450" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Test your new Alexa skill&lt;/h3&gt;

&lt;p&gt;If you have an Echo device, invoke the skill and try to use it. You can also try to test it through the &lt;a href="https://developer.amazon.com/alexa/console/ask"&gt;ASK console&lt;/a&gt;. This way you can "chat" with your skill using their Test view.&lt;/p&gt;

&lt;p&gt;You can also use Convoworks Test view which is a handful tool because it allows you to peek into all variables existing during the current request execution.&lt;/p&gt;

&lt;p&gt;Few words about skill functionality.&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Skill distinguishes between first time and returning users, so some responses are slightly different. To try again first time use, disable and enable skill again.&lt;/li&gt;
    &lt;li&gt;You can just open the skill, &lt;em&gt;Alexa, open exercise log&lt;/em&gt; and follow the workflow step by step.&lt;/li&gt;
    &lt;li&gt;You can add additional command while invoking the skill: &lt;em&gt;Alexa, ask exercise log to record my running exercise&lt;/em&gt;. In this case you will automatically be in the new entry workflow.&lt;/li&gt;
    &lt;li&gt;Once you have entries, you can get more info on last entry and ability to delete it.&lt;/li&gt;
    &lt;li&gt;You can ask for help.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Few significant parts to check&lt;/h3&gt;

&lt;p&gt;There are several parts in our service that you should check and get to know how to use. Some parts are related to the form data while others are related to the general features you can use in Convoworks.&lt;/p&gt;

&lt;h4&gt;Initializing data&lt;/h4&gt;

&lt;p&gt;When the skill starts, we want to do some checks and preload some data that will be required in our workflow. &lt;/p&gt;

&lt;p&gt;Navigate to the &lt;strong&gt;Session start&lt;/strong&gt; step in Convoworks editor and check the &lt;strong&gt;Pre-dispatch Flow&lt;/strong&gt; section. This flow is executed when skill is started (new session starts). It will be executed no matter if the skill is opened regularly (just invocation name) or with additional command. As you can see we are using it to check the current user, load last entry data and to initiate a new entry. &lt;br&gt;
Hint: You can click on a fragment name to navigate to its definition.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C0d-C-aZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5h6darvk0zc95m5s2niu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C0d-C-aZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5h6darvk0zc95m5s2niu.png" alt="Image description" width="675" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Resolving the current user&lt;/h4&gt;

&lt;p&gt;Our service works only for known users, so in the &lt;strong&gt;Resolve user&lt;/strong&gt; fragment we are trying to load user data and if it fails, we are ending a session.&lt;br&gt;
&lt;strong&gt;Init current auth user&lt;/strong&gt; element will load user data if the account is properly linked. Click on the element and check its help (on right side) for more details.&lt;/p&gt;

&lt;p&gt;The if element at the beginning serves to enable ability to test skill even in Convoworks test view, which does not support account linking. We are checking against a predefined device id that comes with the request (&lt;code&gt;admin-chat&lt;/code&gt;). If we detect that it is a test view call, we are using the &lt;code&gt;TEST_USER_ID&lt;/code&gt; which can be adjusted in the variables view.&lt;/p&gt;

&lt;p&gt;Please note that the &lt;code&gt;user_id&lt;/code&gt; is stored in the session scope, meaning that it will be available through all subsequent calls.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4e9Rr82a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6tqn6n83iu4vgpgxs90l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4e9Rr82a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6tqn6n83iu4vgpgxs90l.png" alt="Image description" width="667" height="890"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Formidable Forms context&lt;/h4&gt;

&lt;p&gt;This is the actual adapter that enables us to use the Formidable Forms plugin. By entering and accessing data through a plugin infrastructure (instead of just performing SQL queries), we are ensuring that all plugin actions and filters will be applied. That way if you hook up some additional actions to your Formidable form, they will be triggered through Alexa skill, just as it would through the default web interface.&lt;/p&gt;

&lt;p&gt;Here we are setting the id for the context (so that other form elements are able to reference it), with which form we are working and the user id which will be used when creating entries.&lt;/p&gt;

&lt;p&gt;Check the component’s help to learn about some Formidable Forms specifics.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jpA8uOl1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbrupdsdbbrdaze67789.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jpA8uOl1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbrupdsdbbrdaze67789.png" alt="Image description" width="405" height="625"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Loading the last entry&lt;/h4&gt;

&lt;p&gt;For loading previous entries we are using &lt;strong&gt;Search Form Entries&lt;/strong&gt; element. Here we are filtering form entries created by the logged user and making sure that we load just a single, the last one.&lt;/p&gt;

&lt;p&gt;In case when there were existing entries, we are performing an additional query to get the maximum distance made in previous exercises. For that we are using &lt;strong&gt;WP DB Element&lt;/strong&gt;, a generic component for accessing any WordPress database table. Please note how we can reference the context and call methods on it - in this case to get numeric ids from a given field and form keys.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7C9XZKUT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c102vwvu535zg26lmo73.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7C9XZKUT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c102vwvu535zg26lmo73.png" alt="Image description" width="880" height="713"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Saving the form entry&lt;/h4&gt;

&lt;p&gt;Through the conversation workflow we are navigating through several steps and collecting data. Once the user confirms it, we can try to save it. We are doing that on the &lt;strong&gt;Entry - Confirm&lt;/strong&gt; step using the &lt;strong&gt;Create Form Entry&lt;/strong&gt; element. &lt;/p&gt;

&lt;p&gt;When you are gathering user data through the skill, you have to take care that the data is valid. If it is not it might happen that the entry creation fails due the validation errors. In such a case, &lt;strong&gt;Validation error&lt;/strong&gt; flow will be executed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dVICmO5B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f3qgb05r7xc351hb1ux4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dVICmO5B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f3qgb05r7xc351hb1ux4.png" alt="Image description" width="880" height="652"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Deleting the form entry&lt;/h4&gt;

&lt;p&gt;Our &lt;strong&gt;Last exercise info&lt;/strong&gt; step informs the user that it can delete the last entry. For that we are using the &lt;strong&gt;Delete Form Entry&lt;/strong&gt; element, which besides context id of the form plugin implementation, requires the id of the entry which will be deleted.&lt;/p&gt;

&lt;p&gt;After the entry is deleted, we will reload the last entry info and read that info back.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mMVVb0Cy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6k9h10q8yf5hhyaadn64.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mMVVb0Cy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6k9h10q8yf5hhyaadn64.png" alt="Image description" width="880" height="625"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Global and local help&lt;/h4&gt;

&lt;p&gt;We have one global, default help which informs the user with basic instruction on how to use skill. This definition can be found in &lt;strong&gt;Service processors&lt;/strong&gt; step, which contains processors which should be always considered for the execution.&lt;/p&gt;

&lt;p&gt;However, you can find processors which are catching &lt;strong&gt;HelpIntent&lt;/strong&gt; on the &lt;strong&gt;Entry . Activity&lt;/strong&gt; and &lt;strong&gt;Entry . Pulse&lt;/strong&gt; steps. That means that if the user is on one of those two steps, it will trigger this local processor and not the one in service processors.&lt;/p&gt;




&lt;p&gt;If you are using WordPress form builders, think of the use case which might be convenient to be used with voice. The one which you or your users would like to access often. The frequent use is ideal for voice. &lt;/p&gt;

&lt;p&gt;This example requires account linking, but you can create a skill which allows public access (e.g. school league results) or you can even ask users to access their Amazon profile data (name, email) and add to the mailing list. Of course, with their permission to do that.&lt;/p&gt;

&lt;p&gt;To find more about Convoworks forms package and philosophy behind, at our &lt;a href="https://github.com/zef-dev/convoworks-pckg-forms"&gt;Forms package for Convoworks&lt;/a&gt; at GitHub.&lt;/p&gt;

&lt;p&gt;If you have any problems or questions, drop a comment below or contact us through the contact form.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>alexa</category>
      <category>nocode</category>
      <category>voicefirst</category>
    </item>
    <item>
      <title>Create company directory Alexa skill for your business - No coding required</title>
      <dc:creator>Tihomir Dmitrović</dc:creator>
      <pubDate>Wed, 25 May 2022 18:19:15 +0000</pubDate>
      <link>https://dev.to/tolecar/create-company-directory-alexa-skill-for-your-business-no-coding-required-3k00</link>
      <guid>https://dev.to/tolecar/create-company-directory-alexa-skill-for-your-business-no-coding-required-3k00</guid>
      <description>&lt;p&gt;People search the internet to get answers and voice search is steadily becoming a common way to get answers to questions. In fact, according to a &lt;a href="https://www.pwc.com/us/en/advisory-services/publications/consumer-intelligence-series/voice-assistants.pdf"&gt;PwC survey&lt;/a&gt;, 71% of consumers would rather use a voice assistant to search for something rather than type it into a search engine.&lt;/p&gt;

&lt;p&gt;Why not utilize voice further, and have a voice assistant directly answer those questions? The question and answer format of FAQs is suitable for the conversational nature of voice assistants and their applications.&lt;/p&gt;

&lt;p&gt;On account of that, we created a &lt;strong&gt;Company Directory&lt;/strong&gt; skill with placeholder Convoworks content that you can modify to answer your own company's frequently asked questions and increase customer engagement.&lt;/p&gt;

&lt;p&gt;In the next sections, you'll learn how the skill works and how to modify it to suit your own needs.&lt;/p&gt;

&lt;h3&gt;What does the skill do?&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Company Directory&lt;/strong&gt; is primarily intended as an Alexa skill that lets your customers ask questions about your business or product.&lt;/p&gt;

&lt;p&gt;We set up the service as a &lt;strong&gt;Convoworks Directory&lt;/strong&gt;. We'll get to the part where you turn it into your company's FAQ later on in this post. First, let's touch on how the service works in its current state.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ad96VN-W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/05/first-time-user.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ad96VN-W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/05/first-time-user.png" alt="" width="506" height="142"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the introductory message, the user is asked what question they have. If the question is not matched to available questions, they are given an example of what they can ask. The user is also notified that they can ask for suggestions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/03/returning-user.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dIAyOD94--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/03/returning-user.png" alt="" width="493" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that the reprompt and fallback texts, as well as the introductory message, differ slightly depending on if it's the first-time user or a returning one.&lt;/p&gt;

&lt;p&gt;After the user gets an answer to their question, they are asked what else they wanted to know. The user can always answer with 'nothing' and the service will exit.&lt;a href="https://convoworks.com/wp-content/uploads/2022/03/what-else.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LSzNqFsl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/03/what-else.png" alt="" width="491" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They can also answer with 'I don't know, 'I'm not sure' etc. and they'll be redirected to the &lt;strong&gt;Suggestions&lt;/strong&gt; flow. There, they'll first be offered one suggestion, and if they refuse that one, the next two suggestions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/03/i-dont-know.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wlBHzSD---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/03/i-dont-know.png" alt="" width="495" height="190"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The questions that were already asked, or suggested in the current session are excluded from suggestions.&lt;/p&gt;

&lt;p&gt;If the user still can't decide, the suggested information is picked for them and the service moves on to the facts flow. If, on the other hand, the user refuses all suggestions, the service plays a goodbye message and exits.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/03/learn-more-e1648052615592.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D8DirYrH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/03/learn-more-e1648052615592.png" alt="" width="481" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the user has picked a suggestion, we proceed to the &lt;strong&gt;Facts&lt;/strong&gt; flow. There, after the chosen suggestion is read first, the user is asked if they want to hear more. If the answer is yes, another company FAQ information is read out to the user, and so on until the system runs out of things to say. The user can then start over the&lt;strong&gt; Facts&lt;/strong&gt; flow or exit the app. As is the case in the &lt;strong&gt;Suggestions&lt;/strong&gt; flow, information that the user has already asked about is excluded from this flow.&lt;/p&gt;

&lt;p&gt;If the user has answered 'no' to the 'Hear more?' question, the service exits after a goodbye message.&lt;/p&gt;

&lt;p&gt;As you can see, the service can be divided into three flows, the main one being the&lt;strong&gt; FAQ&lt;/strong&gt; flow, with the two supporting sub-flows there to help struggling users.&lt;/p&gt;

&lt;h3&gt;How do I set it up?&lt;/h3&gt;

&lt;p&gt;We'll provide a &lt;strong&gt;Company Directory&lt;/strong&gt; service definition and you just need to follow these simple steps to set the service up.&lt;/p&gt;

&lt;p&gt;&lt;a title="" href="https://convoworks.com/wp-content/uploads/2022/05/company-directory.json"&gt;Service definition&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to &lt;strong&gt;Add new service&lt;/strong&gt; view in Convoworks WP and select &lt;strong&gt;Import from file&lt;/strong&gt; option. Upload the service definition from the link above. After that, navigate to the &lt;strong&gt;Configuration&lt;/strong&gt; view and publish it to Amazon.&lt;/p&gt;

&lt;p&gt;If this is your first time using Convoworks you might want to check out our "Connect to Amazon and create your first Alexa skill tutorial" from &lt;a href="https://youtube.com/playlist?list=PL9eUOVS2fICHc7FF48opQyOWUDVvNoNFD"&gt;Convoworks Basics&lt;/a&gt; video series.&lt;/p&gt;

&lt;p&gt;Lastly, after the changes have taken effect, you can test the service in the Convoworks &lt;strong&gt;Test&lt;/strong&gt; chatbox to make sure it's good to go.&lt;/p&gt;

&lt;p&gt;Now, let's take a look at how to make changes to the service.&lt;/p&gt;

&lt;h3&gt;How do I modify it?&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/03/blocks-e1648052595472.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E5XS63Ce--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/03/blocks-e1648052595472.png" alt="" width="312" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see from the image above, the service's flows are reflected in the block names. The main block is the &lt;strong&gt;FAQ&lt;/strong&gt; one. The&lt;strong&gt; FAQ - home&lt;/strong&gt; block leads to the &lt;strong&gt;Suggestions&lt;/strong&gt; block when the user is not sure what they can't or want to ask. If the user accepts the first suggestion, they move on to the &lt;strong&gt;Suggestions - yes - facts&lt;/strong&gt; block. And if they refuse the suggestion, they are given the next two suggestions in the&lt;strong&gt; Suggestions - no&lt;/strong&gt; block. After they pick one of the two suggestions in the &lt;strong&gt;Suggestions - no&lt;/strong&gt; block, they return back to the &lt;strong&gt;FAQ - home&lt;/strong&gt; block.&lt;/p&gt;

&lt;p&gt;Most of the modifications you'll have to make to the service will be limited to the JSON file we'll provide.&lt;/p&gt;

&lt;p&gt;You'll have to upload that  JSON file and paste the URL link into the &lt;span&gt;FAQ_FILE_PATH&lt;/span&gt; variable value. The JSON needs to be in the following format:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/04/JSON-e1649070213401.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GGgK3MZ_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/04/JSON-e1649070213401-1024x753.png" alt="" width="880" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can download it below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/04/CONVO_FAQ.json"&gt;Company FAQ JSON&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The JSON file is loaded and separated into two arrays at the beginning of each session in the &lt;strong&gt;Pre-Dispatch&lt;/strong&gt; flow of the &lt;strong&gt;Session start&lt;/strong&gt; block. The &lt;strong&gt;body&lt;/strong&gt; array, contains both the &lt;span&gt;suggestions_no&lt;/span&gt; and &lt;span&gt;all&lt;/span&gt; values, while the &lt;strong&gt;FAQ_array&lt;/strong&gt; contains only the &lt;span&gt;all&lt;/span&gt; category values.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/04/PRE-DISPATCH.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KrZVBqW3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/04/PRE-DISPATCH.png" alt="" width="625" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next step is to replace all the values (except &lt;strong&gt;id&lt;/strong&gt; values) with your own. You can also delete groups of values sorted by &lt;strong&gt;id&lt;/strong&gt; or add additional groups, just keep in mind that for each group you delete in the &lt;strong&gt;all&lt;/strong&gt; category, you'll need to delete the corresponding intent later on. Or if you add additional groups with new &lt;strong&gt;ids&lt;/strong&gt;, you'll also need to create and add intents for them.&lt;/p&gt;

&lt;p&gt;Most of the data is in the &lt;strong&gt;all&lt;/strong&gt; category. &lt;span&gt;faq_suggestion&lt;/span&gt; belongs to the &lt;strong&gt;FAQ - home&lt;/strong&gt; block where if the user question is not recognized, an appropriate suggestion will be offered in the block &lt;strong&gt;fallback&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1e3MKaVN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/05/suggestion-e1651573395823.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1e3MKaVN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/05/suggestion-e1651573395823.png" alt="" width="555" height="821"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;span&gt;answer&lt;/span&gt; values are used in the &lt;strong&gt;Service processors&lt;/strong&gt; &lt;strong&gt;Questions&lt;/strong&gt; fragment to connect JSON &lt;span&gt;id&lt;/span&gt; with intent&lt;strong&gt; faq_id&lt;/strong&gt; and give the appropriate answer to the user question.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/04/reads-out.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--beFpCxEw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/04/reads-out.png" alt="" width="594" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They are also used to form the &lt;strong&gt;facts&lt;/strong&gt; array for the &lt;strong&gt;Suggestions - yes - facts&lt;/strong&gt; block&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/04/facts.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7iUv8BGc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/04/facts.png" alt="" width="599" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The values with the &lt;span&gt;suggestion&lt;/span&gt; prefix are used in the &lt;strong&gt;Suggestions&lt;/strong&gt; block only. As you can probably guess, &lt;span&gt;suggestions_no, &lt;/span&gt;which has a separate category, is only used in the &lt;strong&gt;Suggestions - no&lt;/strong&gt; block. &lt;span&gt;suggestions_no&lt;/span&gt; stores two &lt;strong&gt;ids&lt;/strong&gt; that correspond to the two suggestions that are offered to the user.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/04/suggestions_no.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cLelBZRW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/04/suggestions_no.png" alt="" width="600" height="619"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you've prepared the JSON file, you'll need to upload it and paste the link to the &lt;span&gt;FAQ_FILE_PATH&lt;/span&gt; variable value. On the &lt;strong&gt;Variables&lt;/strong&gt; panel, you'll also find all the variables used in the text. You should change their values as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/03/Variables.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SPdFg79l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/03/Variables.png" alt="" width="658" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The second step would be modifying the FAQ intents. You can see them gathered in the &lt;strong&gt;Questions&lt;/strong&gt; fragment. Each intent has a&lt;strong&gt; faq_id &lt;/strong&gt;value that corresponds to the &lt;strong&gt;id&lt;/strong&gt; value in the JSON. If you've added new groups with corresponding &lt;strong&gt;ids&lt;/strong&gt; you'll need to place a new intent with the corresponding &lt;strong&gt;faq_id&lt;/strong&gt; there as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/03/faq_id.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ezre88j_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/03/faq_id.png" alt="" width="657" height="682"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Head over to &lt;strong&gt;Intent Model&lt;/strong&gt; to view all the available intents. You should rename intents to suit your own company, and change, delete or modify their utterances as well. After you've modified the intent name, you'll need to update it in the &lt;strong&gt;Questions&lt;/strong&gt; fragment too. Lastly, you'll need to propagate the service in order for the changes to take effect. One more thing concerning the intents, if you experience any issues with intent overmatching because of the sheer number of intent and similarity in utterances, if paring down doesn't work, we recommend experimenting with the &lt;strong&gt;Interaction Model Sensitivity &lt;/strong&gt;in the &lt;strong&gt;Configuration &lt;/strong&gt;settings.&lt;/p&gt;

&lt;p&gt;The last step will require a bit more service editing, as you'll need to make some minor changes to the text not listed in JSON. To make things easier, you can find the compiled locations of all the text that potentially requires modification below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session start&lt;/strong&gt; block -&lt;strong&gt; Read Phase&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/04/session-start-greeting.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vKwSmFIT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/04/session-start-greeting.png" alt="" width="610" height="692"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session start&lt;/strong&gt; block - &lt;strong&gt;Fallback&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/04/suggestions-fallback.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T_7-6IlK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/04/suggestions-fallback.png" alt="" width="627" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;FAQ&lt;/b&gt; block - &lt;strong&gt;Read Phase&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/04/product-name.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vgCwvRKH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/04/product-name.png" alt="" width="595" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FAQ &lt;/strong&gt;block - &lt;strong&gt;Fallback&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/04/first-call.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YWy6ErgS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/04/first-call.png" alt="" width="592" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Service processors &lt;/strong&gt; block - &lt;strong&gt;Help&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/04/help-e1649083798425.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gV5Y_UdM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/04/help-e1649083798425.png" alt="" width="594" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What improves the skill's user experience, but makes it more time-consuming to make modifications to, are those many variations in suggestions and responses. Hopefully, we've managed to make the process of adding your own text easier.&lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;This post showcases a skill that makes use of the classic FAQ and adapts it for use with Alexa. The &lt;strong&gt;Company Directory &lt;/strong&gt;skill lets your customers ask questions about your business or product with additional flows helping struggling customers.&lt;/p&gt;

&lt;p&gt;The service preset we offer for download is a &lt;strong&gt;Convoworks Directory&lt;/strong&gt; skill, but with modifications, it can become your business' or company's skill, going beyond the classic FAQ format, and thus increasing your customer engagement.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>alexa</category>
      <category>nocode</category>
    </item>
    <item>
      <title>Remind your users about scheduled appointments with Amazon Alexa and WordPress</title>
      <dc:creator>Tihomir Dmitrović</dc:creator>
      <pubDate>Thu, 17 Feb 2022 15:49:13 +0000</pubDate>
      <link>https://dev.to/tolecar/remind-your-users-about-scheduled-appointments-with-amazon-alexa-and-wordpress-3o8b</link>
      <guid>https://dev.to/tolecar/remind-your-users-about-scheduled-appointments-with-amazon-alexa-and-wordpress-3o8b</guid>
      <description>&lt;p&gt;Alexa's reminders feature lets users receive a "barge-in" notification at a predetermined time. Alexa delivers the reminder by chiming and reading out the reminder message.&lt;/p&gt;

&lt;p&gt;By integrating Alexa's &lt;a href="https://developer.amazon.com/en-US/docs/alexa/smapi/alexa-reminders-api-reference.html"&gt;Reminders API&lt;/a&gt; in your skill you can increase the engagement of your skill and extend utility beyond users having to launch the skill to get the most out of its features. Integrating reminders has never been easier with the help of Convoworks &lt;strong&gt;Reminder&lt;/strong&gt; &lt;strong&gt;elements&lt;/strong&gt;. You can find five elements in our &lt;span&gt;convo-alexa&lt;/span&gt; package to help you handle creating, loading, updating, and deleting reminders.&lt;/p&gt;

&lt;p&gt;In this post, we'll go over the &lt;strong&gt;Reminders&lt;/strong&gt; basics and how we implemented them with our &lt;strong&gt;Schedule Appointments&lt;/strong&gt; template.&lt;/p&gt;

&lt;h3&gt;Alexa Reminders&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Alexa Reminders API&lt;/strong&gt; is a set of &lt;span&gt;RESTful APIs that enable developers&lt;/span&gt; to create and manage reminders for users as part of the skill experience.  The user needs to grant permission for reminders, both when enabling a skill and in-skill before each reminder is set. If push notification is enabled, the reminder will be sent as a push notification on the Alexa mobile app as well.&lt;/p&gt;

&lt;p&gt;The skill can create a one-time or a recurring reminder. If a reminder is recurring, it can be set to occur either weekly or on specific days. In the case of the &lt;strong&gt;Schedule Appointments&lt;/strong&gt; reminders integration, we'll be setting a one-time reminder, an hour before the appointment starts. But, more on that later on, in the walkthrough section.&lt;/p&gt;

&lt;p&gt;Developers can use the &lt;strong&gt;Reminders API&lt;/strong&gt; in two ways: for in-session interactions and out-of-session interactions. Out-of-session interactions don't require users to interact directly with a skill. The user can delete, update and read reminders out-of-session, however they cannot create one. The in-session interaction allows the creation, updating, deleting, and reading of reminders while the user interacts with a skill.&lt;/p&gt;

&lt;p&gt;In Convoworks, we have created five specific elements to handle those interactions and cover all &lt;strong&gt;Reminders API&lt;/strong&gt; options.&lt;/p&gt;

&lt;h3&gt;Set up Schedule Appointments template with Reminders&lt;/h3&gt;

&lt;p&gt;We have already created an updated version of our &lt;strong&gt;Schedule Appointments&lt;/strong&gt; template that lets you take advantage of reminders. Just follow these simple steps to set up the service and get it going.&lt;/p&gt;

&lt;p&gt;&lt;a title="Schedule Appointments - With Reminders - Service definition" href="https://convoworks.com/wp-content/uploads/2022/02/schedule-appointment-reminders.json"&gt;Service definition&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to &lt;strong&gt;Add new service&lt;/strong&gt; view in Convoworks WP and select &lt;strong&gt;Import from file&lt;/strong&gt; option. Upload the service definition from the link above. Navigate to the &lt;strong&gt;Configuration&lt;/strong&gt; view and publish it to Amazon.&lt;/p&gt;

&lt;p&gt;If you are first time using Convoworks you might want to check out our &lt;a href="https://youtu.be/7lx5_ZqazvA"&gt;Connect to Amazon and create your first Alexa skill&lt;/a&gt; tutorial from &lt;a href="https://youtube.com/playlist?list=PL9eUOVS2fICHc7FF48opQyOWUDVvNoNFD"&gt;Convoworks Basics&lt;/a&gt; video series.&lt;/p&gt;

&lt;p&gt;Lastly, after the changes have taken effect, you can test the service to make sure it's good to go. As reminders are a specific feature, the skill can be tested either in &lt;strong&gt;Alexa mobile app&lt;/strong&gt; or real &lt;strong&gt;Echo device&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Now, let's take a look under the hood.&lt;/p&gt;

&lt;h3&gt;Schedule Appointments with Reminders - Service walkthrough&lt;/h3&gt;

&lt;p&gt;This will not be a walkthrough of the whole &lt;strong&gt;Schedule Appointments&lt;/strong&gt; template and an explanation of its inner workings. You can visit the &lt;a href="https://convoworks.com/appointment-scheduling-on-your-wordpress-website-now-with-amazon-alexa-skill/"&gt;Appointment scheduling on your WordPress&lt;/a&gt; blog post for that.&lt;/p&gt;

&lt;p&gt;In this section, we'll take a look only at the added &lt;strong&gt;Reminders&lt;/strong&gt; flow. As mentioned before, in the case of the &lt;strong&gt;Schedule Appointments&lt;/strong&gt; reminders integration, we've added a one-time reminder option, an hour before the appointment starts. The user is free to decline a reminder, and it won't be set.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aQJ_FMAd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/02/7-days.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aQJ_FMAd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/02/7-days.png" alt="Ask for reminding no more than once per week " width="622" height="655"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;span&gt;Moreover, the user won't be asked for another reminder for seven days after they declined. This is in accordance with the &lt;a href="https://developer.amazon.com/en-US/docs/alexa/smapi/alexa-reminders-guidelines-for-usage.html"&gt;Alexa Reminders Guidelines&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Before the user is asked if they want a reminder in the &lt;strong&gt;Schedule Appointment&lt;/strong&gt; block, the service checks if seven days have passed since the last time the user had said no to the reminder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CBtPUoQ1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/02/create-reminder.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CBtPUoQ1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/02/create-reminder.png" alt="" width="569" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If this is a first-time user, or the user hasn't reclined remainders in the last seven days we can proceed to the &lt;strong&gt;Create reminder&lt;/strong&gt; block, where the user is asked if they want a reminder one hour before the appointment. We decided to use a predefined reminder to make conversation more convenient.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BqWjDGnZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/02/reminder-time.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BqWjDGnZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/02/reminder-time.png" alt="" width="880" height="714"&gt;&lt;/a&gt;You can modify the reminder time on the &lt;strong&gt;Variables&lt;/strong&gt; Convoworks view. Given how the service is set up currently, the time of the reminder can be only on the day of the appointment and is calculated as the time before the appointment in the &lt;strong&gt;Get reminder time and text&lt;/strong&gt; fragment.&lt;/p&gt;

&lt;p&gt;&lt;span&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7541f7n9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/02/reminder-time-and-text.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7541f7n9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/02/reminder-time-and-text.png" alt="Setting Alexa reminder time and text" width="658" height="523"&gt;&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p&gt;In the same fragment is the &lt;span&gt;reminder_text&lt;/span&gt; variable which you can modify as well. This is the text that will be read out to the user during the reminder delivery.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6_YD4Clp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/02/reminders-missing.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6_YD4Clp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/02/reminders-missing.png" alt="Alexa reminders not granted" width="611" height="644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before creating an actual reminder, we have to check if the user granted the reminder permission. If the permission has been granted the&lt;strong&gt; Create Alexa Reminder Element &lt;/strong&gt; creates the reminder with the inputted data.&lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;In this post, we went over the example of using reminders in the appointment booking scenarios. Reminders are a useful tool for increasing the engagement of your skill and extending its utility and hopefully, you can use this example as a starting point on your integrating reminders into skills journey.&lt;/p&gt;

</description>
      <category>convoworks</category>
      <category>alexa</category>
      <category>wordpress</category>
    </item>
    <item>
      <title>Appointment scheduling on your WordPress website - Now with Amazon Alexa skill</title>
      <dc:creator>Tihomir Dmitrović</dc:creator>
      <pubDate>Mon, 31 Jan 2022 17:50:50 +0000</pubDate>
      <link>https://dev.to/tolecar/appointment-scheduling-on-your-wordpress-website-now-with-amazon-alexa-skill-1cam</link>
      <guid>https://dev.to/tolecar/appointment-scheduling-on-your-wordpress-website-now-with-amazon-alexa-skill-1cam</guid>
      <description>&lt;p&gt;Many of the WordPress based websites have some kind of appointment scheduling functionality. To be more precise, there are a dozen most popular plugins which are powering at least 150K websites. Hairdresser salons, dentists, online events, there are many use cases which require booking functionality. Wouldn't it be great to be able to offer your customers the same functionality via smart speakers (e.g. Amazon Alexa)?&lt;/p&gt;

&lt;p&gt;Voice assistants are in constant rise and are proving themselves as the user interface that you will not be able to avoid in the future. Right now, developing voice apps seems reserved for the enterprise market only, primarily because of high development costs, but in the WordPress world it can be easily changed. That is exactly what we have done and you can have your appointment booking Alexa skill in no time, for free.&lt;/p&gt;

&lt;h2&gt;Appointment booking plugins compatibility&lt;/h2&gt;

&lt;p&gt;As each appointment scheduling plugin has its own functions, database structure, ... you must be wondering how we plan to overcome that issue. As we can not completely solve it, we designed our solution in such a manner that it consists of two parts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The first&lt;/strong&gt; is our &lt;code&gt;convo-appointments&lt;/code&gt; package, generic appointment booking solution, not tied to any plugin, not even to WordPress. This part is focused on solving &lt;strong&gt;conversation design&lt;/strong&gt; requirements, while the real data (load, create ...) is delegated to the appointments context component (data source). This package comes with one dummy appointments context implementation that can serve you as an example how to implement it for your own plugin, or just  testing the skill workflow. This package also contains a ready to use Alexa skill template. You can find more about this package on the &lt;a href="https://github.com/zef-dev/convoworks-pckg-appointments"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The second&lt;/strong&gt; part is concrete &lt;strong&gt;appointments context implementation&lt;/strong&gt;, which internally calls required plugin functions and does required data transformations. At the moment, we are providing implementation for the &lt;a href="https://wordpress.org/plugins/simply-schedule-appointments/"&gt;Simply Schedule Appointments&lt;/a&gt; WordPress plugin and you can find it in &lt;code&gt;convo-wp-plugin-pack&lt;/code&gt; components package. In the ideal case, your appointments plugin will already include its own custom package with an appointments context implementation.&lt;/p&gt;

&lt;p&gt;In this article, we will explain basic functionality of the skill itself, how to install it on your own installation and if you have &lt;a href="https://wordpress.org/plugins/simply-schedule-appointments/"&gt;Simply Schedule Appointments&lt;/a&gt; plugin, how to switch the skill to use it.&lt;/p&gt;

&lt;p&gt;If this is your first contact with Convoworks, you might want to first check some basics in our &lt;a href="https://convoworks.com/docs/publishers/tutorial-getting-started/"&gt;documentation&lt;/a&gt; or the &lt;a href="https://www.youtube.com/playlist?list=PL9eUOVS2fICHc7FF48opQyOWUDVvNoNFD"&gt;Convoworks basics&lt;/a&gt; video tutorial series.&lt;/p&gt;

&lt;h2&gt;"Schedule Appointments" - Alexa skill template overview&lt;/h2&gt;

&lt;p&gt;The appointments package is shipped with the ready to use Alexa skill template, which functionality will be described in this section. This template is created to be used as Amazon Alexa only and the skill itself requires access to user full name and email address, which can be enabled in the Alexa app during the skill activation.&lt;/p&gt;

&lt;p&gt;When we are talking about booking appointments scenarios, we should notice two main conversation flows depending on if the user already has or doesn't have an appointment.&lt;/p&gt;

&lt;h3&gt;No appointments flow &amp;amp; first time users&lt;/h3&gt;

&lt;p&gt;During the introduction phase, the user is greeted, told introductory information like business hours, and asked if they want to schedule an appointment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/intro-text.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qn6rfD9N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/intro-text.png" alt="Opening message in the appointment scheduling conversation" width="644" height="121"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the first-time user answers in the negative, the service offers the user some info about the skill owner's business, and if that answer is negative as well, it reminds users that they can ask for information about the company anytime and exits. &lt;/p&gt;

&lt;p&gt;If the user answers in the affirmative, the service asks about the appointment date, then if not provided along with the date, the appointment time. Finally, the service checks availability. If the date and time are available, the service asks for booking confirmation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/time-date.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nb7iJX3U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/time-date.png" alt="Requesting time slot conversation" width="853" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the requested date and time are not available, the user is asked to choose another time slot. In addition, our app is even capable of offering free slot suggestions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/suggestions.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7zWfgm7---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/suggestions-e1643382615405.png" alt="Free appointment slots suggestions" width="603" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anytime during the service run, users can ask for help and get help in accordance with the service step they're on. Users are also able to ask Alexa to repeat the last response, by simply saying &lt;em&gt;“Repeat”&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;To skip most of the steps, a user can rely on a one-shot request when opening the skill, for example: &lt;em&gt;"Ask Schedule appointment to schedule an appointment on Monday at 9 am"&lt;/em&gt;. This will send the user, if the date and time are available, right to the confirm step.&lt;/p&gt;

&lt;h3&gt;Existing appointments flow - returning user&lt;/h3&gt;

&lt;p&gt;The returning user no appointments flow is similar to the first-time user one. The exception is some changes in the text, omission of tips and introduction, as well as skipping offering to hear more about the company.&lt;br&gt;
&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/one-appointment.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yFaaZp91--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/one-appointment.png" alt="Conversation opening message with the existing appointment" width="595" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The introduction message in existing appointments flow slightly differs depending on if the user has one or more than one appointment. If the user has an upcoming appointment, after the welcome back message, the service informs the user about the one upcoming appointment with the date and time of that appointment. The service then offers the option to cancel or reschedule the appointment.&lt;/p&gt;

&lt;p&gt;If the user has asked to cancel the appointment, the service asks for confirmation and if the answer is yes, deletes the appointment and exits. If the answer is no the service exits after a brief message.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/cancel.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dzI30AVx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/cancel.png" alt="Cancel appointment conversation scenario" width="844" height="131"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Alexa skill setup&lt;/h2&gt;

&lt;p&gt;Here are the instructions on how to enable appointment scheduling as an Alexa skill on your WordPress installation. You have to have installed Convoworks WP properly connected with your Amazon developer account (check &lt;a href="https://convoworks.com/docs/publishers/platforms-configuration/amazon-alexa/"&gt;Amazon Alexa Configuration Docs&lt;/a&gt; or &lt;a href="https://www.youtube.com/playlist?list=PL9eUOVS2fICHc7FF48opQyOWUDVvNoNFD"&gt;Video tutorials at YouTube&lt;/a&gt;). You will start with creating a new service (from template), you will do some basic configuration and push it to the Amazon Alexa skill store.&lt;/p&gt;

&lt;h3&gt;Create new service from template&lt;/h3&gt;

&lt;p&gt;We will start with creating a new service from the template - &lt;strong&gt;Schedule Appointments&lt;/strong&gt; which is part of the &lt;code&gt;convo-appointments&lt;/code&gt; package.&lt;br&gt;
&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/template.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qraXT6gz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/template-1024x611.png" alt="Create appointment scheduling Amazon Alexa skill from the template" width="880" height="525"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, open the open Convoworks WP services view and click on the &lt;strong&gt;Create new&lt;/strong&gt; button. Enter your service name, then select the &lt;strong&gt;Schedule Appointments&lt;/strong&gt; template and press the &lt;strong&gt;Submit&lt;/strong&gt; button. Service name will be used as default for your Amazon Alexa skill invocation phrase, so it might be useful to find a nice name for it. Check about choosing the right invocation for your skill &lt;a href="https://developer.amazon.com/en-US/docs/alexa/custom-skills/choose-the-invocation-name-for-a-custom-skill.html"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Change the app name and other variables&lt;/h3&gt;

&lt;p&gt;This template is ready to use, but you will probably want to do some modifications to make it better fit for your needs. Besides the appointment scheduling functionality, this template has sections with the company info and about business hours that your customers might be interested in hearing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/app-name.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--svl1bU_c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/app-name.png" alt="Set your Alexa skill name" width="621" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One thing you will certainly want to change is the &lt;code&gt;APP_NAME&lt;/code&gt; variable (&lt;strong&gt;Variables view&lt;/strong&gt; in service editor). This variable is used in several places in the skill (e.g. &lt;em&gt;"Welcome to ${APP_NAME}"&lt;/em&gt;) and you should change it to fit your chosen name. Another one that you might want to change is &lt;code&gt;MAX_APPOINTMENTS_PER_PERSON&lt;/code&gt; which can limit the number of active appointments one user can have. There are also two variables related to formatting date and time values when speaking to the end user. There is no actual need to change this, but you might want to play around to fit your needs in a better way. More about date format options can be found at &lt;a href="https://www.php.net/manual/en/datetime.format.php"&gt;PHP docs&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Change or remove business hours info&lt;/h3&gt;

&lt;p&gt;In some cases, like with first time users, the skill will inform users about business hours that are available to him. The related texts are defined in &lt;strong&gt;Working days and hours - intro&lt;/strong&gt; and &lt;strong&gt;Working days and hours - not_allowed&lt;/strong&gt; service fragments. Business hours definition is right now hardcoded in the service definition, so if you need to change it navigate to these two fragments and change the values to the ones which will describe your case.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/working-hours.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2v5_wIjt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/working-hours.png" alt="Business hours information for the appointment scheduling alexa skill" width="620" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Change or remove About&lt;/h3&gt;

&lt;p&gt;Your users might be interested in hearing more info about your business. The related text is defined on the &lt;strong&gt;Read about us&lt;/strong&gt; conversation step. Navigate to that step and change the info about your business. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/about-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9enlFZk1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/about-1.png" alt="Handling about section in the conversation" width="665" height="804"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To remove the &lt;strong&gt;About&lt;/strong&gt; flow, you'll need to delete the &lt;strong&gt;Run once&lt;/strong&gt; element containing the fragment in the &lt;strong&gt;Home&lt;/strong&gt; block. delete the &lt;strong&gt;About&lt;/strong&gt; block and delete the&lt;strong&gt; About&lt;/strong&gt; processor in the &lt;strong&gt;Service processors&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;Time zones&lt;/h3&gt;

&lt;p&gt;When we are talking about appointment scheduling and time zones, there are two main scenarios. &lt;/p&gt;

&lt;p&gt;First is when the appointments are in person meetings, like hairdresser salon or dentist visits. So if you are in LA and you are scheduling your visit to the dentist in NY, you will operate in the target time zone (NY). This is the default behavior for our appointment scheduling template.&lt;/p&gt;

&lt;p&gt;The second mode is more appropriate for online meetings. In such a case, the user is trying to book time in his own time zone and the system will do required transformations and check the availability correctly. &lt;/p&gt;

&lt;p&gt;Our components and the whole system design are supporting both variants and it is achieved with the &lt;strong&gt;Timezone mode&lt;/strong&gt; and &lt;strong&gt;Timezone&lt;/strong&gt; properties on the appointments package related elements. The template is configured to use the &lt;strong&gt;Default&lt;/strong&gt; mode which will use the appointments plugin default timezone (the first case).&lt;/p&gt;

&lt;p&gt;If you want to change the time zone mode your service is working with, right now you will have to go through the template and update manually time zone component parameters. In the next release, we will move those two configuration options to the variables, so you will be able to change it from a single place. &lt;/p&gt;

&lt;h3&gt;Amazon Alexa Configuration&lt;/h3&gt;

&lt;p&gt;In order to work, we have to publish it to the Amazon Alexa skill store. Navigate to the service &lt;strong&gt;configuration&lt;/strong&gt; view, and select &lt;strong&gt;Amazon Alexa&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/configure.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xRHQIxz6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/configure.png" alt="Deploy Convoworks service to the Amazon Alexa console" width="359" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This skill requires some user information, so do not forget to select &lt;strong&gt;Full Name&lt;/strong&gt; and &lt;strong&gt;Customer Email Address&lt;/strong&gt; in the &lt;strong&gt;Amazon Alexa Skill Permissions&lt;/strong&gt; panel (see below). If you want to be able to enable a beta test for the skill, you'll have to enter the &lt;strong&gt;Privacy Policy URL&lt;/strong&gt; in the &lt;strong&gt;Edit Skill Store Preview&lt;/strong&gt; section. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/permissions.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2gc30geZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/permissions.png" alt="Set Amazon Alexa Skill Permissions" width="854" height="119"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After filling in the information and clicking "Save" your service will be propagated to Amazon and you can head on over to the skill's &lt;strong&gt;Alexa Skills Kit developer console&lt;/strong&gt; to test. &lt;/p&gt;

&lt;h3&gt;Simply Schedule Appointments integration&lt;/h3&gt;

&lt;p&gt;If you have &lt;strong&gt;Simply Schedule Appointments&lt;/strong&gt; plugin activated on your website, you can switch the service to use it and have full blown appointment scheduling Alexa skill. In this case, while in service editor switch toolbox to packages view and enable &lt;code&gt;convo-wp-plugin-pack&lt;/code&gt; package. After you enable it, you will be able to add the &lt;strong&gt;Simply Schedule Appointments source&lt;/strong&gt; under the &lt;strong&gt;Contexts&lt;/strong&gt; tab. Once you add it, enter desired &lt;strong&gt;context id&lt;/strong&gt; and select the &lt;strong&gt;Appointment Type&lt;/strong&gt; you want to handle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/ssa.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jUwktiwo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/ssa.png" alt="Simply Schedule Appointments WordPress plugin conversational context component" width="424" height="632"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the &lt;strong&gt;Context ID&lt;/strong&gt; and head on over to the &lt;strong&gt;Variables&lt;/strong&gt; panel. Use it to set the &lt;code&gt;APPOINTMENTS&lt;/code&gt; variable. Do not forget to save changes. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2022/01/ssa-var-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rc0H3fzh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2022/01/ssa-var-1.png" alt="Configure service to use Simply Schedule Appointments context" width="616" height="79"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it. You've created a functional appointment scheduling Amazon Alexa skill using the &lt;strong&gt;Simply Schedule Appointments&lt;/strong&gt;. It is good to know that the appointments created are the same as one created through the web interface. If you installed some additional plugins, to send email notifications or do any other additional functionality, everything will work the same.&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;There are many plugins which are extending WordPress functionality in many different ways. At the same time, it is a blessing and a curse. With our appointments package we demonstrated how such issues can be avoided in a cheap and efficient way.&lt;/p&gt;

&lt;p&gt;If you use some other appointment scheduling plugin, or even better if you are a developer of such one, please contact us and we will be glad to help you with integration.&lt;/p&gt;

</description>
      <category>alexa</category>
      <category>wordpress</category>
      <category>convoworks</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Create your first Amazon Alexa skill using Convoworks WordPress plugin and InstaWP – no server, no registration required</title>
      <dc:creator>Tihomir Dmitrović</dc:creator>
      <pubDate>Sat, 29 Jan 2022 17:03:54 +0000</pubDate>
      <link>https://dev.to/tolecar/create-your-first-amazon-alexa-skill-using-convoworks-wordpress-plugin-and-instawp-no-server-no-registration-required-8id</link>
      <guid>https://dev.to/tolecar/create-your-first-amazon-alexa-skill-using-convoworks-wordpress-plugin-and-instawp-no-server-no-registration-required-8id</guid>
      <description>&lt;p&gt;Don't have your own, or you don't want to bother with installing a new WordPress instance? Now you can try &lt;a href="https://convoworks.com/"&gt;Convoworks&lt;/a&gt; using the &lt;a href="https://instawp.io/"&gt;InstaWP&lt;/a&gt;. InstaWP is a service that enables you to easily create and access a fresh WordPress installation that you can use to test or showcase plugin, theme ... no registration, no server required, only thing is that the website will be available for 8 hours.&lt;/p&gt;

&lt;h3&gt;Create InstaWP website&lt;/h3&gt;

&lt;p&gt;Just follow this &lt;a href="https://app.instawp.io/onboard"&gt;link&lt;/a&gt;, enter your subdomain and your site will be ready in a matter of seconds. Click on the "Access now" and login with the provided credentials.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/instawp-setup.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---DZSTf0t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/instawp-setup-1024x615.png" alt="" width="880" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Important: Navigate to "Settings/Permalinks" and select "Post name" in "Common Settings" section. This is not required if you are using a regular WordPress installation, but it is required when using InstaWP.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/wp-permalinks.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IFCIo8Fk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/wp-permalinks-1024x509.png" alt="" width="880" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Add Convoworks WP&lt;/h3&gt;

&lt;p&gt;Once you have your WordPress website up, navigate to "Plugins/Add new", add and activate Convoworks WP.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/wp-install-convo.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hNEjB4d2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/wp-install-convo-1024x474.png" alt="" width="880" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After activation, you should end up on the Getting started view. From it you can access Amazon Alexa main settings page, start the new voice service or access related documentation pages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/wp-welcome-to-convo.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4t_iGUDK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/wp-welcome-to-convo.png" alt="" width="880" height="652"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Connect it to your Amazon developer account&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/wp-amazon.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T8SUxAn3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/wp-amazon-1024x743.png" alt="" width="880" height="639"&gt;&lt;/a&gt;&lt;br&gt;
In order to create Alexa skills from your WordPress installation, we have to connect it to your amazon account. Please note that GUI provides you with the direct links on Amazon where you can find or set up required information.&lt;/p&gt;

&lt;p&gt;First enter your Vendor ID which you can find &lt;a href="https://developer.amazon.com/settings/console/mycid"&gt;here&lt;/a&gt;. After that create a new &lt;a href="https://developer.amazon.com/loginwithamazon/console/site/lwa/overview.html"&gt;security profile&lt;/a&gt;. For test purposes, you can use any url for the "Consent Privacy Notice URL".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/amazon-security-create.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dDSuVDwj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/amazon-security-create-1024x599.png" alt="" width="880" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once it is created, go to its Web Settings and set "Allowed Origins" to your website domain and set "Allowed Return URLs" to the url provided at your Convoworks Amazon settings page - "Amazon Oauth Callback URL".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/amazon-security-web.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AWoPTo1---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/amazon-security-web-1024x601.png" alt="" width="880" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now use Client ID and Secret provided in the Amazon security profile and enter it to the Convoworks Amazon settings page. Press "Save", then "Connect" and you should be redirected to the Amazon consent screen. After you allow access, your Convoworks installation is ready.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/amazon-consent.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nBeEIvgn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/amazon-consent.png" alt="" width="691" height="688"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Create your first Alexa skill&lt;/h3&gt;

&lt;p&gt;Now that we have our installation ready, let's create our first voice application (Alexa skill). Navigate to Convoworks add a new service view, enter your application name and press "Submit". By default service is created from the "Basic Template" which has built in some necessary conversation features, so we can even test it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/wp-add-new-service.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---gUOBGDP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/wp-add-new-service-1024x693.png" alt="" width="880" height="596"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we have to make it available through the Alexa devices. Navigate to Convoworks service configuration view and click on the Configure button on Amazon card below in the view. Once you are on the Amazon configuration view, just scroll to the bottom and press "Create". You'll notice in the top section "Building Amazon" text which will disappear in less than a minute.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/wp-skill-config-top.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_yXY9s_l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/wp-skill-config-top.png" alt="" width="719" height="535"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/wp-skill-config-amazon.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e8_57hfl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/wp-skill-config-amazon.png" alt="" width="880" height="642"&gt;&lt;/a&gt;&lt;br&gt;
Once the build is done, you can navigate to Convoworks Test view and try the service. Select "Amazon'' from the dropdown on top of the chat box. If you enter &lt;em&gt;Hi, Hello&lt;/em&gt; it will respond that it works. If you enter something else, it will respond that it does not understand. It also supports help, start over and end session commands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://convoworks.com/wp-content/uploads/2021/08/wp-skill-test.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_17cZPFH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://convoworks.com/wp-content/uploads/2021/08/wp-skill-test.png" alt="" width="880" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our internal test view right now supports just text mode. You can also try your skill inside &lt;a href="https://developer.amazon.com/alexa/console/ask"&gt;Amazon ASK console&lt;/a&gt;, with your Alexa mobile application (available for iOS and Android) or with the real Amazon Echo device. &lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>alexa</category>
      <category>tutorial</category>
      <category>convoworks</category>
    </item>
  </channel>
</rss>
