Workflows
Create workflows to save time and eliminate the need for repetitive manual tasks.Categories
Workflow tutorials
Use workflow templates to quickly set up common automation tasks.
Workflow helpers
Use helpers to customize and enhance your workflows.
Articles
Callable scheduled workflows
You can use scheduled workflows in Kustomer to automate actions that depend on time-specific conditions. For example, you can create a workflow that marks a conversation Done when your team has been waiting for a customer response for too long. Or you can create a scheduled workflow that changes the priority of conversations that have been open for more than a week.Who can access this feature?User typesAdmins can create and manage callable workflows.In this articleWhen would you schedule a workflow?The scheduled workflowThe scheduler workflowWhen would you schedule a workflow?You can schedule a workflow whenever you want an action to occur based on a time-specific condition. In this example, we want to create a scheduled workflow that increases a conversation's priority to 5 if it's been open for more than a week. When creating a scheduled workflow, you must first ask yourself these questions:What should be scheduled to happen?When should the action be scheduled to take place?We solve this by creating two separate workflows for each part of the automation. Notes: A scheduled workflow must be created before it can be scheduled by another workflow.You can have unlimited scheduled workflows, but they are limited to 1000 runs per 15 minutes across all scheduled workflows within an organization. Additional executions beyond the 1000 limit will continue to queue, but will not run until the 15 minute window has elapsed. We recommend tuning your conditions in the scheduling workflow to ensure it is scheduled only when needed.Creating the scheduled workflowThe first step in this process is to create the scheduled workflow and answers the question "what should be scheduled to happen?" This workflow is triggered by a scheduled event, which means that it can only be scheduled by other workflows. Workflow A: Update Conversation PriorityWhen given a conversation ID, this workflow will increase the conversation's priority to 5.Go to Settings > Platform > Workflows.Select Add Workflow.From the popup that appears, select Custom Workflow.Enter a name for the workflow and then turn on the Callable Workflow toggle.Select Create.Once saved, you will be prompted to fill in the data fields that the workflow expects. Select the Callable Trigger, then select Edit Input Parameters.In this example, we want to change a conversation's priority so let's add conversationId as an input field, select String from the drop-down menu, and make it a Required Field. This data field is the parameter that your workflow will need to run. Press Update to save this parameter.Then, we'll add an action to limit the conversations we update. Add an Action step with Kustomer as the Action App, with the event Conversation: Lookup (By ID). Then add a Condition Step that makes sure the conversation status is not “Done” and that the priority is not already 4 or higher.Finally, we'll use the conversation Id that is passed in from the callable trigger to update the conversation's priority to 5.Select Save.Creating the scheduler workflowNext, you want to create the workflow that triggers the scheduled workflow and determines when the action defined in the first workflow is going to take place. In this example, this workflow will be triggered when any inbound conversation is created.Workflow B: Schedule Conversation Priority IncreaseThis workflow schedules Workflow A to run with the conversation's ID.Go back to the Workflow Settings, select Add Workflow, and then select Custom Workflow.Fill in the title and description for the new Schedule Conversation Priority Increase workflow, then select Create.Note: This workflow is not a scheduled workflow so do not turn on the Callable Workflow toggle.This workflow will be triggered on the Kustomer: Conversation Created trigger event.Add an Action step that calls the Scheduler: Schedule a Workflow action event.Let's fill in the Scheduler Information. For Workflow Title, select the Update Conversation Priority workflow we created earlier in this guide.Leave the Type set as Set a Relative Time.Finally, set the date when the workflow should run (7 days from when this workflow runs), and pass in the required conversationId parameter (the created conversation's Id).Select Save.Use workflows to import data
Kustomer offers a variety of ways to import additional data into our platform. For example, you may want to import customer lists, past orders, past conversations, users, or even new conversations from a contact form on your website.In this article, you'll learn about using one of Kustomer's most powerful features, Workflows, to bring your data into Kustomer. Workflows are an advanced Kustomer feature that allow you to build automations that activate whenever a specified event occurs in Kustomer or any connected app.Kustomer also offers a less technical import method called Data Connect, which is a guided setup wizard that captures data through a webhook without having to set up a workflow. Learn more about this in our help article for Data Connect.Who can access this feature?User typesAdmins can configure workflows.In this articleWhat are workflows?What are hooks?Why import data?Step 1. Create a webhook to use in your workflowStep 2. Create a workflow to import dataStep 3. Send data to KustomerStep 4. Build out the workflow to import data into customers' timelinesWhat are workflows?Workflows can import data into Kustomer using web, form, and email hooks. Post your data to a webhook, form hook, or email it to an email hook. Then, set up the rest of the workflow to process the data in Kustomer. Workflows in Kustomer represent a set of defined rules used to automate processes.What are hooks?Hooks are a flexible way for 3rd party applications to sync data with Kustomer. There are three types of hooks available in Kustomer, and each has unique attributes:Webhooks are a URL that provides a way for an application to send Kustomer real-time information. This requires the application to POST data to the webhook URL so Kustomer can read the data. Posting to a Kustomer webhook requires a Kustomer API key with org.hook permission.Form hooks are similar to a webhook, a URL that provides a way for an application to send Kustomer real-time information. This requires the application to post data to the form hook URL so Kustomer can read the data. Posting to a Kustomer form hook does not require an API key.Email hooks provide a way to email real-time information to Kustomer via a unique email address.Why import data?Common use cases for importing data into Kustomer include:Sending data from your website's Contact Us form. To do this, you would create a form hook and configure your Contact Us form to POST to it. Then, you would set up a Workflow to ingest the data from the form hook, and create a new conversation in Kustomer to represent the data sent from the Contact Us form.Sending data from your admin system to create or update customers in KustomerSending data from your admin system to create an order in a customer's timeline in Kustomer. You could achieve this by creating a webhook and configuring your admin system to POST data you want to see in Kustomer to the webhook. A webhook requires a Kustomer API key to make sensitive customer information is securely transferred. Set up a workflow to ingest the data from your admin system. Use this data to create a new order object in your customer's timeline.Step 1. Create a webhook to use in your workflowFirst, we'll need to create a new hook.In Kustomer, go to Settingsand select Platform > Inbound Webhooks.Select Add Inbound Webhook.Fill out the name and description of the new webhook.Note: We always recommend as a best practice that you use clear and illustrative names and descriptions, so that it's easy to know what function this webhook performs if another member of your team reviews it at a later date.Select your choice between creating a web, form, or email hook based upon your needs.Then, select Create to save the new webhook.Step 2. Create a workflow to import dataNext, we will create the workflow itself.Go to Settingsand select Platform > Workflows. Select Add Workflow, then select Custom Workflow.Give your workflow a name and description so it's easy to reference later, then select Create.Select your newly-created webhook as the workflow's Trigger Event.Step 3. Send data to KustomerThis workflow will run whenever its defined trigger event is triggered. In our example, we will choose Hooks as the Trigger App and a hook as a Trigger Event.Configure your system to make an HTTP POST request to the webhook URL and send along any data you'd like to see in Kustomer. For example, if you'd like to see a customer's order in their Kustomer timeline, send the order data payload to the webhook URL. Remember to include a Kustomer API token with org.hook permissions when posting to a Kustomer webhook.Review the Example Data Payloads article to reference what a data payload coming into Kustomer would look like.Step 4. Build out the workflow to import data into customers' timelinesNow that you're sending data to a Kustomer webhook, it's time to build out the rest of your workflow to manage how the data is represented in Kustomer. The workflow will look something like this:This workflow will run whenever the Admin-Import-Order hook is triggered, meaning it has received data. After receiving data from the webhook, the workflow finds the customer by email. To do this, it uses information sent over to the webhook, which can be accessed by the workflow using the following syntax:/#steps.1.attributes.dataWe can drill down to the customer email we sent over to the webhook using the following syntax:/#steps.1.attributes.data.customer.emailThe action step Customer Find By Email will either return a customer in your Kustomer org or not find that customer by their email. Note: Sometimes you may have a customer in Kustomer without an email. To handle these cases, workflows also have action steps, Customer Find By Phone and Customer Find By External Id.To handle each case we use condition steps like Customer Exists and Customer DNE.If the customer exists, the workflow uses action step KObject Create With Customer to create a custom object (KObject) in the customer's timeline with the data sent over to the webhook. Note: You'll need to have already created a KObject in your Kustomer organization to reference in this step as KlassName. To create a KObject, create a new Klass (KObject) in Settings > Klasses. You can also design the look of your KObject by in the Timeline Layout or Insight Card tabs.If the customer does not exist in your Kustomer organization, then the Workflow uses action step Customer Create to first create the customer and uses KObject Create With Customer to create the KObject in the newly created customer's timeline.That's all you need to import data into Kustomer. There are many different ways to handle imported data. Customize your workflows to create and update customers, to create and update orders, or anything else you'd like to see in Kustomer. Related TopicsWorkflows OverviewInbound WebhooksData ConnectUse form hooks to ingest a web form
If you have a Contact Us web form on your website, you can pass those submissions along to Kustomer where your team can answer them like any other conversation. To do this, you'll use a form hook to create new conversations from those submissions.In this article, we'll walk through setting up a workflow with a form hook to ingest web form submissions.Who can access this feature?User typesAdmins can access the Workflows page.In this articleWhat is a form hook?Create a workflow to ingest web form submissionsCreate a form hook to use in your workflowConfigure your form to post to the form hookBuild out the workflow to create a conversation in KustomerWhat is a form hook?A form hook is one of 3 types of hooks available in Kustomer as a workflow trigger. A form hook is a unique URL that lets 3rd-party applications send real-time information into Kustomer. For Kustomer to capture this information, the external system must post to the form hook URL. Posting to a Kustomer form hook does not require an API.Learn more about Kustomer's different hook options in Inbound webhooks.Create a workflow to ingest web form submissionsThe first step in this process will be to create the workflow.To create a workflow:Go to Settings and select Platform > Workflows.Select Add Workflow.Select Custom Workflow.Fill in the name and description of the workflow. We always recommend as a best practice that you use clear and illustrative names and descriptions, so that it's easy to know what function this workflow performs if another member of your team reviews this rule at a later date. For this example, you might pick a name like Contact Form.Leave the callable workflow option turned off.Select Create.The workflow editor automatically opens after creating a new workflow.Create a form hook to use in your workflowNext, we'll start filling in the new workflow. The workflow will run whenever its defined trigger event is activated. In this example, we'll be using a form hook as the trigger event.To create a new form hook in the workflow editor:Select the first step in the workflow.From the panel, under Trigger App select Hooks.Under Trigger Event select Add New Hook.Fill in the new hook's name and description, and select form hook as the type. Then, Save the hook.After the hook is created, use the Trigger Event menu to select the new hook.Use the toolbar at the top of the workflow editor to Save your work so far.Configure your form to post to the form hookNow that you have your form hook set up, you'll need to send data to this form hook URL. With your first workflow step still selected, you'll see a section called Hook Information in the panel where you can copy the address. Use a new browser tab to configure your web form to send an HTTP POST request to the form hook URL whenever a new form is submitted.Build out the workflow to create a conversation in KustomerOnce the web form is sending data to the Kustomer form hook, it's time to build out the rest of your workflow to manage how the submission is represented in Kustomer. This can be customized however best suits your team's needs, but might look something like this:In the above example, the workflow runs whenever the web hook form is triggered, meaning it's received a new submission. After receiving data from the form hook, the workflow checks if the customer exists in Kustomer by looking up the customer by email address. To do this, it uses the email included in the form hook submission.The data sent to the web hook can be accessed by the workflow with the syntax:/#steps.1.attributes.dataWe can drill down to the customer email we sent over to the form hook with the following syntax: /#steps.1.attributes.data.emailThe action step Customer: Lookup (By Email) will then either return a customer in your Kustomer org or not find that customer by their email. Note: Sometimes you may have a customer in Kustomer without an email. To handle these cases, workflows can also have action steps, Customer: Lookup (By Phone) and Customer: Lookup (By External ID). We then use condition steps, Customer exists and Customer doesn't exist to handle each case.If the customer exists, the workflow uses action step Conversation: Create to create a conversation in the customer's timeline with the web form information sent over to the form hook. If the customer doesn't exist in your Kustomer organization already, the workflow uses action step Customer: Create to create the customer record first. Then, it uses Conversation: Create to create the conversation in the newly-created customer's timeline.Once the conversation is created, the workflow uses the action step Message: Create to create a message in the newly-created conversation. In this action step, the web form content can be added. Fill out the Message: Create step with the following information:Customer (string): the ID of the customer.App (string): identifies where the message came from, using the web form created earlier as the app for this message.Size (number): identifies the size of the message.Channel (string): use the Channel Values options to select the new conversation's channel, which would be email in most cases.Conversation (string): the ID of the conversation.That's all you need to import a web form into Kustomer. Kustomer can handle your important data in a variety of ways, and workflows can be customized to create and update customers, orders, or anything else you'd like to see in Kustomer. Learn more about creating and customizing workflows in Workflows overview.Workflows overview
Workflows make it easy to automate processes or add custom business logic to take full advantage of the Kustomer platform. Workflows are triggered when events occur in Kustomer or in any connected apps, then use conditional branching to add tags, assign users, create customers, or even make calls to external systems. Workflows allow organizations to eliminate tedious and inefficient manual tasks and augment the data stored in Kustomer to ensure teams have all of the information they need.Key FeaturesConditional Branching: Workflows allow complex decision-making through multiple branches. Real-world processes are not necessarily linear, so they shouldn't be limited to a linear flow.Multi-Step Workflows: Unlike many “if this, then that” systems that limit users to a single step, workflows allow a sequence of steps where each step can use the output of any step that ran before it.Extensibility: Workflows are flexible, extensible (via Apps, Hooks, and REST API calls), and can be augmented by Kustomer apps and custom integrations. If there's a business process to automate, then there's a way to achieve it with a workflow.To make the most of workflows and learn about more advanced workflow features, check out:Understanding hooks for triggering workflows from an external systemScheduled workflows to trigger actions after a certain amount of time has passedREST APIs to communicate with external systemsBasic and advanced workflow helpers for more customized functionalityWorkflow variables for storing secure credentialsWho can access this feature?User typesAdmins can access the Workflows page.In this article:TriggersConditionsActionsAppsScheduled workflowsManage workflowsDesign a workflowReference earlier steps in a workflowCommon Regex patternsTriggersA trigger is a defined event that will cause a workflow to run. These can occur from an event inside or outside of Kustomer and are received via a web, form, or email hook. Every trigger event will include data about that event, which is made available to the workflow's condition and action steps. For example, in Kustomer, a trigger would be when a customer, conversation, or message is created or updated.ConditionsA condition step includes one or more rules the workflow follows after a trigger and determines what action to take next. A trigger will pass along data about the trigger event to a condition step. The condition will use this data to check if the trigger meets the condition's pre-defined set of rules. You can check for more than one condition in a single step using logic operators AND and OR. For example, you may want to create a workflow to run whenever a new conversation is created by a customer via email. To do this you would set a condition to check if the "Message Created" trigger includes a message whose channel is "email", direction is "in", and direction type is "initial-in".Note: All fields are case-sensitive.ActionsAn action is an event that will run based on the data you define. Standard actions in Kustomer include events that lookup, create, or update conversations and/or customers. For example, you can add an action to a workflow to look up a customer by using the customer ID returned in a message.AppsTriggers and Actions can be organized by apps. New apps installed in Kustomer will add additional capabilities to workflows and can be used to interact with any connected systems.Scheduled workflowsSometimes you may want to take action a certain amount of time after an event has occurred. Scheduled workflows allow you to delay the execution of a workflow to do things like marking conversations done a week after the last outbound message or sending a survey two days after a conversation is marked done.Manage workflowsYou can manage and create workflows from the Workflows Settings. From this page, you'll be able to manage all of your custom user-created workflows, as well as app-created workflows that are automatically installed by installing Kustomer integrations.Go to Settings> Platform > Workflows.Select Add WorkflowSelect Custom Workflow to create a new workflow from a blank slate, or Import Workflow to create a workflow template from a JSON file.Only active custom workflows count toward your plan limit. Use the on/off toggles to activate or deactivate workflows as needed.Design a workflowWhen designing a workflow, it helps to think through when your workflow should run and what your workflow should do.The when of a workflow translates to a trigger and a condition. Select a trigger and then use a condition step to ensure the event matches your intent.For example:when a new message comes inwhen an order status changes from shipped to deliveredwhen a customer is updated in your external admin systemThe what of a workflow is a sequence of actions and conditions. Remember that you can use multiple actions in a workflow, so you can make a call to your external system and then make a decision based on the result of that call as to which action you will take next.For example:send an automated response to a customer and then snooze the conversationcheck for keywords in a message and tag or assign the conversationsync a customer record with your external admin systemReference earlier steps in a workflowWhen creating workflows, you may want to reference the output of a previous workflow step. For example, here's a workflow where you may want to update the customer associated with a conversation you looked up.To find the correct customer, you'll need to fill in the ID field with the correct attribute mapping, which can be done in two ways.First, you can use the drop-down menu to select the customer associated with the Conversation: Lookup step:Or, you can select the <> icon and enter the attribute mapping manually. When referencing the customer ID from the previous step in this manner, you'll need to use the structure /#steps.id.customer, where id is replaced with the workflow ID step, which can be found by hovering over the blue workflow step number.To reference the customer from the Conversation: Lookup step in this example, you would put /#steps.iYxqdtG83.customer in the Id(String) field.Note: When referencing attributes in a workflow manually, the format should be /#steps.id.attributeName where id is replaced with the workflow ID. If referencing a custom attribute, the format is /#steps.id.custom.attributeName. You can find a list of all available attributes and their names on the Klass Settings page.Common Regex patternsRegex is a powerful tool to capture specific data within workflows. This article contains some common Regex patterns you can use to capture data. To find new patterns, you can visit their library!Extract the Email Address from a stringRegex: \S+@\S+\.\S+\bConcatenate Two StringsExample Input: {{steps.1.attributes.data.contract.contractNumber}} , {{{steps.6_JOnalVC.custom.contractNumbersStr}}}Regex: .*Capture Phone NumberRegex: \+?\d{1,4}?[-.\s]?\(?\d{1,3}?\)?[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}Capture Credit Card NumberRegex: ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|6(?:011|5[0-9]{2})[0-9]{12}|(?:2131|1800|35\d{3})\d{11})$Inbound webhooks
Webhooks are a flexible way to sync your data between Kustomer and 3rd party applications. Kustomer offers both inbound webhooks, which are used to send events from other systems into Kustomer, as well as outbound webhooks for sending data from Kustomer into other systems.This article will offer an overview of the various inbound webhook options available to users looking to send data into Kustomer.Who can access this feature?User typesAdmins can create new webhooks.In this articleOverviewForm hooksWebhooksEmail hooksCreate a hookFind a hook addressUse your hook in a workflowDebug your hookOverviewThere are three types of hooks:Form hooksWebhooksEmail hooksEach of these hooks gives you several options for triggering or activating workflows. They can be triggered by events that happen outside of Kustomer, or by events in Kustomer. Hooks and workflows give you the power and flexibility to have the most relevant and up-to-date data side-by-side with customer conversations. For example, you can use hooks to:Create a custom object (KObject) in a customer's timeline when they place an order.Update a customer’s email address when it’s added in your internal admin tool.Create conversations in Kustomer when a customer fills out a web form.Note: Hooks are the primary way to send generic data into Kustomer from other systems. If you are looking for how to send data from Kustomer to other systems, see our Workflows API.Form hooksForm hooks are unique URLs to which users can send data in an HTTP POST request. Currently, form hooks accept JSON and Form-Data content. Form hooks do not require any authentication and are best suited for use in public HTML forms, or anywhere the authenticity of the sender is not important.WebhooksSimilar to form hooks, webhooks are also unique URLs that accept data in an HTTP POST Request. However, webhooks require authentication using an API Key that has the org.hooks role. Currently, webhooks accept JSON and Form-Data content. Webhooks are best suited for server-to-server communication where verifying the authenticity of the sender is important. In Kustomer, posting to a webhook requires a Kustomer API key with org.hook permission. For more information on creating and using API keys, see Authentication and API keys in our Developer Documentation.Email hooksEmail hooks are unique email addresses that can be Bcc’d in order to trigger a workflow. Kustomer will parse JSON and JSON-LD syntax directly from the HTML markup in your email and make it available to you in a workflow. Email hooks are commonly used to update order and shipment details in Kustomer by adding the email hook address in the Bcc field of emails that are already being sent to customers.Create a hookYou can create and review all existing hooks from the Kustomer Platform settings.To create an inbound webhook:In Kustomer, go to Settings> Platform > Inbound Webhooks.Select Add Inbound Webhook.Fill out the name and description of the new webhook.Note: We always recommend that you use clear and illustrative names and descriptions as a best practice so that it's easy to know what function this webhook performs if another member of your team reviews it at a later date.Choose the desired type of webhook.Then, select Create to save the new webhook.Find your hook addressOnce you've created a hook, you can use it in API calls and workflows. You can find the hook address in the Inbound Webhooks settings.To copy a hook's address:In Kustomer, go to Settings> Platform > Inbound Webhooks.Locate the desired hook and select Menu.Select Copy Hook Address from the drop-down menu that appears.Use your hook in a workflowWhen you edit a workflow using the workflow editor, you can reference it without having to know its address.To add a hook to a new workflow:Go to Settings> Platform > Workflows.Select Add Workflow, then create a new workflow from a blank state or import via JSON.In the Workflow editor, select the Choose Trigger step. For the Trigger App, select Hooks.All of the existing hooks you've created will be displayed in the Trigger Event drop-down. Select the hook you created, then fill in a descriptive name and description.Once you’ve configured your workflow to use a hook trigger, the next step is to configure an action. Select the + icon, then select Action.Based on the example above, we’ll want to create a message whenever the web form is submitted, so select Kustomer as the Action App, then select Message: Create as the Action Event.Continue filling out and setting up the workflow as desired.Note: Be sure to Save and turn on the Workflow at the top of the screen.To make it easier to complete your Workflow, we recommend testing your hook with a typical payload and then using that example to populate the rest of the Workflow. To understand the data available to you, use the Workflow logger to find your test event. Copy the output of the Workflow's "Step 1" in the logs, and paste it into the “Example Webhook Data” field in the right bar.Once complete, you’ll be able to access your data automatically in the step output drop-down menus in all of the actions of your Workflow. Keep in mind that this data will not persist across sections, but will the debugger tool will remain accessible.Debug your hookAs you work to leverage your new hook in a workflow, there may be times where you want to either test the connection to see how the data comes over or troubleshoot a recent set of data that did not ingest successfully. The debugger tool can help with seeing the data Kustomer receives first-hand and that can be used to understand how the system is understanding your data.To access the debugger tool, go to Settings > Platform > Inbound Webhooks. From there, navigate to the webhook you wish to debug, select next to it, and turn on the Debug setting. From that point forward, the most recent 10 inbound interactions to that hook can be seen by selecting and going to View Debug Logs. This can be helpful as you are able to verify the format of your data and troubleshoot or build your workflow based on that information.Related articlesWorkflow loggerUse form hooks to ingest a web formWorkflows overviewKustomer API ReferenceTest and debug Workflows by viewing logs
As you are building out workflows, it's important to understand how to test and troubleshoot them for your team. You can do this using logs, which give you real-time insight into your workflow, showing you what data is available to you as well as what the inputs and outputs are at each step.Who can access this feature?User typesAdmins can access the Workflows page.In this articleFind workflows that contain errorsView workflow logsTrigger a new logView recent logsLog detailsFAQFind workflows that contain errorsYou can easily find workflows that contain errors by selecting the Errors filter from the Workflows page.Select the link on the lower left to see the workflow errors.Here, you can expand on a specific error to see more details. View workflow logsYou can use the workflow logs to test and debug any issues or errors in a workflow. To access the logs:Open the workflow you want to debug.Select the View Logs tab.This will open the logger and turn on real-time logging for the workflow you’re currently viewing for the next hour. If the workflow hasn't been recently used, this section may be empty.Trigger a new logTo start seeing logs, trigger your workflow by simulating an activity that would ordinarily make it run. For example, if your workflow runs on the “Conversation Update” event, try updating an attribute on a conversation. Once trigger it, select refresh icon to fetch the latest logs. You should now see a list view of up to one hundred of the most recent logs for this workflow.View recent logsThe list view shows the most recent execution of the workflow on top and shows data like when the workflow completed, how long it took to run, and whether or not it encountered errors. Errors are signified by a red dot on the left side, whereas a successful run will have a green dot. Select a log event to see details for that run.Log detailsThe detailed view shows a step-by-step breakdown for a given workflow run. On the left panel, you will see the path taken by the workflow, starting with the trigger and then each of the actions that were called. Each step will also show whether it completed successfully as indicated by a green or red dot. After selecting a step, the right panel will show you the inputs and outputs for a given step. The input and output data is useful to inspect whether your mapping is correct when the output of one step is being used as the input for another. The output is the context that is provided at each step, so if you use the workflow syntax of /#steps.2.name in an action or condition, you can select Step 2 and find an attribute called “name” in the output to know what that value was in the Workflow run that you are inspecting.FAQWhy don’t I see any logs when I open the logger?This could happen for several reasons: You may need to refresh the logs. To do so, click the refresh icon at the top-right corner of the logger.If you still don’t see data, your Workflow may not have been triggered since logging was turned on. Try forcing your Workflow to trigger and then refreshing the logs.Can I see historical workflow logs?Currently, only the 100 most recent logs are available in the workflow logger. Logging is intended for use in the editing process and is on-demand, so logs aren't stored if you haven't worked on the Workflow within the past hour.Related ArticlesWorkflow OverviewUnderstanding HooksCreate a KObject from an external trigger
In this article, we'll show how to create custom objects (KObjects) on a Customer Timeline using a trigger from an external system. This could be used to create an order object from your e-commerce platform, responses from an NPS survey, etc. We'll create an order object as an example, but the process is similar to any type of object relevant to your customer.Who can access this feature?User typesAdmins can access these settings pages.In this articleDefinitionsPrerequisitesStep 1. Identify the data from the hookStep 2. Find a Customer using the input dataStep 3. Create a KObject on the Customer's timelineStep 4. Save the WorkflowDefinitionsA Klass is the definition of custom objects (KObjects), capturing the name of the object (e.g. "order"), an icon to represent it, and the properties that individual objects can have (e.g. an order number).A custom object or KObject is a single instance of a Klass. Using the order example, the Klass is Orders, while a KObject might be Order #abc123.Hooks in Kustomer allow you to trigger workflows with data from an external system. When an order gets created in your order management system for example, you may want to send that data to Kustomer and create an order object in the customer's timeline. For a detailed overview on this, see Understanding Hooks.PrerequisitesBefore you start, there are two requirements:Define the Klass. From the Klass Settings page, make sure you've set up a custom Klass including the Workflow with custom fields configured.Create a Hook. Follow the instructions in Understanding Hooks to set up a form, web, or email hook and begin sending data into Kustomer.Step 1. Identify the data from the hookTo see the available data, use the Workflow logger tool. Make sure your Workflow is enabled, click on “View Logs” at the bottom of the Workflow editor, and send an example request to your hook. Click on the refresh icon in the Workflow logger and if your test request was successful you will see a log appear in the list.Click into the top log and select step 1 from the list, then copy the “output” of that step and paste it into the “Example Webhook Data” box in the right bar. If you don't see that box, click on your trigger at the top of your Workflow to make it appear. For example, if you send the following data:{ "orderId": "1234", "price": "$10.25", "quantity": 2, "email": "test@example.com" }You will have an output that resembles the following. Notice that the original data is nested under attributes.data and will be accessible under /#steps.1.attributes.data:{ "id": "a5c3694a5d1ab8ffee5b2b0e", "type": "transaction", "attributes": { "createdAt": "2017-12-22T05:23:02.138Z", "data": { "orderId”: “1234", "price": "$10.25", "quantity": 2, "email": "test@example.com" } }, "relationships": { "org": { "data": { "type": "org", "id": "581392b55ac7a2110099d9c8" }, "links": { "self": "/v1/org/581392b55ac7a2110099d9c8" } }, "hook": { "data": { "type": "form_hook", "id": "5a345109e578360010eaa1ad" }, "links": { "self": "/v1/hooks/form/5a345109e578360010eaa1ad" } } } }Step 2. Find a Customer using the input dataTo create a KObject from this data on a customer's timeline, it's first necessary to identify the customer we will link the KObject to. We'll need some identifying information on the KObject, such as an email, phone number, or externalId.Create a new step and select the Customer: Lookup (By Email) action.Populate the email field with with /#steps.1.attributes.data.email. This can can also be selected from the dropdown when clicking into the text field.It's possible that this customer does not yet exist within the Kustomer system, so after looking up the customer, we check if any results were returned. To do so, add a Condition Step to check if the previous step's ID exists. Add a Condition Branch to check the opposite condition: that the previous step's ID does not exist.Under the second branch, create a new step and select Customer: Create. The only relevant field is the email field, which we populate with /#steps.1.attributes.data.email from our trigger data. If the Workflow reaches this branch, it will create a customer if the record did not previously exist within Kustomer.Step 3. Create a KObject on the Customer's timelineNow it's time to create the KObject. Since there are two branches for getting the customer's ID (either the customer was found or created), we will need two similar but separate actions for creating the KObject.Select a branch and add a step with the Custom Object (KObject): Create With Customer action. There are several required fields for a KObject:KlassName: the name of the Klass for the object you want to create. In this example, we will type in order.Customer: the ID of the customer either found or created, you should select the ID from the dropdown of the step preceding the one you created.Title: the display name of the object in the timeline, such as Online Order.Data: a required object field, which will need to be set in the JSON Editor for Workflows.Custom: while not officially required, this field will control what is displayed by default in the UI and what is searchable. It is highly recommended to use this field. Each custom field should use the API name, which can be found on the Klass page – for example, a single line text field named Order ID should have an API name like orderIDStr. Like the data field, custom attributes will also need to be set in the JSON Editor.To edit the fields in the Workflow JSON, follow the instructions in Calling a REST API Within a Workflow.Step 4. Save the WorkflowFinally, save your Workflow and test it again. You will now see a new KObject created on the related customer's timeline.Related TopicsUnderstanding HooksWorkflows OverviewCalling a REST API Within a WorkflowWorkflow triggers
Workflows are used to build automations based on an event related to Kustomer. Triggers are events that cause a workflow to run. You must define both a trigger app and an event as the first step in a workflow. This article lists the types of triggers that are available and provides details on when to use each one.Who can access this feature?User typesAdmins can access the workflow settings.In this articleHow to set a workflow triggerSet a trigger appSet a trigger eventKustomer trigger eventsChat trigger eventsHook trigger eventsPostmark (email) trigger eventsShopify trigger eventsTwilio trigger eventsHow to set a workflow triggerTo set a trigger, go to Settings > Platform > Worflows and create a new workflow. The first step in the editorSet a trigger appThe trigger app will tell the workflow where to listen for an event. The triggers available to you will vary based on what apps you have installed in your Kustomer organization. Examples of available trigger apps are:KustomerChatPostmark (email)HooksShopifyTwilioSet a trigger eventEach trigger app has a set of trigger events that can kick off a workflow. For most workflows, you will be likely using Kustomer as the Trigger App.Kustomer trigger eventsUse these trigger events to automate tasks after an object has been created or updated. For example, you can build a workflow that runs every time a new conversation is created and assigns a tag based on the keywords of the conversation. The following objects have trigger events:ConversationCustomerMessageNoteKobjectChat trigger eventsUse chat trigger events if you want to create a workflow that runs when a chat message is received or sent. For example, you may want to build a workflow that automatically assigns chat conversations to a specific chat team after a new chat message is received. Chat trigger events are:Chat Message ReceivedMessage SendPostmark (email) trigger eventsKustomer uses Postmark to send and receive emails. The following events are able to trigger a workflow and can be used to create advanced workflows to thread emails based on your organization's needs.Message BounceMessage OpenMessage ReceiveHook trigger eventsHook trigger events work a little differently in that you need to create a new hook before selecting it as a trigger event in a workflow. You can create email hooks, form hooks, and webhooks from within the workflow editor. Once the hook is created, you can select it from the "Trigger Event" drop-down. You can use hooks to receive data from third-party systems into Kustomer. For example, you could create a form hook that receives contact form submissions. When this form hook receives a submission, it could kick off a workflow that creates a new conversation with the contents of the submission.Available trigger eventsThe triggers available to you will vary based on what apps you have installed in your Kustomer organization.AppAvailable eventsExample use caseFacebookFacebook Conversation Control ReceiveMessage Outbound Standby ReceiveMessage ReceiveComment ReceiveWallpost ReceiveUse Comment Receive to run a workflow when you receive a new Facebook comment.GmailMessage ReceiveUse to run a workflow when you receive a new Gmail message.InstagramComment ReceiveMessage ReceiveUse Comment Receive to run a workflow when you receive a new Instagram comment.ShopifyShopify Order UpdateUse to run a workflow after a Shopify order has been updated in Shopify.TwilioText Message ReceivedText Message Status UpdatedUse Text Message Received to run a workflow when you receive a new SMS.WhatsAppMessage ReceiveUse to run a workflow when you receive a new WhatsApp message.Direction vs Direction Type attributes
When building reports or constructing workflows, you'll likely want to incorporate messages coming into your Kustomer organization. The types of attributes you use — and the values you pair them with — can produce different results. This article will help to quickly clarify some differences between the various attributes we offer.Who can access this feature?User typesAdmins can create and manage and reports and workflow settings. Managers can access reports.In this articleMessage object attributesTipsMessage object attributesThe message object has a range of attributes that help to specifically identify what type of message it is in the conversation timeline:AttributeDescriptionDirectionDirection > inDirection of the message is inbound to Kustomer.Direction > outDirection of the message is outbound from Kustomer.Direction TypeDirection Type > initial-inThe first inbound message sent in a conversation. This can fall after the initial-out but not after any other values.Direction Type > initial-outThe first outbound message sent by an agent or the system in a proactive conversation. Direction Type > response-inA response to a previous outbound message in a conversation.Direction Type > response-outA response to a previous inbound message in a conversation. This falls after the initial-in message when a customer reaches out and an agent responds.Direction Type > followup-inA message a customer sends where the previous message in the conversation was also from the customer (i.e. when a customer send two messages back-to-back, the 2nd is a followup-in).Direction Type > followup-outA message a Kustomer organization sends where the previous message in the conversation was also from your organization (i.e. when an agent sends two messages back-to-back, the second is a followup-out).TipsA common misunderstanding when trying to run a report on inbound conversations is to look at the Conversation object and apply the Direction equals in filter. You'll get a more accurate count of inbound conversations created in the time period you selected it you instead look at the Message object and use Direction type equals initial-in filter.Common workflow fields
Certain fields are used fairly consistently when building out workflows. For example, it is common to check the message channel or direction. In addition, you may want to set a specific status based on previous conditions. This article is a guide to the most common workflow fields.Who can access this feature?User typesAdmins can create workflows.In this articleKnow before you beginChannelsConversation statusDirectionDirection typeImported conversationsKnow before you beginBefore you begin building out workflows, it is important to remember that the fields are case-sensitive. All fields detailed below should be lowercase; if used otherwise, the workflow will not match the condition properly.ChannelsBoth a message and a conversation are associated with a channel. Below is a full list of the available channels within Kustomer:emailchatsmsvoicefacebookInstagramWhatsAppA message can only have one channel, meaning the workflow condition step should be an "equals". For example:On the other hand, a conversation can contain multiple channels, which means that the workflow condition step should be a "contains". For example:Conversation statusUpdating the conversation status is most commonly used within a final workflow action step. For example, one common use case is to mark a conversation "done" if the customer is marked as spam.opensnoozeddoneDirectionDirection is commonly used as one of the first condition steps when checking for an inbound or outbound message.inoutDirection typeDirection type allows for a more granular understanding of how messages are flowing through the Kustomer platform. For workflows, the most common direction type is "initial-in", which can be used to check for an initial inbound message.initial-ininitial-outresponse-inresponse-outfollowup-infollowup-outReview the Direction vs Direction Type article for a full definition of each attribute.Imported conversationsConversations you import from other ticketing systems will contain a conversation attribute named importedAt. This can be used as the target for a conditional step in any workflow with a Conversation Created trigger.If you are batch-importing hundreds or thousands of conversations, you might not want your existing conversation-based workflows to act on all that imported data. A conditional step that only continues if the Imported At attribute does not exist would be a useful way to prevent a workflow from modifying those imported conversations.Related articlesWorkflows overviewWorkflow variables
Within workflows, you may want to use secure credentials such as API keys. Most commonly, this is done via a REST API JSON action step, where you need to pass in the appropriate headers for authorization. Workflow variables allow you to store these credentials securely and access them from within a workflow.Who can access this feature?User typesAdmins can create workflows.In this articleCreate a workflow variableAccess a workflow variableCreate a workflow variableTo create a workflow variable, navigate to Workflow Options and select Workflow Variables. When creating a new workflow variable, remember that the name cannot contain spaces. Once saved, you can edit or delete this variable in the future.Note: Variables you create are workflow-specific. If you duplicate a workflow that contains a variable, you must create a new variable for the duplicated workflow.Access a workflow variableSelect the key icon and copy the desired workflow variable to access a workflow variable within the REST API JSON action step. Then, you can paste this value where the secure API token is needed for authorization.To access a workflow variable within a standard entry field, click the icon on the right > Variables > and select the desired workflow variable. Related ArticlesCalling a REST API Within a WorkflowCallable workflows and conversational assistants
Workflows make it easy to automate processes within the Kustomer platform. Unlike typical workflows triggered by an event, such as when a conversation is created, callable workflows are triggered by a conversational assistant. You can also use callable workflows to automate actions that depend on time-specific conditions. For more information, see Callable scheduled workflows.With callable workflows, you can use data captured from a customer's interaction with conversational assistants to return relevant data to your customer. In this article, we will create a workflow that accepts an order number from a conversational assistant and outputs the return status for that order.Who can access this feature?User typesAdmins can create and manage callable workflows.In this articleCreate the workflowSet up the conversational assistantCreate the workflowThe first step is to create a callable workflow that captures data from the conversational assistant, performs an action based on that data, and then returns output data to the conversational assistant.Go to Settings > Platform > Workflows.Select Add Workflow.Enter a name for the workflow and then turn on the Callable Workflow toggle. We're going to name it Return Status.Select Create.Next, enter the data field(s) that the workflow expects to receive from the conversational assistant. In this example, we want to receive input from the customer.Note: You can make any of these parameters required by selecting the Required Field check box.Select the Output Parameters tab and enter the name and data type of the parameter(s) that will be returned to the conversation assistant.Select Update.Add an Action step that takes the data entered into the conversational assistant and uses it to request information from a specific source. In this example, we're making an API call to get the status of the return.Add a final Action step that sends a response back to the conversational assistant by selecting Kustomer as the Action App and Workflow: Send Response as the Action Event.After you select the Send Response event, specify what parameters will be output to the assistant. In this example, we are going to tell the customer the status of their return.Select Save.Set up a conversational assistantNow that we have the callable workflow configured, we'll set up a conversational assistant that is going to call that workflow. Note: You may need to create custom attributes to save your information. Conversational assistants only support the Conversation and Customer objects. We created customer input1 and return status for this example.Add a new assistant and enter any desired dialogs and interactions, such as a welcome message or any questions you may want to ask your customers. For more information on creating an assistant, see Introduction to Customer Assist.Select Add Dialog.Select Add Interaction > Customer Text Response.Enter the message that will prompt your customers to input the data you need to run the workflow and then select where their response is going to be saved. In this example, we want to save customer input 1, which is going to be the customer's order number and is the input parameter that we defined in step 5 when we created the workflow, in the Conversation object.Select Add Interaction > Run Workflow.Select the Return Status workflow that we created earlier from the drop-down menu and then specify the data you need the customer to enter to run the workflow. You can manually enter it or select Snippets & Dynamic Text to select the dynamic text value from the available list.Tips:You can select Create Workflow from the drop-down menu to create the new callable workflow.To view an existing workflow, select the open icon next to the drop-down menu.Then, specify where to save the response that the workflow returns to the customer. In this example, we will save the customer's return status in Customer return_status.Add any additional dialogs to the assistant, as needed. For this example, we're going to select Add Dialog and then Add Interaction > Send a Message to configure the message the customer is going to receive with their return status.Add any additional dialogs to the assistant, as needed, and select Save and Publish.Now, whenever a customer contacts you via chat inquiring about the status of their return, the conversational assistant will call the workflow and use the order number entered to find the requested information and send it back to your customer.Import and export workflows
Workflows can be exported and imported in JSON format. This allows you to take workflows you've created in a test or sandbox organization and move them into your production organization.Who can access this feature?User typesAdmins can access the Workflows page.In this articlePrerequisitesImport a workflowExport a workflowPrerequisitesAdmins will need Workflow Read/Create access in order to import or export workflows. Admins will also need access to the Workflow Settings page in order to access this feature.Import a workflowYou can add a workflow to your Kustomer org from an external source from the Workflow Settings. Kustomer can import any workflow in JSON format.To import a workflow:Go to Settings and select Platform > Workflows.Select Add Workflow.From the Add Workflow popover, select Import Workflow, then select Next.Select or drag in the local JSON file on your computer, then select Import.The imported workflow will be saved, and you'll be taken to the Workflow Editor to review or modify the properties of this imported workflow.Note: Any hook triggers must be reset if the workflow is imported from a different Kustomer organizationThe workflow is imported in a deactivated state. Whenever you wish to activate this workflow, toggle it on in the Workflow Settings.Export a workflowAny workflows in the Settings can be exported to a JSON file.To export a workflow:Go to Settings and select Platform > Workflows.Locate the desired workflow from the list, then select the More Optionsmenu on that workflow.Select Export JSON.The selected workflow will be saved locally to your web browser's default Downloads folder.Data Connect
Data Connect allows administrators to sync objects from another system into Kustomer through a guided setup. This feature makes it easier than ever to continuously capture data from an external source without needing to manually build a custom workflow.During the Data Connect setup, we'll ask you to choose which objects to sync and how you want fields from your external platform to match with Kustomer fields. Then, our wizard will use your selections to create a workflow automation to continuously capture data from your target source.Who can access this feature?User typesAdmins can access these settings pages.In this articlePrerequisitesOverviewCreate the KlassCreate the webhookData Connection Wizard Walkthrough1. Prepare2. Connection Details3. Configure WebhookExample JSON payloads4. Match Fields5. ReviewPrerequisitesThis feature requires understanding of advanced technical concepts including webhooks, and admins will need to provide a JSON payload from the target external platform to configure sync.Admins will also be activating an app-created workflow during the setup process. It is not required to understand or customize this workflow to activate it, but if you require further customization of this workflow, you will either need to be familiar with the basics of Workflow automations or contact Kustomer Support to make the desired changes. Learn more about this concept in Workflows Overview.OverviewYou can create data connections and view the status of any existing data connections in Settingsunder Administration > Data Import > Data Connections.To set up Data Connect, select the Add Data Connection button above the connections table. This will open our setup wizard which walks you through a 5-step process for activating a new data connection.Here's a general overview of the steps you'll see during setup:Prepare: Review best practices for syncing data.Sync Details: Set the name and high-level settings for the connection, including what you want to sync and what custom klass to connect data to.Configure Webhook: Choose the webhook that your external system is posting data to, and add a sample JSON payload so we can start configuring your optimal connection settings automatically.Match Fields: Correlate fields from your JSON with selected Klass attributes in Kustomer.Review: Confirm all of your settings are correct before you initiate the data connection.Once Data Connect is set up, the connection will offer a continuous sync of data from your existing system to Kustomer. The objects you selected will be created on a continuous basis for as long as the connection remains active.Create the KlassData Connect requires two components to be set up in your Kustomer organization:A Klass for your objects to sync toAn inbound webhook in Kustomer, which your external system will POST toIf you don't already have a Klass set up for use with this data connection, start by creating one. Learn more in our help guide Define custom attributes in Kustomer.Create the webhookIf you don't already have a webhook ready to use for this data connection, here's how you'll create one.To create an inbound webhook:In Kustomer, go to Settingsand select Platform > Inbound Webhooks.Select Add Inbound Webhook.Fill out the name and description of the new webhook.Note: We always recommend as a best practice that you use clear and illustrative names and descriptions, so that it's easy to know what function this webhook performs if another member of your team reviews it at a later date.For the type of the webhook, select Web.Then, select Create to save the new webhook.With the webhook set up, you're now able to begin walking through the Data Connect setup wizard. Data Connect Wizard Walkthrough1. PrepareOn the first page of the wizard, you'll see a variety of recommendations that will be useful to keep in mind as you plan your data connection:Do you know what you want to sync?This guide will allow you to sync data from your existing system to Kustomer. In order to sync properly, you will have to create a Klass for the objects you wish to sync. It is recommended that this Klass is created before starting the sync.If you're following the steps in this help article, you'll have already set this up.Have you created a webhook?To start syncing data, you will need to create a webhook in Kustomer and then POST to this webhook from your system. In order for the sync to run properly, your system needs to be sending data to the webhook URL.If you're following the steps in this help article, you'll have already set this up.Do you have a sample JSON?To properly match the fields between your system and Kustomer, you will need a sample JSON data payload that contains the data that will be sent from your system.You can find an example of what this looks like in our help article Data payload examples.2. Connection DetailsOn the second page of the wizard, you'll manage some of the high-level details and settings for the data connection.You'll set the name of your sync, which is how you'll distinguish this data connection from other import sources in Settings. The name you set cannot be changed after you create it here, outside of creating an entirely new data connection with a different name.Here you'll also set whether to sync Customers, or Customers & Custom Objects, as well as picking the custom klass to sync to.3. Configure WebhookIn this step, you'll choose the webhook that your system is posting data to. If you didn't already create a webhook earlier in this guide, you can use the Create New Webhook link in the wizard to start setting one up.You'll also need to provide a sample JSON payload. We'll use your payload to start matching fields between your external system and Kustomer, though you'll customize the rest of the fields yourself in the next step.If the JSON sample can be read successfully, you'll see a Valid JSON confirmation message above the code block. Once you have a valid JSON check, you can select Save and Continue to proceed to the next step.If after pasting the JSON you receive an Error Parsing JSON message, this means you'll need to check your formatting and try again before you can continue with setup.Example JSON payloadsYou can find an example of sample JSON data in our help article Example Data Payloads. Follow the guidance in that article to ensure that the JSON file is formatted correctly.4. Match FieldsIn this step, you'll now match the fields from the JSON payload and your selected Klass attributes.In the top section of this screen, you'll match one or more fields from the JSON to use as a unique identifier for imported customers. Based on your selections earlier in this wizard, you'll be required to match at least one of the External ID, Phone, or Email fields for Customers, or External ID for Custom Objects.Then, you'll match the remaining customer fields to Klass attributes in Kustomer.5. ReviewIn the final screen of the wizard, you can review and confirm all of the settings for your data connection before you activate the sync.Once you're ready to start syncing data, select Initiate Connection at the bottom of the window.Best practices for automations
This article will cover the tools that can process automations within any Kustomer organization, as well as provide use case examples and testing methods.Who can access this feature?User typesAdmins can access these settings pages.In this articleAutomation methodsExamples of common automationsUse Shortcuts with automationsTesting new automationsAudit logsSearchReportingAdjusting to automation and tips to rememberTeam sizeProductivityParallel or conflicting automationsAdvanced configurationsAutomation methodsKustomer offers three automation methods:Business rulesWorkflowsQueues and routingBusiness rules are simple, event-driven automations that can be utilized to automate dozens of unique processes. Kustomer offers a variety of business rule templates for common automations which can be adapted to suit the needs of your team. They can be triggered off of 8 unique conversational updates, filtered to specific criteria, and then made to act in any of the following ways:To change data (such as Conversation, Customer, or Company fields)To predict data using conversation classification (requires KIQ)To send messages (currently available for Email/SMS, but can also add a Note on a conversation)To update queuesThis option can perform queue updates based on different changes within attributes using the changed from operator.This functionality is distinct from queue rules.Workflows are a more powerful automation method that can be triggered by more than just conversational updates. Workflows can trigger off of external systems and applications, ingest data (via hooks), update data, and be scheduled (with time-dependent actions). In contrast to business rules, configuring workflows may require more technical knowledge of the Kustomer platform. Please reach out to the Kustomer Support team for assistance in creating or editing workflows.Queues and routing allow for automatic triage and queueing of conversations. Conversations are placed into queues, which are then routed to available agents based upon queue rules in a first-in first-out (FIFO) format for their specified team.Examples of common automationsBelow are some examples of automations, and which automation method could be used to accomplish each use case.Use CaseBusiness RulesWorkflowsQueues & RoutingAcknowledgment auto-response (for any channel during or outside business hours)✔✔Close out-of-office messages or"thank you" replies✔✔Ingest or update data using hooks to show order information on a timeline✔Route conversations to teams or agents based on the conversation topic type✔Use Shortcuts with automationsAnother tool frequently used along with automations is shortcuts. Shortcuts are text snippets that can be used in conversations to include boilerplates, canned responses, and other frequently-used response text. Shortcuts offer dynamic fields that can import and use customer information, like addressing a boilerplate to a customer by name, or mentioning their latest order by ID.Along with sending a pre-composed message, shortcuts can also be used to perform actions like:Set or replace the conversation subject or nameSelect an email templateAdd tagsSpecify optional or custom fields like assigned userTesting new automationsAfter you've set up a business rule, workflow, or queue rule, how do you tell if it's working? There are a few places in Kustomer to check after you've set up a new automated process.Audit logsThe audit log provides you with a view of events within your Kustomer organization which can help you track activity across your team. In addition to tracking general events, business rules and workflows report events to their audit log for troubleshooting purposes.SearchSearch is a great way to find objects you've created. Based on the conditions in the search, you can match based on actions that were conducted on an object.For example, if the attribute VIP is added to a conversation, you can search for the VIP attribute along with any other search conditions to find conversations that received the VIP attribute.For queues and routing, you can create searches to view the conversations that go into a queue. Each conversation also has its audit log which can be used to review a detailed list of all events that occurred on the conversation.ReportingIf attributes or custom objects are created and updated via automation, you can utilize the custom reports based on those objects to see their usage.If you added new shortcuts and want to see the usage of each, you can view the chart under the Conversation standard report. Based off of this information, you can review or modify lesser-used shortcuts or create further automations based on the most-used shortcuts.Adjusting to automation and tips to rememberAdding automations should help make everyday tasks more efficient for you and your team. When configured correctly, automations should not make any of your current configurations or processes more complicated.If you're finding that your automations are causing more work or friction, or your team is forced to find workarounds, you may want to reevaluate your automations with the following considerations in mind.Team sizeWhat are the day-to-day responsibilities of your agents?How is their work split up throughout the workday?What does your staffing look like?Do you need additional agents to help with your inbound volume or processes?ProductivityUse Reporting to determine and take action on outliers.For example: service-level agreements (SLAs), percentage of volume per channel, and conversation topics.In the Conversation report, inbound messages per hour can provide a better understanding of how to staff your support team.Use acknowledgment auto-response automations to let your customers know that you've received their message, and set proper expectations by providing an anticipated reply time. (Make sure to keep your quoted reply time ETA up-to-date as your support traffic changes.)Searches can help organize different types of standard objects (Customers, Conversations) and custom objects (Orders, Subscription Info). Make use of search folders to organize your saved searches.Team Pulse helps track your team in real time, with the ability to see agent activity and conversations in progress. (Ultimate plans only.)Parallel or conflicting automationsThere's nothing in Kustomer that would prevent you from setting up multiple automations around the same process. This can however lead to inconsistent and unpredictable results, and Kustomer cannot guarantee whether an automation (business rules, queue rule, workflow, etc) will run in a specific order or how fast it will run.As a best practice, if you're considering creating multiple automations around the same process — for example, creating an auto-response message — we recommend sticking to 1 single automation for that process that incorporates all of the desired changes.If 2 or more automations are set to take action on the same trigger but 1 of those automations relies on configurations made by the other automation, you should adjust the 2nd automation by applying a different trigger to guarantee that it runs after the 1st automation is finished.Advanced configurationsIt's possible to create even more complex and integrated automations between automation tasks, business rules, workflows, and queues. For example, a workflow that ingests and updates data can also be used to power queues and routing strategies that would be too complex to build within queue rules or business rules alone.However, only advanced admins with fundamental knowledge of Kustomer's architecture and processes should attempt to create or modify these types of configurations. Contact Kustomer Support for guidance on adjusting these advanced and interconnected automation settings.Trigger a workflow from an Insight Card
There may be times when you want to trigger a workflow to run an automation manually, instead of waiting for an update within Kustomer to trigger the workflow. Currently, a Kustomer workflow can be triggered to run by a number of different reasons, including actions such as, conversation update, customer create, and note create. Users and organizations will oftentimes make manual changes to a Klass by adding a tag or changing the value of an attribute to trigger a workflow. However, there are also alternative options, such as creating an insight card with buttons that send data and trigger workflows to make updates. In this article, we will go through how to set up a simple insight card that has buttons to manually change a custom attribute on the conversation Klass.Who can access this feature?User typesUsers with permission set access to the Klass Management, Webhooks, and Workflows settings pages.In this articleCreate a Form webhookCreate a workflowCreate an Insight CardCreate a Form webhookGo to Settingsand select Platform > Inbound Webhooks.Select Add Inbound WebhookEnter a Name and Description for the webhook.Then, select Form as the webhook type.Select CreateOn the Inbound Webhooks page, go to the Form Hooks tab, find your newly created webhook , select the menu icon , and the select Copy Hook Address. Store the hook in a secure location as you will need it for future steps.Note: We recommend turning on the debug logs for the webhook to make troubleshooting any errors much simpler and also give you additional insights into the data. You can do so by selecting the edit icon to edit the webhook and turning on the Debug option.Create a workflowGo to Settingsand select Platform > WorkflowsSelect Add Workflow.Select Custom Workflow to create a new workflow from a blank state.Enter a Title and Description for the workflow.Select the first trigger event and then change the Trigger App to Hooks and the Trigger Event to your newly created webhook.From here you can cater the workflow to run for whatever action you’d like. You can learn more about workflows here. In this example, the workflow changes a custom conversation attribute to “true” and adds a tag to the conversation. Here is a brief overview of the workflow. Step 2 shows how to target the Conversation ID that will be coming over from a button click in our insight card in the following steps. Create an Insight CardGo to Settingsand select Platform > Klasses.Select Create Insight Card.Enter a Name and option Icon for the Insight Card.Select View Code in the bottom left, then Convert to Code. Fill out the form with the word CONVERT.Note: This is a permanent action, and you will not be able to then convert this Insight Card back to a visual card.Select Convert to Code.Copy and paste code snippet below into the Code tab// const convoPut = "FORM HOOK GOES HERE" // Example with form hook -> const convoPut = "https://api.kustomerapp.com/v1/hooks/form/60b906379e2843533971e874/2fd70fbcf4c9e2892c7c52dfced79445bf4d288279548c400ba78013594fa57f" const data = this; const labelStyle = { "margin-left": "5px" }; const inputStyle = { width: "95%", display: "block", "margin-left": "5px", "margin-bottom": "5px", "margin-top": "2px", height: "25px", "font-weight": "600", "border-radius": "5px" }; const textareaStyle = { width: "95%", display: "block", "margin-left": "5px", "margin-bottom": "5px", "margin-top": "2px", height: "100px", "font-weight": "600", "border-radius": "5px" }; const buttonStyle = { width: "95%", background: "#52AAFF", padding: "5px", border: "none", margin: "5px", color: "white", fontSize: "1.1rem", fontWeight: "500", fontFamily: '"Neutral Std", "Helvetica Neue", Arial, Helvetica, sans-serif', borderRadius: "5px", height: "2.2em", cursor: "pointer", marginBottom: "10px" }; const centerAlign = { textAlign: "center", marginTop: "10px" }; const state = { payload: {}, kobjects: [], }; function omitter(e) { e.preventDefault(); const conversationId = document.getElementById("conversationId").value; fetch(convoPut, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ conversationId: conversationId, }) }) } <form id="omit"> <input type="hidden" id="conversationId" name="conversationId" value="{`${_.get(conversation,"> <input type="button" value="Omit Convo"> omitter(e)}/></form>Select Save Changes.You should see an insight card with a single button when viewing a conversation. The final step is to add the URL of the form webhook to the first line of the CSAT Omit insight card. This URL is what we saved earlier in step six of the Create a Form webhook procedure above. Adding the URL here is the connection between the button on the conversation timeline that sends the data to the workflow we built. Clicking the button in the insight card will capture the conversation ID and then send the ID to the workflow.This setup builds upon Kustomer’s existing capabilities and can be quite valuable to understand how the connection works to build even more complex Insight Cards.Unassign conversations from deactivated users
Deactivated users in your organization may have conversations that remain assigned to them even after their account has been deleted.If you want to unassign conversations from deactivated users so they get rerouted to your active agents, you can set up a Kustomer workflow to automate this process.Who can access this feature?User typesAdmins can access the Workflows page.In this articlePrerequisitesCreate the workflowEnter the workflow JSON codeCustomize the workflowPrerequisitesBefore following this guide, we recommend that you already be comfortable with the basics of using Workflows: Workflows Overview.Create the workflowGo to your Kustomer app and create a new workflow.Go to Settingsand select Platform > Workflows.Select Add Workflow. The New Workflow window opens. Enter a Workflow Title. You can leave the Description box blank because the code snippet below will provide this for you.Select Create to save the workflow and begin working in the Workflow Editor.Enter the workflow JSON codeUse the Workflow Editor to paste in the workflow code supplied below. This JSON code will take care of most of the workflow creation.In the Workflow Editor, go to Workflow Options and select Edit Workflow JSON.A window appears where you can edit the code for this workflow directly.Select and delete the current JSON code.Copy the code block below, and paste it into the JSON text field in the Edit Workflow JSON window:{ "description": "If a conversation is assigned to a deactivated agent and an inbound message comes in, will unassign and requeue the conversation.", "name": "unassign-if-agent-deactivated", "steps": [ { "transitions": [ { "meta": { "name": "Conversation is Assigned" }, "condition": { "values": [ "/#steps.NU2EZUSog.assignedUsers" ], "op": "exists" }, "target": "IQltI31uB" } ], "errorCases": [], "id": "NU2EZUSog", "action": "kustomer.conversation.find-by-id", "params": { "id": "/#steps.1.conversation" }, "appVersion": "kustomer-^1.9.2", "meta": { "displayName": "Find Conversation" } }, { "transitions": [ { "meta": { "name": "Assigned User is Deactivated" }, "condition": { "values": [ "/#steps.IQltI31uB.deletedAt" ], "op": "exists" }, "target": "seww9Jqjy" } ], "errorCases": [], "appVersion": "kustomer-^1.9.2", "action": "kustomer.user.find-by-id", "params": { "id": "/#steps.NU2EZUSog.assignedUsers.0" }, "id": "IQltI31uB", "meta": { "displayName": "Find User by ID" } }, { "transitions": [], "errorCases": [], "appVersion": "kustomer-^1.9.2", "action": "kustomer.conversation.update", "meta": { "displayName": "Unassign & Requeue Conversation" }, "params": { "assignedUsers": [], "id": "/#steps.NU2EZUSog.id" }, "id": "seww9Jqjy" } ], "trigger": { "transitions": [ { "target": "NU2EZUSog", "condition": { "op": "true", "values": [ true ] } } ], "eventName": "kustomer.message.create", "id": "1", "appVersion": "kustomer-^1.9.2" } }Select Update to dismiss the JSON editor and save the changes to the workflow.The workflow will look like the image below.Customize the workflowYou can add changes to the workflow in the last Conversation Update step if you want the conversation to go to a different queue, team, or have a specific tag or attribute set. When you're finished making any changes to the workflow, select Save and turn on the toggle to activate the workflow.Avoid email rate limits
Kustomer's default system email has a rate limit in place that caps how many inbound messages your organization can receive from the same sender within a window of time. This is in place to help protect you and Kustomer from spam or abuse and applies to inbound messages coming from 1 single email address or being sent to 1 other single address. The limit is set to 20 messages per hour on a rolling hourly basis.If your organization receives more email traffic than this per hour, this article will show you how to work around this rate limit to ensure you receive all of your intended emails.Who can access this feature?User typesAny users with permission to create webhooks and workflows within Kustomer.In this articleOverviewReply-to email-headerForm submissionEmail webhookCreate the email hookBuild the workflowTest your hook and workflowJSON code snippetSet up email forwardingOverviewAs an example, let's say a company named Acme Inc. is set up to forward emails from marketing@acme-inc.com to support@acme-inc.mail.kustomer.com. This might be used to keep track of all of this organization's marketing emails that go out to customers. If an admin were to forward their latest batch of marketing emails to Kustomer, they would hit the rate limit and not receive all those emails if more than 20 are sent per hour. The result of this would be that this organization would receive the first 20 emails, and then not receive any more until the following hour when the rate limit resets.This is a common issue in a few different scenarios:Submissions from an external (non-Kustomer) form.Manually bulk-forwarding emails from an inbox outside Kustomer.Automated messages or notifications.If you run into a case where you have 1 email address that sends in a high volume of mail in a short period of time, there are a few solutions you can employ to avoid the rate limit.Note: These limits and workaround only apply when using the Kustomer system email channel (managed in Apps > Email), which formats addresses as support@<your company>.mail.kustomerapp.com and does not apply to our Gmail app integration. For more information on limits and workarounds specific to Gmail, see Avoid Gmail rate limits.Reply-to email headerIn the event you are forwarding emails in and have access to setting the email headers in the outbound email message, there is a simple way to work around this limit and properly ingest email conversations to the appropriate customer timeline without requiring significant effort.Example inbound email headersThe email rate limit is determined by both the FROM and an optional REPLY-TO email address. To reduce the chances of hitting this limit, set the REPLY-TO email header to the customer's actual email address when forwarding from a single FROM address. this will help ensure that the email conversation appears on the correct customer timeline, with subsequent responses going directly to the customer. In the example above, as long as forwarded emails for real-customer-email@example.com and others stay within the email rate limit, you can forward virtually unlimited emails from orders@foobar.com simultaneously without any issues.Form submissionIf you frequently forward publicly-facing form submissions into Kustomer and regularly hit this limit, setting up a form hook may be a good solution. This is a better long-term and scalable solution for this issue that takes minimal updating and maintenance after the initial setup. Learn more about setting up a form hook in Inbound webhooks.Email webhookAn email webhook is the best solution if you regularly hit the email after manually bulk-forwarding emails from an external mailbox or after automated messages/notifications. Email webhooks are similar to form hooks, but instead of using a unique URL, you'll send emails directly to a unique email address. Learn more about setting up an email webhook in Inbound webhooks.This example will walk through how to set up an external email address to send emails to your email webhook to avoid potential rate limits. In this process, you will create an email webhook, and then create a workflow that uses the webhook to ingest emails.Create the email hookThe first step is to make the email hook, which creates a unique email address that you can use when forwarding mail to Kustomer.To create the email hook:Go to Settings> Platform > Inbound Webhooks.Select Add Inbound Webhook.Give the webhook a name and a description.For the webhook type, select Email.Select Create.Select the Email Hooks tab and locate your new webhook. Click the menu icon to copy hook address. Make a note of this hook address or add it to your address book, as you will need it later in this guide when you test your hook and workflow.Build the workflowNow that you have your webhook set up, you can build the workflow that uses the webhook to ingest the emails and create new conversations.To build the workflow:Go to Settings> Platform > Workflows.Select Add Workflow.Choose Custom Workflow.Fill in the fields as follows:Name: email-ingest-hookDescription: Workflow will provide a workaround for the email limit of 20 messages per hour.Callable workflow: leave offIn the toolbar of the Workflow editor, select Edit Workflow JSON.Paste in the JSON code snippet.Select the first step in the workflow, and set the Trigger Event to the webhook you created earlier.Select Save.Toggle the workflow on.Test your hook and workflowYour new webhook and workflow are ready to use. It's always a good idea to test out a new connection to ensure everything is working as expected. Try selecting View Logs in the workflow editor to turn on logging, then send a few emails to the email hook address you created earlier to review the results. A successful test will show the workflow run in the View Logs panel with no errors.Learn more about using workflow logs in Test and debug Workflows by viewing logs.JSON code snippetCopy and paste this code block as the Workflow JSON in the previous step.{ "description": "Workflow will provide a workaround for the 20 email limit.", "name": "email-hook-ingest-template", "steps": [ { "transitions": [ { "condition": { "values": [ true ], "op": "true" }, "target": "20t7VL1MD" } ], "errorCases": [], "id": "8KmbEDLqj", "appVersion": "kustomer-^1.9.3" }, { "transitions": [ { "target": "2A", "condition": { "op": "true", "values": [ true ] } } ], "errorCases": [], "id": "20t7VL1MD", "appVersion": "kustomer-^1.9.3" }, { "transitions": [ { "condition": { "values": [ "/#steps.1.attributes.email.replyTo" ], "op": "exists" }, "target": "2B" }, { "condition": { "values": [ { "values": [ "/#steps.1.attributes.email.inReplyToId" ], "op": "exists" }, { "values": [ "/#steps.2A.id" ], "op": "exists" } ], "op": "and" }, "target": "3A" }, { "condition": { "values": [ { "values": [ "/#steps.1.attributes.email.inReplyToId" ], "op": "dne" }, { "values": [ "/#steps.2A.id" ], "op": "exists" } ], "op": "and" }, "target": "9A" }, { "condition": { "values": [ "/#steps.2A.id" ], "op": "dne" }, "target": "5A" } ], "errorCases": [], "params": { "email": "/#steps.1.attributes.email.from.email" }, "action": "kustomer.customer.find-by-email", "appVersion": "kustomer-^1.9.4", "id": "2A" }, { "transitions": [ { "condition": { "values": [ true ], "op": "true" }, "target": "10A" } ], "errorCases": [], "params": { "customer": "/#steps.2A.id", "id": "/#steps.1.attributes.email.inReplyToId" }, "action": "kustomer.message.find-by-id", "appVersion": "kustomer-^1.9.4", "id": "3A" }, { "transitions": [], "errorCases": [], "params": { "attachments": "/#steps.1.attributes.email.attachments", "related": "/#steps.1.attributes.email.selfLink", "size": "/#steps.1.size", "body": "/#steps.1.attributes.email.textBody", "subject": "/#steps.1.attributes.email.subject", "externalId": "/#steps.1.attributes.email.messageIdHeader", "sentAt": "/#steps.1.attributes.email.sentAt", "app": "postmark", "channel": "email", "id": "/#steps.1.id", "customer": "/#steps.2A.id", "spam": "/#steps.1.attributes.email.spam", "meta": { "subject": "/#steps.1.attributes.email.subject", "from": "/#steps.1.attributes.email.replyTo", "to": "/#steps.1.attributes.email.to", "cc": "/#steps.1.attributes.email.cc", "recipient": "/#steps.1.attributes.email.recipient" } }, "action": "kustomer.message.create", "appVersion": "kustomer-^1.9.4", "id": "9A" }, { "transitions": [ { "condition": { "values": [ true ], "op": "true" }, "target": "12A" } ], "errorCases": [], "params": { "email": "/#steps.1.attributes.email.from.email", "name": "/#steps.1.attributes.email.from.name" }, "action": "kustomer.customer.create", "appVersion": "kustomer-^1.9.4", "id": "5A" }, { "transitions": [], "errorCases": [], "params": { "attachments": "/#steps.1.attributes.email.attachments", "related": "/#steps.1.attributes.email.selfLink", "size": "/#steps.1.size", "body": "/#steps.1.attributes.email.textBody", "subject": "/#steps.1.attributes.email.subject", "externalId": "/#steps.1.attributes.email.messageIdHeader", "sentAt": "/#steps.1.attributes.email.sentAt", "app": "postmark", "channel": "email", "id": "/#steps.1.id", "conversation": "/#steps.3A.conversation", "customer": "/#steps.2A.id", "spam": "/#steps.1.attributes.email.spam", "meta": { "subject": "/#steps.1.subject", "from": "/#steps.1.from.email", "to": "/#steps.1.to", "cc": "/#steps.1.cc", "recipient": "/#steps.1.recipient", "inReplyTo": "/#steps.1.inReplyToId" } }, "action": "kustomer.message.create", "appVersion": "kustomer-^1.9.4", "id": "10A" }, { "transitions": [], "errorCases": [], "params": { "attachments": "/#steps.1.attributes.email.attachments", "related": "/#steps.1.attributes.email.selfLink", "size": "/#steps.1.size", "body": "/#steps.1.attributes.email.textBody", "subject": "/#steps.1.attributes.email.subject", "externalId": "/#steps.1.attributes.email.messageIdHeader", "sentAt": "/#steps.1.attributes.email.sentAt", "app": "postmark", "channel": "email", "id": "/#steps.1.id", "customer": "/#steps.5A.id", "spam": "/#steps.1.attributes.email.spam", "meta": { "subject": "/#steps.1.attributes.email.subject", "from": "/#steps.1.attributes.email.replyTo", "to": "/#steps.1.attributes.email.to", "cc": "/#steps.1.attributes.email.cc", "recipient": "/#steps.1.attributes.email.recipient", "inReplyTo": "/#steps.1.attributes.email.inReplyToId" } }, "action": "kustomer.message.create", "appVersion": "kustomer-^1.9.4", "id": "12A" }, { "transitions": [ { "condition": { "values": [ { "values": [ "/#steps.1.attributes.email.inReplyToId" ], "op": "exists" }, { "values": [ "/#steps.2B.id" ], "op": "exists" } ], "op": "and" }, "target": "3B" }, { "condition": { "values": [ { "values": [ "/#steps.1.attributes.email.inReplyToId" ], "op": "dne" }, { "values": [ "/#steps.2B.id" ], "op": "exists" } ], "op": "and" }, "target": "9B" }, { "condition": { "values": [ "/#steps.2B.id" ], "op": "dne" }, "target": "5B" } ], "errorCases": [], "params": { "email": "/#steps.1.attributes.email.replyTo" }, "action": "kustomer.customer.find-by-email", "appVersion": "kustomer-^1.9.4", "id": "2B" }, { "transitions": [ { "condition": { "values": [ true ], "op": "true" }, "target": "10B" } ], "errorCases": [], "params": { "customer": "/#steps.2B.id", "id": "/#steps.1.attributes.email.inReplyToId" }, "action": "kustomer.message.find-by-id", "appVersion": "kustomer-^1.9.4", "id": "3B" }, { "transitions": [], "errorCases": [], "params": { "attachments": "/#steps.1.attributes.email.attachments", "related": "/#steps.1.attributes.email.selfLink", "size": "/#steps.1.size", "body": "/#steps.1.attributes.email.textBody", "subject": "/#steps.1.attributes.email.subject", "externalId": "/#steps.1.attributes.email.messageIdHeader", "sentAt": "/#steps.1.attributes.email.sentAt", "app": "postmark", "channel": "email", "id": "/#steps.1.id", "customer": "/#steps.2B.id", "spam": "/#steps.1.attributes.email.spam", "meta": { "subject": "/#steps.1.subject", "from": "/#steps.1.replyTo", "to": "/#steps.1.to", "cc": "/#steps.1.cc", "recipient": "/#steps.1.recipient" } }, "action": "kustomer.message.create", "appVersion": "kustomer-^1.9.4", "id": "9B" }, { "transitions": [ { "condition": { "values": [ true ], "op": "true" }, "target": "12B" } ], "errorCases": [], "params": { "email": "/#steps.1.attributes.email.replyTo", "name": "/#steps.1.attributes.email.from.name" }, "action": "kustomer.customer.create", "appVersion": "kustomer-^1.9.4", "id": "5B" }, { "transitions": [], "errorCases": [], "params": { "attachments": "/#steps.1.attributes.email.attachments", "related": "/#steps.1.selfLink", "size": "/#steps.1.size", "body": "/#steps.1.attributes.email.textBody", "subject": "/#steps.1.attributes.email.subject", "externalId": "/#steps.1.attributes.email.messageIdHeader", "sentAt": "/#steps.1.attributes.email.sentAt", "app": "postmark", "channel": "email", "id": "/#steps.1.id", "conversation": "/#steps.3B.conversation", "customer": "/#steps.2B.id", "spam": "/#steps.1.attributes.email.spam", "meta": { "subject": "/#steps.1.attributes.email.subject", "from": "/#steps.1.attributes.email.replyTo", "to": "/#steps.1.attributes.email.to", "cc": "/#steps.1.attributes.email.cc", "recipient": "/#steps.1.attributes.email.recipient", "inReplyTo": "/#steps.1.attributes.email.inReplyToId" } }, "action": "kustomer.message.create", "appVersion": "kustomer-^1.9.4", "id": "10B" }, { "transitions": [], "errorCases": [], "params": { "attachments": "/#steps.1.attributes.email.attachments", "related": "/#steps.1.attributes.email.selfLink", "size": "/#steps.1.size", "body": "/#steps.1.attributes.email.textBody", "subject": "/#steps.1.attributes.email.subject", "externalId": "/#steps.1.attributes.email.messageIdHeader", "sentAt": "/#steps.1.attributes.email.sentAt", "app": "postmark", "channel": "email", "id": "/#steps.1.id", "customer": "/#steps.5B.id", "spam": "/#steps.1.attributes.email.spam", "meta": { "subject": "/#steps.1.attributes.email.subject", "from": "/#steps.1.attributes.email.replyTo", "to": "/#steps.1.attributes.email.to", "cc": "/#steps.1.attributes.email.cc", "recipient": "/#steps.1.attributes.email.recipient", "inReplyTo": "/#steps.1.attributes.email.inReplyToId" } }, "action": "kustomer.message.create", "appVersion": "kustomer-^1.9.4", "id": "12B" } ], "trigger": { "transitions": [ { "target": "8KmbEDLqj", "condition": { "op": "true", "values": [ true ] } } ], "id": "1", "appVersion": "hooks-^1.0.0", "eventName": "kustomer.hooks.email.64b5b843fa2c268fcda31872.receive" } }Set up email forwardingNow that the workflow is set up and tested, you're ready to begin using this webhook with email forwarding to avoid rate limits. You can begin bulk forwarding emails to this address, use this webhook address as a destination for any automated emails or notifications, or use it for any other scenario where you want to avoid running into any email API rate limits. Every email provider is different, so the exact steps to forward your email can depend on your current host. Learn more about email forwarding for these common hosts in their help documentation:Microsoft ExchangeMicrosoft Office 365GoDaddy Workspace EmailIf you are using Google Workspace (formerly G Suite) or Gmail, see Forward email from Gmail to Kustomer or use our Gmail app integration.Resolve snoozed conversations with workflows
While your users may change conversation statuses and use the snooze status correctly when awaiting a customer's reply, you may find a number of your snoozed conversations still not receiving a customer response after an extended period of time.Depending on your team's needs, you may want to send a final outgoing message to these customers, and/or automatically mark these conversations done after a certain time. You can set up Kustomer workflows to automate either or both these processes.Who can access this feature?User typesAdmins can access the Workflows page.In this article:PrerequisitesCreate the callable workflowEnter the callable workflow JSON codeWorkflow variation for Gmail integrationWorkflow variation to send a chat messageWorkflow variation to send an SMSCreate the scheduler workflowPrerequisitesBefore following this guide, we recommend that you already be comfortable with the basics of using workflows: Workflows overviewYou should also be familiar with creating callable scheduled workflows, API keys, and adding workflow variables.Create the callable workflowGo to Settingsand select Platform > Workflows.Select Add Workflow > Custom Workflow.The New Workflow modal will appear. Fill out the title. You can leave the description field blank because the code snippet below will provide this for you. Toggle Callable Workflow on.Select Create to save the workflow.When the following window appears, select Cancel and close it. You'll add the workflow JSON code directly in the next step.Enter the callable workflow JSON codeUse the Workflow Editor to paste in the workflow code supplied below. This JSON code will take care of most of the workflow creation.Note: This workflow uses Kustomer system email (Postmark) to send the final email message. If you are using the Gmail integration, follow the steps in the next section Workflow variation for Gmail integration.In the Workflow Editor, use the Workflow Optionsto select Edit Workflow JSON.A modal appears where you can edit the code for this workflow directly. Select and delete all the current JSON code.Copy the following code block, and paste it into the JSON text field in your Workflow Editor. Then, select Update to dismiss the JSON editor and save the changes to the workflow.{ "description": "", "name": "send-final-message-and-mark-snoozed-conversation-done", "steps": [ { "transitions": [ { "target": "cA3N4BBWS", "condition": { "op": "true", "values": [ true ] } } ], "errorCases": [], "id": "QoZgm-XHR" }, { "transitions": [ { "target": "N9f5GJx9D", "condition": { "op": "eq", "values": [ "/#steps.mr6a_zgjB.status", "snoozed" ] }, "meta": { "name": "Still Snoozed" } } ], "errorCases": [], "id": "cA3N4BBWS" }, { "transitions": [ { "target": "ZApw9lh_E", "condition": { "op": "eq", "values": [ "/#steps.1.LastMessageIn", "/#steps.mr6a_zgjB.lastMessageIn.id" ] }, "meta": { "name": "Customer Last Message is the Same" } } ], "errorCases": [], "id": "N9f5GJx9D" }, { "transitions": [ { "target": "TNb5wj4v2", "condition": { "op": "and", "values": [ { "op": "gt", "values": [ "/#fn:parseInt,steps.ZApw9lh_E.match", "6" ] }, { "op": "neq", "values": [ "/#steps.mr6a_zgjB.snooze.status", "canceled" ] } ] }, "meta": { "name": "Conversation Still Snoozed Until Customer Replies" } } ], "errorCases": [], "id": "ZApw9lh_E", "action": "kustomer.regex-match.generic", "params": { "testString": "{{dateDiff \"months\" from=steps.mr6a_zgjB.snooze.statusAt to=steps.mr6a_zgjB.snooze.time}}", "regex": ".*" }, "meta": { "displayName": "Check Snooze Expiry" }, "appVersion": "kustomer-^1.9.2" }, { "transitions": [ { "target": "01-92dCVs", "condition": { "op": "true", "values": [ true ] } } ], "errorCases": [], "id": "TNb5wj4v2" }, { "transitions": [ { "target": "ENfQ9RGA4", "condition": { "op": "true", "values": [ true ] }, "meta": { "name": "Last Outbound Message is the Same" } } ], "errorCases": [], "id": "01-92dCVs" }, { "transitions": [ { "target": "oYPlEahZh", "condition": { "op": "exists", "values": [ "/#steps.ENfQ9RGA4.id", "" ] }, "meta": { "name": "Customer Found" } } ], "errorCases": [], "id": "ENfQ9RGA4", "action": "kustomer.customer.find", "params": { "identifier": "/#steps.mr6a_zgjB.customer" }, "meta": { "displayName": "Find Customer ID" }, "appVersion": "kustomer-^1.9.2" }, { "transitions": [ { "target": "_-MbiSxrg", "condition": { "op": "exists", "values": [ "/#steps.ENfQ9RGA4.emails.0.email", "" ] }, "meta": { "name": "Customer Has Email Address" } } ], "errorCases": [], "id": "oYPlEahZh" }, { "transitions": [ { "target": "xRzzrUzk_", "condition": { "op": "true", "values": [ true ] } } ], "errorCases": [], "id": "_-MbiSxrg" }, { "transitions": [ { "target": "pQrO1j0-E", "condition": { "op": "true", "values": [ true ] } } ], "errorCases": [], "id": "xRzzrUzk_", "action": "kustomer.app.postmark.message.send", "params": { "customer": "/#steps.ENfQ9RGA4.id", "conversation": "/#steps.mr6a_zgjB.id", "from": "your@emailaddress.here", "to": [ "/#steps.ENfQ9RGA4.emails.0.email" ] }, "appVersion": "postmark-^1.1.11", "meta": { "displayName": "Send Message" } }, { "transitions": [], "errorCases": [], "id": "pQrO1j0-E", "action": "kustomer.conversation.update", "params": { "id": "/#steps.mr6a_zgjB.id", "status": "done" }, "appVersion": "kustomer-^1.9.2", "meta": { "displayName": "Mark Conversation Done" } }, { "transitions": [ { "target": "QoZgm-XHR", "condition": { "op": "exists", "values": [ "/#steps.mr6a_zgjB.id", "" ] }, "meta": { "name": "Conversation Found" } } ], "errorCases": [], "id": "mr6a_zgjB", "action": "kustomer.conversation.find-by-id", "params": { "id": "/#steps.1.ConversationId" }, "meta": { "displayName": "Find Conversation ID" }, "appVersion": "kustomer-^1.9.2" } ], "trigger": { "transitions": [ { "target": "mr6a_zgjB", "condition": { "op": "true", "values": [ true ] } } ], "id": "1", "callable": true, "schema": { "properties": { "ConversationId": { "type": "string" }, "LastMessageIn": { "type": "string" } }, "required": [ "ConversationId", "LastMessageIn" ] }, "eventName": "kustomer.workflow.63105cabcee4d3e0d70fb2f0.call" } }The workflow will look like this:Update the Send Message step in the workflow to add your email address that the final message should send from, as well as the subject, body, and other fields you would like to modify.Workflow variation for Gmail integrationIf using our Gmail integration, change the Send Message step in the workflow to a Gmail > Send Message action instead, and update the required and any optional fields. Change the workflow step's Action App from Postmark to Gmail. Update the fields in the modified action step and save the workflow.Workflow variation to send a chat messageChange the workflow step's Action App from Postmark to Chat. Update the fields in the modified action step and save the workflow.Workflow variation to send an SMSTo use this variation, the text message (SMS) channel must be set up. Make sure your customers have a number in the Phone Numbers field in their profile to send the SMS to.Change the workflow step's Action App from Postmark to Kustomer. Then, select the Action Event: Rest API JSON.In the URI string field, add https://<your_company>.api.kustomerapp.com/v1/customers/{{steps.ENfQ9RGA4.id}}/drafts.Under Method, use POST. Add the following code in the Optional Fields > Data field. Replace the body value with your preferred text, and the from value with your company's SMS number.{ "body": "your text message", "to": "/#steps.ENfQ9RGA4.phones.0.phone", "from": "your SMS number", "sendAt": "{{{date 'day' count=0}}}", "conversation": "/#steps.mr6a_zgjB.id", "channel": "sms" }Create an API key in Settings under Security > API Keys with the roles org.permission.draft.create and org.user.draft.write. Copy and save the token for use in the next step.Go back to the Workflow Editor, and open the Workflow Optionsmenu to select Workflow Variables. Add the saved token from the API key you created earlier as a workflow variable. Name the workflow variable and add the token in the Value field. Save and exit the workflow editor.Select Step 12: Rest API JSON of the workflow, and select the key iconin the Headers field to access and copy the workflow variable saved. Add just one space after Bearer in the Headers field and paste the copied API token.Finally, set the JSON (boolean) field to true. The SMS action step is now complete and should look like below.Save all the changes and activate the workflow to send the SMS to customers and mark the conversation done.7. Save all the changes and activate the workflow to send the SMS to customers and mark the conversation done.Create the scheduler workflowIt's now time to create the scheduler workflow to trigger your completed callable workflow based on specific conditions.Go to Settings and select Platform > Workflows.Select Add Workflow > Custom Workflow.Fill out the Workflow Title. You can leave the Description field blank because the code snippet below will provide this for you.Select Create to save the workflow.In the Workflow Editor, use the Workflow Options menu to select Edit Workflow JSON.A modal appears where you can edit the code for this workflow directly. Select and delete all the current JSON code.Copy the following code block, and paste it into the JSON text field in your Workflow Editor. Then, select Update to dismiss the JSON editor and save the changes to the workflow.{ "description": "Schedules snoozed conversations to be updated and marked done if not updated after a specific time.", "name": "scheduler-for-snoozed-conversations", "steps": [ { "transitions": [ { "target": "O21wMsmRa", "condition": { "op": "and", "values": [ { "op": "gt", "values": [ "/#fn:parseInt,steps.rKSS-fxFU.match", "6" ] }, { "op": "neq", "values": [ "/#steps.1.snooze.status", "canceled" ] } ] }, "meta": { "name": "Conversation is Snoozed Until Customer Replies" } } ], "errorCases": [], "id": "rKSS-fxFU", "action": "kustomer.regex-match.generic", "params": { "testString": "{{dateDiff \"months\" from=steps.1.changes.attributes.snooze.after.statusAt to=steps.1.changes.attributes.snooze.after.time}}", "regex": ".*" }, "meta": { "displayName": "Check Snooze Expiry" }, "appVersion": "kustomer-^1.9.2" }, { "transitions": [ { "target": "w3fWxkb6c", "condition": { "op": "exists", "values": [ "/#steps.O21wMsmRa.id", "" ] }, "meta": { "name": "Found Conversation" } } ], "errorCases": [], "id": "O21wMsmRa", "action": "kustomer.conversation.find-by-id", "params": { "id": "/#steps.1.id" }, "meta": { "displayName": "Find Conversation ID" }, "appVersion": "kustomer-^1.9.2" }, { "transitions": [ { "target": "fCxXAcItt", "condition": { "op": "exists", "values": [ "/#steps.w3fWxkb6c.id", "" ] }, "meta": { "name": "Last Inbound Customer Message Found" } } ], "errorCases": [], "id": "w3fWxkb6c", "action": "kustomer.message.find-by-id", "params": { "id": "/#steps.O21wMsmRa.lastMessageIn.id" }, "meta": { "displayName": "Find Last Customer Message" }, "appVersion": "kustomer-^1.9.2" }, { "transitions": [], "errorCases": [], "id": "fCxXAcItt", "action": "kustomer.app.scheduler.schedule-workflow", "params": { "runAt": { "value": 86400, "type": "relative" } }, "appVersion": "scheduler-^1.0.1" } ], "trigger": { "transitions": [ { "target": "rKSS-fxFU", "condition": { "op": "and", "values": [ { "op": "eq", "values": [ "/#steps.1.changes.attributes.status.after", "snoozed" ] }, { "op": "eq", "values": [ "/#steps.1.changes.attributes.snooze.after.status", "scheduled" ] }, { "op": "neq", "values": [ "/#steps.1.changes.attributes.snooze.before.status", "scheduled" ] }, { "op": "neq", "values": [ "/#steps.1.changes.attributes.status.before", "snoozed" ] } ] }, "meta": { "name": "Conversation is Snoozed" } } ], "eventName": "kustomer.conversation.update", "id": "1", "appVersion": "kustomer-^1.9.2", "meta": { "displayName": "Conversation is Updated" } } }The workflow will look like this:Update Step 5: Schedule a Workflow by selecting the callable workflow you created earlier in the Workflow Title field.Under Type, select Set a Relative Time and select the time period within which you would like the callable workflow to run.Add the Required Fields, which are the parameters that your callable workflow needs before it can perform its action steps.Add any other desired customizations to the workflow before saving all changes.You are now ready to activate both Scheduler and Callable workflows to process your snoozed conversations awaiting customer reply.Set up an auto-response workflow for WhatsApp integrations
A common practice in the support industry is to send out an auto-reply after customers reach out to support to let them know that their message was received. This article explains how to set up an auto-response workflow when using the Twilio or MessageBird WhatsApp integrations.Who can access this feature?User typesAdmins and any users with permission to access workflows.In this articlePrerequisitesCreate the auto-response workflowCreate an API keyCreate a workflow variableCustomize the workflowPrerequisitesBefore setting up an auto-response workflow, you will need to have set up either the Twilio or the MessageBird app integrations in your organization. You will also need to be familiar with creating and editing workflows. Create the auto-response workflowGet started by creating the auto-response workflow.Go to Settings and select Platform > Workflows.Select Add Workflow, then Custom Workflow, and give it a name and description.Click on the three dots next to the Save button and select Edit Workflow JSON.Remove the existing JSON and replace it with either the Twilio or MessageBird workflow code below.Select Save.If your organization is hosted on our EU server, select the Send Auto Response workflow step and replace the URI field with https://api.prod2.kustomerapp.comTwilio{ "description": ".", "name": "whatsapp---auto-response", "steps": [ { "transitions": [ { "target": "eFYc7THaj", "condition": { "op": "neq", "values": [ "/#steps.1.auto", true ] }, "meta": { "name": "Not Auto Message" } } ], "errorCases": [], "id": "9k8uV34r_" }, { "transitions": [], "errorCases": [], "id": "eFYc7THaj", "action": "kustomer.rest-api.json", "params": { "method": "POST", "data": { "channel": "whatsapp", "app": "twilio_whatsapp", "conversation": "/#steps.1.conversation", "sendAt": "{{{date 'day' count=0}}}", "from": "/#steps.1.meta.to", "to": "/#steps.1.meta.from", "body": "ADD CUSTOM MESSAGE HERE" }, "headers": { "Authorization": "Bearer ADD_NEW_VARIBLE_HERE", "Content-Type": "application/json" }, "json": true, "uri": "https://api.kustomerapp.com/v1/customers/{{steps.1.customer}}/drafts" }, "appVersion": "kustomer-^1.8.5", "meta": { "displayName": "Send Auto Response" } }, { "transitions": [ { "target": "9k8uV34r_", "condition": { "op": "eq", "values": [ "/#steps.1.channel", "whatsapp" ] }, "meta": { "name": "WhatsApp?" } } ], "errorCases": [], "id": "kqymMuDO6" } ], "trigger": { "transitions": [ { "target": "kqymMuDO6", "condition": { "op": "eq", "values": [ "/#steps.1.directionType", "initial-in" ] }, "meta": { "name": "Initial Inbound?" } } ], "eventName": "kustomer.message.create", "id": "1", "appVersion": "kustomer-^1.8.5" } }MessageBird{ "description": ".", "name": "whatsapp---auto-response", "steps": [ { "transitions": [ { "target": "eFYc7THaj", "condition": { "op": "neq", "values": [ "/#steps.1.auto", true ] }, "meta": { "name": "Not Auto Message" } } ], "errorCases": [], "id": "9k8uV34r_" }, { "transitions": [], "errorCases": [], "id": "eFYc7THaj", "action": "kustomer.rest-api.json", "params": { "method": "POST", "data": { "channel": "whatsapp", "app": "messagebird", "conversation": "/#steps.1.conversation", "sendAt": "{{{date 'day' count=0}}}", "from": "/#steps.1.meta.to", "to": "/#steps.1.meta.from", "body": "ADD CUSTOM MESSAGE HERE" }, "headers": { "Authorization": "Bearer ADD_NEW_VARIBLE_HERE", "Content-Type": "application/json" }, "json": true, "uri": "https://api.kustomerapp.com/v1/customers/{{steps.1.customer}}/drafts" }, "appVersion": "kustomer-^1.8.5", "meta": { "displayName": "Send Auto Response" } }, { "transitions": [ { "target": "9k8uV34r_", "condition": { "op": "eq", "values": [ "/#steps.1.channel", "whatsapp" ] }, "meta": { "name": "WhatsApp?" } } ], "errorCases": [], "id": "kqymMuDO6" } ], "trigger": { "transitions": [ { "target": "kqymMuDO6", "condition": { "op": "eq", "values": [ "/#steps.1.directionType", "initial-in" ] }, "meta": { "name": "Initial Inbound?" } } ], "eventName": "kustomer.message.create", "id": "1", "appVersion": "kustomer-^1.8.5" } }Create an API keyNext, you will create an API key to send out auto-response messages.Go to Settings and select Security > API Keys.Select + Add API Key.Name the API key, give it org.permission.draft.create, org.user.draft.read, and org.user.draft.write permissions, then select Create.Copy the API key and save it locally so it can be easily referenced later.Create a workflow variableNow that an API key has been created, it can be added to the workflow with a workflow variable. Workflow variables allow you to store API keys securely and access them from within your auto-response workflow. Follow these steps to get started:Go to Settings and select Platform > Workflows to edit the workflow that was created earlier.Next to the Save button, open the menu and select (x) Workflow Variables.Select + Add and name the variable.Paste the API Key from before in the Value field and select Save.You will now be able to add the API Key to your workflow:Select the Send Auto Response workflow step and scroll down to the Headers field.Select the Key and select the variable that was just created.Remove the ADD_NEW_VARIABLE_HERE text and replace it with the copied workflow variable.Customize the workflowWith the workflow variable created and added, all that is left to do is edit the body of the auto-response message as desired.Select the Send Auto Response workflow step and scroll down to the Data field.Next to body, replace the ADD CUSTOM MESSAGE HERE text with whatever you'd like to include in the auto-response message.Select the toggle next to Save to turn on your workflow.Once you turn on the workflow, an auto-response message will be sent out to your customers whenever they send in a WhatsApp message.Workflow actions
Workflows are powerful tools that allow you to automate many actions in the Kustomer platform. This article outlines commonly used workflow actions and their required inputs and outputs.Who can access this feature?User typesAdmins can access the Workflows page.In this articleAI actionsAircall actionsChat actionsFacebook actionsGmail actionsKustomer actionsPostmark actionsScheduler actionsAI actionsNameDescriptionRequired FieldsOutputConversation AutomateConversationID: ID of the conversationIntent Identification PredictionUses a conversation classification model to give the inputed text a label based on the available values in the given model.Input: Text you would like to run the classification model on.Id: Name of the classification model you'd like to use.Label: The value that the model classified the text as.Confidence: Number between 0 and 1 indicating how confident the model is that the predicted label is accurate.Natural Language ProcessingDetects the sentiment of the inputed text, and can also be used to detect the language.Text: Text you would like to process.Customer: Customer IDDetectLang: (true/false) determines whether language detection occurs.SentimentType: (-1,0,1). -1 indicates a negative sentiment, 0 indicates a neutral sentiment, 1 indicates a positive sentiment.SentimentScore: Number between 0 and 1 indicating how confident the model is that the predicted sentiment is accurate.DominantLanguage: The detected language.DominantLanguageScore: Number between 0 and 1 indicating how confident the model is that the predicted language is accurate.Aircall actionsNameDescriptionRequired FieldsOutputContact CreateCreates an Aircall ContactPhoneNumber: Customer's phone numberFirstName: Customer's first nameLastName: Customer's last nameBody: Response body of the API call made to create the Aircall contact.Response: Entire response of API call made to create the Aircall contact.Chat actionsNameDescriptionRequired FieldsOutputMessage SendSends a chat messageCustomer: Customer IDBody: The message you'd like to send.Conversation: Conversation IDBody: The message inputed in the Message Send step.Conversation: The ID of the conversation.CreatedAt: Timestamp of when message was created.Id: The ID of the created Message.ModifiedAt: Timestamp of when the message was modified (In most cases this will be the same as the CreatedAt output value).SendAt: Timestamp of when the message should be sent. (In most cases this will be the same as the CreatedAt output value).Status: The status of the message.UpdatedAt: Timestamp of when the message was updated (In most cases this will be the same as the CreatedAt output value).Facebook actionsNameDescriptionRequired FieldsOutputPass Thread ControlAllows users to pass control of a Facebook message via the Message Platform Handover ProtocolTargetAppId: The ID for the app that is getting control.RecepientId: The PSID for the customer who sent the message. Can be found in facebookIDs attribute on the customer profile.PageId: The ID of your Facebook Business page. Can be found in facebookIDs attribute on the customer profile.Success: Boolean indicating whether or not the handoff was successful.Gmail actionsNameDescriptionRequired FieldsOutputMessage SendSends an email message using GmailCustomer: Customer IDConversation: Conversation IDFrom: From email AddressTo: To email addressId: Message Id of message that was sent.From: From email addressTo: Array of To email addressesCC: Array of CC'd email addressesBCC: Array of BCC'd email addressesSubject: Subject of email messageBody: Body of email messageStatus: Status of messageSendAt: Timestamp of when the message should be sent. (In most cases this will be the same as the CreatedAt output value).CreatedAt: Time Stamp of when message was created.ModifiedAt: Timestamp of when the message was modified (In most cases this will be the same as the CreatedAt output value).UpdatedAt: Timestamp of when the message was updated (In most cases this will be the same as the CreatedAt output value)Conversation: The ID of the conversation.Kustomer actionsNameDescriptionRequired FieldsOutputAssistant LaunchLaunches a conversational assistant on a chat conversationPublicId: ID of the assistant you'd like to launch.MessageId: ID of the initial inbound message on the conversation.ConversationId: ID of the conversationNo outputCommand Run By NameAllows for commands created in a custom app to run in a workflowName: Name of commandVaries based on commandCompany CreateCreates a companyName: Name of the company you would like to createThe newly created company object. For a full list of available attributes, visit your company klass settings page.Company: Lookup (By External ID)Finds a company with the given external IDExternalId: External ID of the company you'd like to find.The company associated with the given external ID. For a full list of available attributes, visit your company klass settings pageCompany: Lookup (By ID)Finds a company with the given company IDIdentifier: Company ID of the company you'd like to findThe company associated with the given company ID. For a full list of available attributes, visit your company klass settings page.Company: UpdateUpdates the company associated with the given company IDId: Company ID of the company you'd like to update.The company associated with the given company ID. For a full list of available attributes, visit your company Klass settings page.Conversation MergeMerges two conversations togetherSource: ID of the conversation you'd like to merge into another conversation. This conversation will be soft deleted.Target: ID of the conversation you'd like the source to merge into. This conversation will remain on the customer timeline.Id: ID of the merge requestStatus: Status of the merge request (success/failure)CreatedAt: Timestamp of when the merge took placeUpdatedAt: Timestamp of when the merge request was updated (in most cases this will match the CreatedAt timestamp).Customer: Customer ID of both conversationsConversation Move CustomerMoves a conversation to a different customer timelineId: ID of conversation you'd like to move.Customer: Customer ID of destination customer timeline.The conversation associated with the given conversation ID. For a full list of available attributes, visit your conversation Klass settings page.Conversation: Add TagsAdds tags to a conversationId: Conversation IDTags: List of tags you'd like to add. You can either use UI to select tags, or type in tag ID's separated by commas.The conversation associated with the given conversation ID. For a full list of available attributes, visit your conversation Klass settings page.Conversation: Assign TeamAssigns a team to a conversationId: Conversation IDTeam: ID of team you'd like to assign. You can use the UI to select a team from the drop down menu or enter in the ID of the team manually.The conversation associated with the given conversation ID. For a full list of available attributes, visit your conversation Klass settings page.Conversation: Assign UserAssigns a user to a conversationId: Conversation IDUser: ID of the user you'd like to assign. You can use the UI to select a user from the drop down menu or enter in the ID of the user manually.The conversation associated with the given conversation ID. For a full list of available attributes, visit your conversation Klass settings page.Conversation: CreateCreates a conversation on the given customer's timeline. Customer: Customer ID The newly created conversation. Conversation: Lookup (By External ID)Finds a conversation with the given external IDExternalId: External ID of the conversation you'd like to find.The conversation associated with the given external ID. For a full list of available attributes, visit your conversation Klass settings page.Conversation: Lookup (By ID)Finds a conversation with the given conversation IDId: Conversation IDThe conversation associated with the given conversation ID. For a full list of available attributes, visit your conversation Klass settings page.Conversation: Lookup BodyFinds the body of all messages in a given conversationConversation: Conversation IDDirection: (In/Out) Determines which message bodies are in the ouput. Selecting In will output inbound messages. Leaving it blank will output all messages.Body: A string of all included message bodies concatenated together, in reverse order from the time they were created. Conversation: Remove TagsRemoves selected tags from the given conversationId: Conversation IDTags: Tags to be removed from conversation. You can select them using the drop down menu, or enter their tag ID's manually in a comma separated list.The conversation associated with the given conversation ID. For a full list of available attributes, visit your conversation Klass settings page.Conversation: UpdateUpdates the given conversation with the data included in the Optional FieldsId: Conversation IDThe conversation associated with the given conversation ID. For a full list of available attributes, visit your conversation Klass settings page.Custom Object (KObject): CreateCreates a kObject that is not placed on any customer timelineKlassName: The name of the klass you'd like to create.Data: Data about the kObject in JSON format.Title: A name for object you'd like to create.The created kObject. For a full list of available attributes visit the Klass settings page for the chosen klass.Custom Object (KObject): Create with CustomerCreates a kObject on the given customer timelineKlassName: The name of the klass you'd like to create.Customer: Customer ID of the timeline you'd like to add the kObject to.Data: Data about the kObject in JSON format.Title: A name for the object you'd like to create.The created kObject. For a full list of available attributes visit the Klass settings page for the chosen klass.Custom Object (KObject): DeleteDeletes a kObjectId: ID of the KObject you'd like to delete.KlassName: The name of the klass you'd like to delete.No outputCustomer: Find by WhatsappFinds a customer with the given Whatsapp phone numberWhatsapp: Whatsapp phone numberThe customer associated with the given Whatsapp phone number. For a full list of available attributes, visit the customer Klass settings page. Customer: Append EmailAdds an email to the "Emails" attribute on the given customer profileId: Customer IDEmail: Email you'd like to add to the customer profileThe customer associated with the given Customer ID. For a full list of available attributes, visit the customer Klass settings page. Customer: Append PhoneAdds a phone number to the "Phones" attribute on t he given customer profileId: Customer IDPhone: Phone number you'd like to add to the customer profile.The customer associated with the given Customer ID. For a full list of available attributes, visit the customer Klass settings page.Customer: CreateCreates a customer NoneThe created customer. For a full list of available attributes, visit the customer Klass settings page. Customer: Lookup (By Email)Finds a customer with the given email addressEmail: Email addressThe customer associated with the given email address. For a full list of available attributes, visit the customer Klass settings page. Customer: Lookup (By External ID)Finds a customer with the given external IDExternalId: External IDThe customer associated with the given email address. For a full list of available attributes, visit the customer Klass settings page. Customer: Lookup (By Facebook Messenger User ID)Finds a customer with the given Facebook User ID and Page IDPageId: ID of the Facebook page a customer has contacted (Can be found in "facebookIds" attribute).UserId: The Facebook Messenger ID of the customer (Can be found in "facebookIds" attribute).The customer associated with the given Page ID and User ID. For a full list of available attributes, visit the customer Klass settings page. Customer: Lookup (By ID)Finds a customer with the given Customer IDIdentifier: Customer IDThe customer associated with the given Customer ID. For a full list of available attributes, visit the customer Klass settings page. Customer: Lookup (By Instagram Thread ID)Finds a customer with the given Instagram IDThreadId: Instagram ID (can be found in Instagram IDs customer attribute).The customer associated with the given Instagram ID. For a full list of available attributes, visit the customer Klass settings page. Customer: Lookup (By Phone)Finds a customer with the given phone numberPhone: Phone numberThe customer associated with the given phone number. For a full list of available attributes, visit the customer Klass settings page. Customer: Lookup Last MessageFind the most recent inbound message from the customerCustomer: Customer IDThe most recent inbound message from the given customer. For a full list of available attributes, visit the message Klass settings page.Customer: UpdateUpdates the given customer with the data included in the Optional FieldsId: Customer IDThe updated customer. For a full list of available attributes, visit the customer Klass settings page.Draft DeleteDeletes the draft associated with the given IDId: Draft IDNo outputDraft Note CreateCreates a note draft on the customer drafts endpointCustomer: Customer IDConversation: Conversation IDBody: Body of the note you'd like to create.Id: Draft IDType: Type of object (will say draft)Channel: Draft channel (will say Note)Status: Status of the draft (will say draft)CreatedAt: Timestamp of when the draft was createdUpdatedAt: Timestamp of when the draft was updated (In most cases this will be the same as the createdAt value).ModifiedAt: Timestamp of when the draft was modified (In most cases this will be the same as the createdAt value).Org: Org IDCustomer: Customer IDDraft PostponeChanges the SendAt attribute for a Draft allowing users to change when a draft is scheduled to be sent outId: Draft IdId: Draft IDType: Type of object (will say draft)Channel: Draft channel (will say Note)Status: Status of the draft (will say draft)CreatedAt: Timestamp of when the draft was created.UpdatedAt: Timestamp of when the draft was updated (In most cases this will be the same as the createdAt value).ModifiedAt: Timestamp of when the draft was modified (In most cases this will be the same as the createdAt value).Org: Org IDCustomer: Customer IDGeneric Regex MatchRuns a regular expression on a stringTestString: String you would like to run through regex.Regex: Regular expressionMatch: Text matched by the regular expression.Captures: Array of strings captured by the regular expression.Index: The position in the string the match can be found.Original: The string the regex was run on.Hook Get By IdFinds the webhook associated with the given IDId: Hook IdA GET API response with information about the given hook. Klass: CreateCreates a KlassName: Name of the Klass you'd like to createStatus: enabled/disabledId: Klass IDName: Name of KlassStatus: Status of the Klass (enabled/disabled).CreatedAt: Timestamp of when Klass was created.UpdatedAt: Timestamp of when Klass was last updated.Org: Org IDKlass: Lookup (By Klass name)Finds a Klass with the given nameName: Name of the Klass you'd like to find.Id: Klass IDName: Name of KlassStatus: Status of the Klass (enabled/disabled)CreatedAt: Timestamp of when Klass was created.UpdatedAt: Timestamp of when Klass was last updated.Org: Org IDKobject Find By External IdFinds a kObject with the given external IdExternalId: External IDKlassName: Name of the KlassThe kObject associated with the given External ID. For a full list of available attributes visit the Klass settings page for the chosen klass.Kobject Find First or LastFinds the first or last kObject for the given customer based on the Sort valueCustomer: Customer IDKlassName: Name of the KlassSort: Asc - Returns oldest kObjectDec - Returns newst kObjectThe first/last kObject on the given customer timeline. For a full list of available attributes visit the Klass settings page for the chosen klass.Merge CustomersMerges two customer profiles into one profileSource: ID of the customer you'd like to merge into another conversation. This profile will be soft deleted.Target: ID of the customer you'd like the source to merge into. This profile will remain active.Id: ID of customer merge requestStatus: Status of the request (In most cases this will say success).Message Find By ConversationFinds all messages on the given conversationConversation: Conversation IDA GET API response to the v1/conversationId/messages endpointMessage: CreateCreates a message in the UI. If no conversation is specified, a new conversation is created. (Does not send message to the customer)Customer: Customer IDApp: App used to create message (e.g. Postmark/Gmail/form)Size: Size of message, in most cases you can just input "0".Channel: Channel of the messageThe created message. For a full list of available attributes, visit the message Klass settings page.Message: Lookup (By External ID)Finds a message with the the given external IDIdentifier: External IDThe message associated with the given external ID. For a full list of available attributes, visit the message Klass settings page.Message: Lookup (By ID)Finds a message with the given message IDId: Message IDThe message associated with the given message ID. For a full list of available attributes visit the message Klass settings page.Message: UpdateUpdates the given message with the data included in the Optional FieldsId: Message IDThe message associated with the given message ID. For a full list of available attributes visit the message Klass settings page.Note Find By ConversationFinds all notes on the given conversationConversation: Conversation IDA GET API response to the v1/conversations/conversationId/notes endpointNote CreateCreates a note on the given conversationConversation: Conversation IDBody: Body of the note you'd like to createID: Note IDBody: Text included in the noteCreatedAt: Timestamp of when note was created.UpdatedAt: Timestamp of when note was updated (In most cases this will be the same as CreatedAt).Customer: Customer ID of customer associated with the given conversation.Conversation: Conversation ID of conversation the note was created on.UserMentions: Array of UserId's mentioned on the note.Note: Lookup (By External ID)Finds a note with the given external IDIdentifier: External IdID: Note IDBody: Text included in the noteCreatedAt: Timestamp of when note was createdUpdatedAt: Timestamp of when note was updated (In most cases this will be the same as CreatedAt)Customer: Customer ID of customer associated with the given conversationConversation: Conversation ID of conversation the note was created onUserMentions: Array of UserId's mentioned on the noteNote: Lookup (By ID)Finds a note with the given Note IDId: Note IDID: Note IDBody: Text included in the noteCreatedAt: Timestamp of when note was createdUpdatedAt: Timestamp of when note was updated (In most cases this will be the same as CreatedAt)Customer: Customer ID of customer associated with the given conversationConversation: Conversation ID of conversation the note was created onUserMentions: Array of UserId's mentioned on the noteNote: UpdateUpdates the given note. This can only be used on notes created by automations. This cannot be used on notes created by an agentId: Note IDID: Note IDBody: Text included in the noteCreatedAt: Timestamp of when note was createdUpdatedAt: Timestamp of when note was updated (In most cases this will be the same as CreatedAt)Customer: Customer ID of customer associated with the given conversationConversation: Conversation ID of conversation the note was created onUserMentions: Array of UserId's mentioned on the noteOrg CurrentOutputs the name of your orgNo inputsOrgName: The name of your orgPublish EventPublishes an event to the events endpoint of a conversationConversation: Conversation ID of the conversation you'd like to publish an event forNo outputsRest API: GenericCreates an API request using generic formatting. For more information, view ourCalling a REST API Within a Workflow help articleURI: URI for your API requestMethod: Method of your API requestAPI response (varies based on request)Rest API: JSON Creates an API request using JSON formatting. For more information, view ourCalling a REST API Within a Workflow help articleURI: URI for your API requestMethod: Method of your API requestAPI response (varies based on request)Snippet Find By KeyFinds a snippet with the given keyKey: Snippet key (e.g. sn.kustomer.chat.fifteen_minutes)Id: Snippet IDType: Type of object (will most likely be snippet)Name: Name of the snippetApp: App the snippet came from (will most likely be Kustomer)Key: Snippet keyLangs: Array of languages and their translationsCreatedAt: Timestamp of when snippet was createdOrg: Org IDTransform GenericAllows users to store variables locally to be referenced in later workflow stepsData you'd like to store in JSON format. E.g.:"variable1": "value1","variable2":"value2","variable3": "value3"An "Output" JSON object that contains the data added in the "input" field.User: Find By EmailFinds a user with the given emailEmail: Email addressId: User IDDisplayName: User's display nameName: User's nameUserType: Type of user (user/machine)Email: User emailEmailVerifiedAt: Timestamp of when the user verified their emailEmail Signature: User's email signatureCreatedAt: Timestamp of when the user was createdUpdatedAt: Timestamp of when the user was last updatedUser: Find By IDFinds a user with the given User IDId: User IDId: User IDDisplayName: User's display nameName: User's nameUserType: Type of user (user/machine)Email: User emailEmailVerifiedAt: Timestamp of when the user verified their emailEmail Signature: User's email signatureCreatedAt: Timestamp of when the user was createdUpdatedAt: Timestamp of when the user was last updatedWork Item Find By QueueFinds all work items in the given QueueQueue: Queue IDA GET API response to the v1/routing/queues/queueId/work-items endpointWork Item Find Next Work Item By QueueFinds the next work-item in the given queue that is going to be routed to an agent Queue: Queue IDId: Work-item IDType: Type of object (will most likely say work-item).ResourceType: Resource being worked on. Currently this is always conversation.Status: Current status that the work item is in. Will be one of ivr, queued, routed, assigned, wrap-up, completed.Paused: Whether or not this conversation is paused. Currently maps to snoozed state in conversation. Channel: Channel of the associated conversation. FirstEnterQueueAt: Timestamp of when the work-item entered the queue.QueuedCount: Number of times the work-item has entered a queued state.Priority: Priority of the associated queue.ItemSize: Weight of the item as indicated by the associated queue.CreatedAt: Timestamp of when work-item was created.UpdatedAt: Time stamp of when work-item was last updated.ModifiedAt: Timestamp of when the work-item was last modified.ResourceRev: Number of revisions of the associated resource (conversation).ResourceCreatedAt: Timestamp of when the associated resource (conversation) was created.Rev: Number of revisions made on the work-item.LastRevision: Object containing information about the last revision made on the work-item.Queue: Queue ID of the associated queueWork Session Find By Status TypeFinds all work-sessions associated with the given queue that have the given statusQueue: Queue IDStatus: Work-session status (available/unavailable/busy)A GET API response to the v1/routing/queues/queueId/work-sessions endpoint with a query on the given status.Postmark actionsNameDescriptionRequired FieldsOutputMessage SendSends an email message using PostmarkCustomer: Customer IDConversation: Conversation IDFrom: From email AddressTo: To email addressId: Message Id of message that was sentFrom: From email addressTo: Array of To email addressesCC: Array of CC'd email addressesBCC: Array of BCC'd email addressesSubject: Subject of email messageBody: Body of email messageStatus: Status of messageSendAt: Timestamp of when the message should be sent. (In most cases this will be the same as the Created At output value).CreatedAt: Time Stamp of when message was createdModifiedAt: Timestamp of when the message was modified (In most cases this will be the same as the Created At output value).UpdatedAt: Timestamp of when the message was updated (In most cases this will be the same as the Created At output value).Conversation: The ID of the conversationScheduler actionsNameDescriptionRequired FieldsOutputSchedule a WorkflowSchedules a callable workflowWorkflowTitle: Name of workflow you'd like to scheduleType: Determines whether the workflow is called on an absolute date or a relative dateNo outputWorkflow error: "Something unexpected happened"
When viewing your workflow error logs, you may encounter the error message Something unexpected happened, but this workflow is retrying. While it doesn't sound especially helpful, the good news is this is a generally benign error that can usually be ignored.Who can access this feature?User typesAdmins and users with workflow permissions.In this articleOverviewWhen to contact supportOverviewWhen reviewing your workflow logs, you may encounter an error that looks like this: This generic catch-all error indicates that a system error occurred somewhere on Kustomer's end. This typically appears after a service disruption, and in most cases, the workflow will automatically retry the process after the disruption is resolved.This is a relatively common error and it doesn't typically indicate a configuration problem. If you only see this error a few times every once in a while, you can safely ignore it.When to contact supportIf you observe a significant uptick in the frequency of these errors, or if you notice that the workflow is no longer functioning as expected, then Kustomer Support can help offer assistance with troubleshooting the workflow. When you contact Kustomer Support, be sure to include the following information and our team can assist you further:Workflow URLFrequency of errorsImpact of the disruption
Still need help? Contact Us