### Threema Gateway Setup for Userlike Integration Source: https://docs.userlike.com/features/channels/threema This section outlines the process of setting up the Threema Gateway to connect your Threema Work account with Userlike for internal communication. Specific steps or code examples for the gateway setup are not provided in this text. -------------------------------- ### Userlike Widget Integration Source: https://docs.userlike.com/setup/team This section details the integration of the Userlike widget, a key component for customer interaction on websites. Specific code examples for integration are not provided in this text, but the topic is highlighted as a core setup element. -------------------------------- ### Start Event with Initial Media Upload Source: https://docs.userlike.com/0645613a5ac0445d93357d4ae16083d3 This JavaScript example demonstrates the structure of a 'start' event payload when a contact initiates a chat with an initial media upload. It includes details about the chat session and the media shared. ```javascript { "info": { "approach_mode": "normal", "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821", "contact": {}, "context": {}, "conversation": {}, "widget": {} }, "packet": { "name": "start", "payload": { "initial_message": { "name": "media", "payload": { "link": "https://userlike.com/image.png", "mime_type": "image/png" } } } } } ``` -------------------------------- ### Telegram Bot Interaction Example Source: https://docs.userlike.com/features/channels/telegram Demonstrates how to initiate a test conversation with a support bot using a Telegram account. It highlights finding the bot via contact search and mentions bot profile setup. ```text Log in to the Message Center and start a test conversation with your own support bot. In the example below, we use our Telegram account “Userlike Support” to start a chat with “Fantastic Support Crew” (@fsc_bot). The bot already has a profile picture and description text. Communicate your bot’s name to your customers, they can find it via contact search in their Telegram app. Find more infos about bots and what they can do on Telegram’s bot page. ``` -------------------------------- ### Team Setup Source: https://docs.userlike.com/index This section explains how to set up and manage teams within the Userlike platform. It might include user roles, permissions, and team-based settings. ```Configuration // Placeholder for Team Setup Configuration // This might involve user management settings or API calls for team configuration. ``` -------------------------------- ### Start Event with Initial Media Upload Source: https://docs.userlike.com/developers/api/chatbot Illustrates the structure of a start event when a contact initiates a chat with an initial media upload. This event is used to send a welcome message to the contact. ```javascript { "info": { "approach_mode": "normal", "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821", "contact": {}, "context": {}, "conversation": {}, "widget": {} }, "packet": { "name": "start", "payload": { "initial_message": { "name": "media", "payload": { "link": "https://userlike.com/image.png", "mime_type": "image/png" } } } } } ``` -------------------------------- ### Fast Take Videos Source: https://docs.userlike.com/index This section likely links to or embeds short video tutorials provided by Userlike. These videos offer quick overviews of features. ```N/A // Placeholder for Fast Take Videos Link/Embed // This would typically be an iframe or a link to a video hosting platform. ``` -------------------------------- ### Userlike Chat Initialization Source: https://docs.userlike.com/setup/widget-integration/wix Instructions on how to start chatting with visitors by logging into the Userlike Message Center and setting your status to online. ```English Log in to the Userlike Message Center. Set yourself to online. Start chatting with your visitors. ``` -------------------------------- ### Threema Gateway Setup - Obtain Keys Source: https://docs.userlike.com/features/channels/threema This section details the steps to obtain essential credentials from Threema's Gateway for channel integration. It involves registering an account, requesting a Threema ID, and generating a key pair (Public Key and Private Key). ```text 1. Go to Threema’s Gateway page and register an account. 2. Log in to your Threema account, navigate to the **ID** tab and click on **Request Threema ID**. If you don’t have enough Threema credits, recharge and return to the page. 3. Above the request form, select the **End-to-End** tab. Follow Threema’s instructions to fill out all required fields, including their guide on generating a new key pair. In this step, you receive your **Custom ID, Public Key** and **Private Key** , which you’ll later need for the channel setup in Userlike. Leave the field **URL for incoming messages** empty for now. 4. Submit your custom ID request and wait for Threema’s approval. ``` -------------------------------- ### Adding Userlike App to Phone Desktop (iOS Example) Source: https://docs.userlike.com/features/mobile-app This describes the process of adding the Userlike mobile app to your phone's desktop, with a specific example for iOS. It mentions that the prompt may vary depending on the mobile browser and OS. ```text On your first visit, you'll be prompted to add the mobile app to your desktop. You can also access this option later through the settings of your mobile browser. 💡 The prompt might look slightly different depending on the mobile browser and OS you are using. ``` -------------------------------- ### Start Event with Initial Media Upload Source: https://docs.userlike.com/developers/api/chatbot-api Illustrates the structure of a start event when a contact initiates a chat with an initial media upload. This event is used to send a welcome message to the contact. ```javascript { "info": { "approach_mode": "normal", "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821", "contact": {}, "context": {}, "conversation": {}, "widget": {} }, "packet": { "name": "start", "payload": { "initial_message": { "name": "media", "payload": { "link": "https://userlike.com/image.png", "mime_type": "image/png" } } } } } ``` -------------------------------- ### Userlike Quick Links Examples Source: https://docs.userlike.com/setup/widget-setup/widget-editor Examples of quick links that can be added to the Messenger Board. These links support HTTP, Mailto, Tel, and SMS formats for directing users to web pages, email clients, phone calls, or SMS messages. ```http https://www.userlike.com ``` ```mailto mailto:lisa.abel@userlike.com ``` ```tel tel:+492211234567 ``` ```sms sms:+491761234567 ``` -------------------------------- ### Userlike API Input Node Example (GET Request) Source: https://docs.userlike.com/b2b7daf1be48439cbe62fdf5d89505e7 Illustrates how to use the API input node in Userlike to make a GET request to an external API. It shows how to specify the URL, method, handle the response by saving it to a variable, and define actions for both successful and failed requests. ```yaml 1: input: message: "Looking it up!" api: request: url: "https://mydomain/api/users/5" # The URL that should be called method: "get" # The method to use data: values: {} response: # Define a variable the reponse is saved to key: result when: failure: # Define what should happen when the request is not successful messages: - "Something went wrong" action: next: 0 success: messages: - "{{#result}}Your name is {{name}}, you work for {{#company}}{{name}}{{/company}} and your number is {{phone}}{{/result}}" action: next: 2 ``` -------------------------------- ### Python Server Example for Chatbot Sessions Source: https://docs.userlike.com/e00965e7866a43ee9ed2db921ac88804 This snippet demonstrates a Python server example for handling chatbot sessions. It outlines the basic structure for setting up a server to manage user interactions within a chatbot context. No specific dependencies are mentioned, but it implies the need for a Python environment. ```Python from flask import Flask, request, jsonify app = Flask(__name__) @app.route('/chatbot', methods=['POST']) def chatbot(): user_message = request.json.get('message') # Process user_message and generate a response response_message = f"You said: {user_message}" return jsonify({'response': response_message}) if __name__ == '__main__': app.run(debug=True) ``` -------------------------------- ### Python Server Example for Userlike Source: https://docs.userlike.com/fe234bd5ef744f999ce9463033f0ec3b This snippet provides an example of a Python server implementation for interacting with Userlike. It demonstrates how to set up a basic server to handle requests and potentially integrate with Userlike's functionalities. No specific dependencies are mentioned, but standard Python libraries are likely used. ```python from flask import Flask, request, jsonify app = Flask(__name__) @app.route('/userlike_webhook', methods=['POST']) def userlike_webhook(): data = request.get_json() print(f"Received data: {data}") # Process the incoming data from Userlike # For example, you might want to extract message content, user info, etc. response_message = { "reply": "Thank you for your message! We will get back to you shortly." } return jsonify(response_message) if __name__ == '__main__': app.run(port=5000, debug=True) ``` -------------------------------- ### Python Server Example for Userlike Source: https://docs.userlike.com/0645613a5ac0445d93357d4ae16083d3 This snippet provides an example of a Python server implementation for interacting with Userlike. It demonstrates how to set up a basic server to handle requests and potentially integrate with Userlike's functionalities. No specific dependencies are mentioned, but standard Python libraries are likely used. ```python from flask import Flask, request, jsonify app = Flask(__name__) @app.route('/userlike_webhook', methods=['POST']) def userlike_webhook(): data = request.get_json() print(f"Received data: {data}") # Process the incoming data from Userlike # For example, you might want to extract message content, user info, etc. response_message = { "reply": "Thank you for your message! We will get back to you shortly." } return jsonify(response_message) if __name__ == '__main__': app.run(port=5000, debug=True) ``` -------------------------------- ### Widget Integration Source: https://docs.userlike.com/index This section likely covers the process of integrating the Userlike widget into a website. It may involve JavaScript snippets or configuration steps. ```JavaScript // Placeholder for Widget Integration Code Snippet // This would typically involve a JavaScript snippet provided by Userlike // to embed the chat widget on a webpage. ``` -------------------------------- ### Userlike API Input Node Example (GET Request) Source: https://docs.userlike.com/developers/api/userlike-bot-language Illustrates how to use the API input node in Userlike to make a GET request to an external API. It shows how to specify the URL, method, handle the response by saving it to a variable, and define actions for both successful and failed requests. ```yaml 1: input: message: "Looking it up!" api: request: url: "https://mydomain/api/users/5" # The URL that should be called method: "get" # The method to use data: values: {} response: # Define a variable the reponse is saved to key: result when: failure: # Define what should happen when the request is not successful messages: - "Something went wrong" action: next: 0 success: messages: - "{{#result}}Your name is {{name}}, you work for {{#company}}{{name}}{{/company}} and your number is {{phone}}{{/result}}" action: next: 2 ``` -------------------------------- ### Threema Channel Setup - Final Callback URL Configuration Source: https://docs.userlike.com/features/channels/threema This describes the final step in setting up the Threema channel in Userlike, which involves copying the provided Callback URL from Userlike and pasting it into the Threema ID settings for incoming messages. ```text 1. Open the settings of your new Threema channel. 2. Copy the now provided **Callback URL**. 3. Log in to your Threema account, go to the **ID** tab and open your ID’s settings. 4. Paste the URL into the field **URL for incoming messages** , then save the changes. ``` -------------------------------- ### Start Event with Initial Text Message Source: https://docs.userlike.com/0645613a5ac0445d93357d4ae16083d3 This JSON example shows the payload structure for a 'start' event when a contact begins a chat with an initial text message. It includes the message content within the 'body' and 'initial_message' fields. ```json { "info": { "approach_mode": "normal", "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821", "contact": {}, "context": {}, "conversation": {}, "widget": {} }, "packet": { "name": "start", "payload": { "body": "Hello, I have a question about your product.", "initial_message": { "name": "message", "payload": { "body": "Hello, I have a question about your product." } } } } } ``` -------------------------------- ### Userlike Developer API Documentation Source: https://docs.userlike.com/index Provides access to Userlike's API for developers to integrate and extend its functionalities. This documentation details endpoints, authentication methods, and data structures for programmatic interaction with the Userlike platform. ```API GET /v1/conversations List all conversations GET /v1/conversations/{id} Get a specific conversation by ID POST /v1/messages Send a new message ``` -------------------------------- ### Facebook Button Template Example Source: https://docs.userlike.com/fe234bd5ef744f999ce9463033f0ec3b This example shows how to create a button template message for Facebook Messenger, featuring an image header, body, footer, and selectable buttons. ```json { "info": { "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821" }, "packet": { "name": "button_template", "payload": { "fallback": "Please enter a number", "footer": "We have some delightful snacks", "header_text": "What do you want?", "header_url": "https://url-to-your-image.com/snacks.jpg", "options": [ { "id": "cookies", "label": "Cookies" }, { "id": "cake", "label": "Cake" }, { "id": "chocolate", "label": "Chocolate" } ] } } } ``` -------------------------------- ### WhatsApp Button Template Example Source: https://docs.userlike.com/fe234bd5ef744f999ce9463033f0ec3b This example demonstrates how to create a button template message for WhatsApp. It includes a header text, body, footer, and up to three buttons with labels and IDs. ```json { "info": { "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821" }, "packet": { "name": "button_template", "payload": { "body": "What do you want?", "fallback": "Please enter a number", "footer": "Choose wisely", "header_text": "Snacks", "header_type": "text", "options": [ { "id": "cookies", "label": "Cookies" }, { "id": "cake", "label": "Cake" }, { "id": "chocolate", "label": "Chocolate" } ] } } } ``` -------------------------------- ### Userlike YAML Media Node Examples Source: https://docs.userlike.com/920a48dde9f949128b1eebe79c67644c Illustrates how to implement media nodes in Userlike chatbots using YAML. Shows examples for displaying single images and multiple media items (images and videos) with their respective links and MIME types. ```YAML # Media node with a single item 1: # Conversation step messages: - "A picture" media: # Node type - option: link: "https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg" mime_type: "image/jpeg" action: # Next action next: 2 # Media node with a multiple items 1: # Conversation step media: # Node type - option: link: "https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg" mime_type: "image/jpeg" - option: link: "https://d3upe020n1uosc.cloudfront.net/static/web/videos/screencast-fullhd.mp4" mime_type: video/mp4 action: # Next action next: 2 ``` -------------------------------- ### Userlike 'message' event example Source: https://docs.userlike.com/fe234bd5ef744f999ce9463033f0ec3b This JSON example illustrates a 'message' webhook event from Userlike, signifying a new message received from a contact. It includes the message body in the payload. ```json { "info": { "approach_mode": "proactive", "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821", "contact": {}, "context": {}, "conversation": {}, "widget": {} }, "packet": { "name": "message", "payload": { "body": "Hello, I have a question about your product." } } } ``` -------------------------------- ### Handle Chat Start Event (JavaScript) Source: https://docs.userlike.com/fe234bd5ef744f999ce9463033f0ec3b This snippet demonstrates the JavaScript object received when a contact initiates a chat with the bot. It includes information about the chat session and the 'start' packet. ```javascript // When the contact clicks on our chat button, you receive this event: { "info": { "approach_mode": "normal", "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821", "contact": {}, "context": {}, "conversation": {}, "widget": {} }, "packet": { "name": "start", "payload": {} } } ``` -------------------------------- ### Create Media Nodes in YAML Source: https://docs.userlike.com/16a0443648c34b05b86d4f57bd1af940 Demonstrates how to create media nodes for displaying images and videos. Supports single or multiple media items, each with a link and MIME type. ```yaml # Media node with a single item 1: # Conversation step messages: - "A picture" media: # Node type - option: link: "https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg" mime_type: "image/jpeg" action: # Next action next: 2 ``` ```yaml # Media node with a multiple items 1: # Conversation step media: # Node type - option: link: "https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg" mime_type: "image/jpeg" - option: link: "https://d3upe020n1uosc.cloudfront.net/static/web/videos/screencast-fullhd.mp4" mime_type: video/mp4 action: # Next action next: 2 ``` -------------------------------- ### Userlike Regex Input Node Examples Source: https://docs.userlike.com/b2b7daf1be48439cbe62fdf5d89505e7 Provides examples for the regex input node, showing how to handle optional and required inputs with custom validation formats and responses for valid, invalid, or skipped inputs. ```yaml # Input optional 1: input: message: "What's your tracking ID?" type: regex format: "[0-9]{6}-[0-9]{2}" key: tracking_id optional: true when: not-valid: messages: - "The format is not valid, please use 123456-12" - "Let's try again..." action: next: 1 valid: messages: - "Thank you." action: next: 2 skip: action: next: 2 # Phone number required 2: input: message: "What's your phone number?" type: regex format: "\\+49[0-9]{3,5}[0-9]{7,10}" key: phone_number optional: false when: not-valid: messages: - "The format is not valid, please use +4917212345678" - "Let's try again." action: next: 2 valid: action: next: 3 ``` -------------------------------- ### Userlike Chatbot API cURL Example Source: https://docs.userlike.com/e00965e7866a43ee9ed2db921ac88804 This cURL example demonstrates how a chatbot can send the result of an asynchronous job to the Userlike API URL after a customer's request has been processed. ```bash curl -X POST \ https://api.userlike.com/chatbot/v1/YOUR_BOT_ID/conversation/YOUR_CONVERSATION_ID/message \ -H "Content-Type: application/json" \ -H "SECURITY-TOKEN: YOUR_SECURITY_TOKEN" \ -d '{ "message": "Your order #ORDER_ID has been shipped. Estimated delivery is tomorrow.", "type": "text" }' ``` -------------------------------- ### Userlike YAML Button Node Examples Source: https://docs.userlike.com/920a48dde9f949128b1eebe79c67644c Provides examples of creating button nodes in Userlike chatbots using YAML. Demonstrates single and multiple buttons with labels and links, including examples of mailto, tel, and external website links, with support for variable expansion. ```YAML # Button node with a single button 1: # Conversation step buttons: # Node type - label: "Send email to {{name}}" link: "mailto:{{email}}@userlike.com" action: # Next action next: 2 # Button node with multiple buttons 1: # Conversation step messages: - "We’re happy to help you!" buttons: # Node type - label: "Email" link: "mailto:support@userlike.com" - label: "Website" link: "https://www.userlike.com" - label: "Phone" link: "tel:+4922163060570" - label: "Whatsapp" link: "https://api.whatsapp.com/send?phone=4915735998856" action: # Next action next: 2 ``` -------------------------------- ### Handle Chat Start Event (JavaScript) Source: https://docs.userlike.com/0645613a5ac0445d93357d4ae16083d3 This snippet demonstrates the JavaScript object received when a contact initiates a chat with the bot. It includes information about the chat session and the 'start' packet. ```javascript // When the contact clicks on our chat button, you receive this event: { "info": { "approach_mode": "normal", "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821", "contact": {}, "context": {}, "conversation": {}, "widget": {} }, "packet": { "name": "start", "payload": {} } } ``` -------------------------------- ### YAML Media Node Examples Source: https://docs.userlike.com/developers/api/userlike-bot-language Demonstrates YAML configurations for media nodes in Userlike conversations, used for displaying images and videos. Examples include nodes with a single media item and nodes with multiple media items, specifying the link and MIME type for each. ```yaml # Media node with a single item 1: # Conversation step messages: - "A picture" media: # Node type - option: link: "https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg" mime_type: "image/jpeg" action: # Next action next: 2 ``` ```yaml # Media node with a multiple items 1: # Conversation step media: # Node type - option: link: "https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg" mime_type: "image/jpeg" - option: link: "https://d3upe020n1uosc.cloudfront.net/static/web/videos/screencast-fullhd.mp4" mime_type: video/mp4 action: # Next action next: 2 ``` -------------------------------- ### Userlike API: Widget Object Example Source: https://docs.userlike.com/fe234bd5ef744f999ce9463033f0ec3b Shows an example of the 'widget' object, which holds configuration details for the Userlike widget, such as allowed calls, chat inactivity timeouts, and default messages. ```json { "allowed_calls": "video", "audio_message_received": true, "audio_message_sent": false, "audio_only_inactive": true, "button_profile_desktop": "full", "button_profile_mobile": "medium", "chat_inactive_timeout": 180, "contact_email_body": "Thanks for the conversation. This is your transcript.", "contact_email_body_reengage": "You\u2019ve received new messages while you were offline.", "contact_email_body_unread": "You\u2019ve received new messages while you were offline.", "contact_email_footer": "Kind regards,", "contact_email_salutation": "Hello {{client_name}}", "contact_email_subject": "Your conversation transcript", "contact_email_subject_reengage": "New message from {{name}}", "contact_email_subject_unread": "New message from {{name}}", "conversation_update_by_email": true, "conversation_update_by_sms": false, "cookie_expire": 365, "customer": 107, "data_privacy": false, "data_privacy_link": "", "data_privacy_name": "Privacy Policy", "default_message": "Hello, you're talking to {{name}}. How can I help?", "default_textarea": "Your message", "default_topic": { "id": 173, "test": "Support" }, "disclaimer_headline": "Privacy notice", "disclaimer_show": false, "disclaimer_subheadline": "Please accept to start your conversation." } ``` -------------------------------- ### Userlike YAML Message Node Examples Source: https://docs.userlike.com/920a48dde9f949128b1eebe79c67644c Demonstrates creating message nodes in Userlike chatbots using YAML. Includes examples for single messages, multiple messages, messages with links, and messages with variable expansion for personalized greetings. ```YAML # Message node with a single message 1: # Conversation step messages: # Node type - "Single message" # A sequence with a single message action: # Next action next: 2 # Message node with a multiple messages 1: # Conversation step messages: # Node type - "First message" # Each message in this sequence will be sent to the contact separately - "Second message" action: # Next action next: 2 # Message node with a multiple messages and links 1: # Conversation step messages: # Node type - "Visit https://www.userlike.com !" # Each message in this sequence will be sent to the contact separately - "https://www.example.com" action: # Next action next: 2 # Assuming the contact provided his name and email, you can use this information in a message by expanding the name and email variables 1: messages: - "Welcome to the chat, {{name}}!" - "Your email address is {{email}}" action: next: 2 ``` -------------------------------- ### Send Button Template Message (WhatsApp Example) Source: https://docs.userlike.com/developers/api/chatbot Sends a button template message, suitable for platforms like WhatsApp and Facebook Messenger. This example demonstrates a text header with options and a footer. ```json { "info": { "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821" }, "packet": { "name": "button_template", "payload": { "body": "What do you want?", "fallback": "Please enter a number", "footer": "Choose wisely", "header_text": "Snacks", "header_type": "text", "options": [ { "id": "cookies", "label": "Cookies" }, { "id": "cake", "label": "Cake" } ] } } } ``` -------------------------------- ### Conversation Context Example Source: https://docs.userlike.com/developers/api/chatbot Provides an example of the conversation context object, detailing information such as contact channel, creation and update timestamps, customer and organization IDs, language settings, and conversation status. ```json { "addon_urls": {}, "contact_channel": { "state": "valid", "type": "web" }, "created_at": "2020-11-02T11:56:54.277Z", "custom": null, "customer_id": 19036, "data_privacy": false, "ended_at": null, "expiry_state": 0, "feedback_message": null, "id": 25569, "language_name": "English (US)", "last_message_sent_at": null, "locale": "en_US", "marked_read_contact": true, "marked_read_operator": true, "operator_assigned_to": 22645, "organization_id": 22769, "page_impressions": null, "post_survey_option": null, "pre_survey_option": null, "proactive": false, "rate": null, "slot_reserved": true, "status": "new", "status_description": "New", "subject": null, "topics": [], "um_widget_goals": [], "updated_at": "2020-11-02T11:56:54.566Z", "url": "https://devel.userlike.local/umc#/conversation/25569", "visits": null } ``` -------------------------------- ### Send Button Template Message (WhatsApp Example) Source: https://docs.userlike.com/developers/api/chatbot-api Sends a button template message, suitable for platforms like WhatsApp and Facebook Messenger. This example demonstrates a text header with options and a footer. ```json { "info": { "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821" }, "packet": { "name": "button_template", "payload": { "body": "What do you want?", "fallback": "Please enter a number", "footer": "Choose wisely", "header_text": "Snacks", "header_type": "text", "options": [ { "id": "cookies", "label": "Cookies" }, { "id": "cake", "label": "Cake" } ] } } } ``` -------------------------------- ### Userlike Bot Configuration Example (YAML) Source: https://docs.userlike.com/16a0443648c34b05b86d4f57bd1af940 This snippet demonstrates a basic configuration for a Userlike bot's conversation flow using YAML. It outlines steps for user interaction, including message display, input handling, and navigation between conversation nodes. ```YAML 8: input: message: "Did this answer your question?" type: bubbles key: select fallback: "Please enter a number" any_message: action: next: 8 options: - option: "Yes" action: next: 9 - option: "No" action: next: 6 9: messages: - "Glad I could help!" - "Have a great day!" action: end: true ``` -------------------------------- ### Conversation Resource Count Examples Source: https://docs.userlike.com/162ad2f74ea846d19104b55dc72082b5 Demonstrates how different HTTP methods (GET, PATCH, DELETE) on conversation endpoints contribute to the same resource count for an organization. Includes examples for list and single conversation endpoints. ```bash # GET list endpoint adds to organization's conversation resource count curl --header "Authorization: ee6bd15d-c8f7-3c55-b7dd-82e5970418cf" \ "https://api.userlike.com/api/um/v3/conversations/" ``` ```bash # GET single endpoint adds to organization's conversation resource count curl --header "Authorization: ee6bd15d-c8f7-3c55-b7dd-82e5970418cf" \ "https://api.userlike.com/api/um/v3/conversations/{id}/" ``` ```bash # PATCH single endpoint adds to organization's conversation resource count curl --request PATCH \ --header "Authorization: ee6bd15d-c8f7-3c55-b7dd-82e5970418cf" \ --header "Content-Type: application/json" \ "https://api.userlike.com/api/um/v3/conversations/{id}/" \ --data '{"topics":["Support"]}' ``` -------------------------------- ### Telegram Bot Setup Commands Source: https://docs.userlike.com/features/channels/telegram These commands are used with the Telegram BotFather to configure your bot's profile information, including its description, about text, and profile picture, making it recognizable to your contacts. ```bash /setdescription /setabouttext /setuserpic ``` -------------------------------- ### Userlike API Node Actions Overview Source: https://docs.userlike.com/b2b7daf1be48439cbe62fdf5d89505e7 Explains the different actions available in the Userlike API node, beyond just proceeding to the next step. These include setting/clearing contact data, navigation, and forwarding to human operators. ```UBL ### **Commands & actions** We‘ve already seen in the previous examples that every step ends with an action. Until now, we‘ve only used actions to proceed to the next step in the conversation flow by using the `next` command. UBL offers several more commands you can use in order to set or clear data of your contact, to navigate, or to forward the contact to human operators. ``` -------------------------------- ### Userlike API: Contact Object Example Source: https://docs.userlike.com/fe234bd5ef744f999ce9463033f0ec3b Provides an example of the 'contact' object, which contains information about the contact interacting with the chatbot. This includes details like city, company, email, and social media URLs. ```json { "city": "Cologne", "company": "Userlike", "contact_by_email": true, "contact_by_phone": false, "contact_by_userlike_channels": true, "contact_by_userlike_messenger": true, "contact_uuids": [ "f5dcf5a5-7756-4556-bd57-20d2788ab3cc" ], "conversation_count": 2, "country": "US", "created_at": "2020-09-11T10:29:09.082Z", "email": "test+contact@userlike.com", "email_verified": false, "external_customer_id": null, "first_message_sent_at": "2020-09-11T10:29:09.210Z", "gender": "f", "id": 117, "is_blocked": false, "is_mobile_number_verified": false, "last_message_sent_at": "2020-09-11T10:29:09.210Z", "loc_lat": 50.933133, "loc_lon": 6.9461883, "locale": "en_US", "mobile_number": "+4915000000001", "name": "test contact", "needs_register": false, "phone_number": "+4915000000000", "position": "CEO", "salutation": "ms", "street": "Probsteigasse 44", "url_facebook": "https://www.facebook.com/test.contact", "url_linkedin": "https://www.linkedin.com/in/testcontact", "url_profile_picture": "https://userlike.com/profile_picture.png", "url_twitter": "https://twitter.com/testcontact", "verified": false } ``` -------------------------------- ### Get Conversations List (Offset Pagination) Source: https://docs.userlike.com/107c49157be242ca9e3df3ac8505537b Retrieves a list of conversations using offset pagination. This example shows a GET request to the conversations list endpoint without any parameters, returning the first page of results. ```bash # GET without parameters to conversations list endpoint curl --header "Authorization: ee6bd15d-c8f7-3c55-b7dd-82e5970418cf" \ "https://api.userlike.com/api/um/v3/conversations/" ``` -------------------------------- ### Userlike 'click' event example Source: https://docs.userlike.com/fe234bd5ef744f999ce9463033f0ec3b This JSON example shows a 'click' webhook event from Userlike, triggered when a contact interacts with interactive elements like buttons or carousels. It includes the clicked option's value. ```json { "info": { "approach_mode": "proactive", "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821", "contact": {}, "context": {}, "conversation": {}, "widget": {} }, "packet": { "name": "click", "payload": { "value": { "id": 2 ``` -------------------------------- ### Simple-Action Workflow: Product Page Navigation Source: https://docs.userlike.com/features/ai-automation-hub/workflows/examples This workflow recognizes customer intent to find a specific product and redirects them to the product page. It involves storing product information in a database and using identifiers within curly brackets {{ }} to display dynamic content in the chat. ```Userlike Workflow Recognize intention: 'Which product are you interested in?' Store output in identifier: {{product_interest}} Offer redirection: 'You can find more information about {{product_interest}} here: [Link to product page]' ``` -------------------------------- ### Make POST HTTP Request with Userlike API Source: https://docs.userlike.com/920a48dde9f949128b1eebe79c67644c Shows how to configure and execute a POST HTTP request using the Userlike API. This includes setting the request URL, method, headers (like User-Agent and Authorization), and the request body with structured data and session context. ```YAML 1: input: message: "Sending data" api: request: url: "https://your-url/endpoint" method: "post" headers: # Define the headers of the request as key-value pairs User-Agent: 'Userlike Bot' Authorization: 'xxx-xxx-xxx-xxx' data: # Data is the request body of the POST request values: # Provide key-value pairs of data you want to send in the request body job: "Engineer" visits: 25 context: # Include data from the session context by providing the key you've saved it to - tracking_id response: key: result when: failure: messages: - "Something went wrong" action: next: 0 success: messages: - "Thank you for your submission." action: next: 2 ``` -------------------------------- ### Userlike 'start' event with initial media upload Source: https://docs.userlike.com/fe234bd5ef744f999ce9463033f0ec3b This snippet shows the 'start' webhook event structure when a contact begins a chat by uploading a file. It details the payload, including the media link and MIME type. ```javascript { "info": { "approach_mode": "normal", "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821", "contact": {}, "context": {}, "conversation": {}, "widget": {} }, "packet": { "name": "start", "payload": { "initial_message": { "name": "media", "payload": { "link": "https://userlike.com/image.png", "mime_type": "image/png" } } } } } ``` -------------------------------- ### Start Event with Initial Text Message Source: https://docs.userlike.com/developers/api/chatbot Shows the structure of a start event when a contact initiates a chat with an initial text message. This is used to send a welcome message and includes the contact's initial message. ```json { "info": { "approach_mode": "normal", "cid": "chatbot::258:a56785fb6fb84edd890905913b0c0821", "contact": {}, "context": {}, "conversation": {}, "widget": {} }, "packet": { "name": "start", "payload": { "body": "Hello, I have a question about your product.", "initial_message": { "name": "message", "payload": { "body": "Hello, I have a question about your product." } } } } } ``` -------------------------------- ### Userlike API Node Actions Overview Source: https://docs.userlike.com/developers/api/userlike-bot-language Explains the different actions available in the Userlike API node, beyond just proceeding to the next step. These include setting/clearing contact data, navigation, and forwarding to human operators. ```UBL ### **Commands & actions** We‘ve already seen in the previous examples that every step ends with an action. Until now, we‘ve only used actions to proceed to the next step in the conversation flow by using the `next` command. UBL offers several more commands you can use in order to set or clear data of your contact, to navigate, or to forward the contact to human operators. ```