Skip to content
Browse

GUIDE

Your Logic

Last updated

Configuration and technical reference for Your Logic, Salted's name for the automation interface that receives conversation events and returns actions.

In Salted configuration and technical documentation, the automation interface connected to a customer conversation is called Your Logic. Salted sends ordered conversation events to the configured Your Logic implementation. Your Logic returns the actions Salted should perform.

The underlying automation logic can combine code, AI, business rules, workflow tools, and internal systems. Your Logic is the exact configuration and technical name for that interface, not a separate Salted product, platform, or framework.

Typical use cases for Your Logic:

  • Operate a customer-facing AI agent grounded in your knowledge and policies
  • Query and update internal systems, perform permitted actions, and report the result to the customer
  • Ask a human agent for guidance or approval before a consequential action
  • Route conversations and set priority, reason, outcome, customer attributes, or external case references
  • Provide human agents with suggested replies, information panels, notes, and contextual actions
  • Invite an external expert or partner into a selected conversation
  • Keep context while a human is involved and continue after the human contribution ends

You can use only one endpoint for Your Logic. In case you have multiple services that need to receive events from Your Logic you have to implement this distribution mechanism into Your Logic endpoint.

Only communication that happens via Salted CX Live Conversations integrates with Your Logic. You cannot connect Your Logic to conversations that we ingest from 3rd party systems into analytics.

High-Level Architecture

Your Logic plugs into the Conversation Management that notifies you about important events. Your Logic tells us what we should do next.

Your Logic high-level architectureYour Logic high-level architecture. Customers communicate through channel connectors. Salted CX conversation management exchanges unified communication with connectors, context and actions with Your Logic, and information with Live Conversations and Analytics. Your Logic connects to your internal systems and external services. Customers exchanges data with Channel connector. Customers exchanges data with Channel connector. Channel connector exchanges data with Conversation management. Channel connector exchanges data with Conversation management. Conversation management sends Events + context to Your Logic. Your Logic sends Actions to take to Conversation management. Your Logic exchanges data with Your internal systems. Your Logic exchanges data with External services. Conversation management exchanges data with Live Conversations. Conversation management exchanges data with Analytics. Connectors translate channel-specific communication into unified communication.CustomersCustomersChannelconnectorChannelconnectorConversationmanagementYour LogicYour internalsystemsExternalservicesLiveConversationsAnalyticsEvents +contextActions to takeChannel-specificcommunicationUnified communication
Read diagram as text

Customers communicate through channel connectors. Salted CX conversation management exchanges unified communication with connectors, context and actions with Your Logic, and information with Live Conversations and Analytics. Your Logic connects to your internal systems and external services.

  • Customers exchanges data with Channel connector.
  • Customers exchanges data with Channel connector.
  • Channel connector exchanges data with Conversation management.
  • Channel connector exchanges data with Conversation management.
  • Conversation management sends events + context to Your Logic.
  • Your Logic sends actions to take to Conversation management.
  • Your Logic exchanges data with Your internal systems.
  • Your Logic exchanges data with External services.
  • Conversation management exchanges data with Live Conversations.
  • Conversation management exchanges data with Analytics.

Channel connectors translate channel-specific communication into unified communication.

Separation of Concerns

What Salted CX does for you:

  • Connection to multiple channels such as web chat, WhatsApp, etc.
  • Unification of multiple channels to a unified format
  • Queue events in individual conversations so Your Logic can tackle them one by one
  • Preprocessing of messages — language detection, translation, etc.
  • Keeping conversation context data
  • Fallback in case Your Logic is unresponsive
  • Escalation to agents in Live Conversations

What you SHOULD do:

  • Integrate with your systems in Your Logic to obtain data and perform actions
  • Use Salted CX protocol (requests, responses) process received events from Salted CX
  • Scale Your Logic to handle the expected volume of conversations and respond within set timeouts

Your Logic has to be able to handle multiple parallel conversations from the same customer. While we ensure that we will sequence all requests for individual conversations, we do not sequence requests for customers. Customers can be involved in multiple conversations by simply emailing you and chatting at the same time.

This may impact you when modifying customer-related data in your system. One conversation can update customer information that may influence other conversations.

Prerequisites

Contact Salted CX to get Your Logic ready for your account:

  • Provide Salted CX with your Salted CX account domain and endpoint that should receive requests from Your Logic
  • Get Shared Secret from Salted CX that enables you to verify requests sent to your endpoint are authentic and authenticate your responses

Your Logic Tech Stack

Salted CX does not force you into adopting any specific tools, technology, infrastructure nor programming language for Your Logic implementation. We define and enforce the communication protocol between Salted CX and Your Logic. You can choose your preferred technological stack to implement Your Logic to take advantage of the people and skills you already have in your company.

You have many solutions to pick from, including but not limited to:

  • NodeJS server — provides ultimate flexibility as you can code in any behavior that you want. You can use AWS Lambda or Kubernetes to enable Your Logic to scale.
  • n8n — universal workflow editor with large community and large set of built-in integrations.

Authorization

Salted CX uses shared secret authorization to ensure both sides can verify that the HTTP communication is sent by their counterparty.

IP Addresses

Salted CX sends all Your Logic events from the following IP addresses:

52.19.189.176/32
52.208.82.70/32
99.81.60.250/32

Authorization of Your Logic Requests

You can check that requests are sent from Salted CX by checking the Authorization header in every HTTP request for the shared secret. You SHOULD not process requests that lack a header or have an unexpected value.

Authorization: Bearer <shared secret>

Authorization of Your Logic Responses

Your Logic implementation sends the request to https://api.eu.salted.cx/api/v1/live/your-logic endpoint that contains account ID and conversation PID.

https://api.eu.salted.cx/api/v1/live/your-logic/accounts/{accountId}/conversations/{conversationPid}

Each call to this endpoint MUST contain shared secret in the Authorization header. Each response that does not contain the header or contains unexpected value is ignored and no action is taken.

Authorization: Bearer <shared secret>

Reach to Salted CX to retrieve the token for your account.

Requests from Salted

Whenever an action happens in a conversation, Salted CX notifies you on your webhook. Salted CX sequences requests for individual conversations so you have time to respond. Each event, such as a sent message, goes through multiple stages when processed by Salted CX before it is shown to the other participants. Your Logic receives requests from one conversation in sequential order. Your Logic waits for Your Logic to respond to a request before sending another.

A participant sends a message to Salted CX. Preprocessing reliably stores the message, detects its language, translates it, and redacts content. Salted sends a request to Your Logic and receives a response. Postprocessing performs the response actions before showing the message to other participants.
A participant sends a message to Salted CX. Preprocessing reliably stores the message, detects its language, translates it, and redacts content. Salted sends a request to Your Logic and receives a response. Postprocessing performs the response actions before showing the message to other participants.
Requests from Salted
Read diagram as text

A participant sends a message to Salted CX. Preprocessing reliably stores the message, detects its language, translates it, and redacts content. Salted sends a request to Your Logic and receives a response. Postprocessing performs the response actions before showing the message to other participants.

  1. Participant to Salted CXSend
  2. Salted CXPreprocessing
    Reliably store message
    Detect Language
    Translate Message
    Redact Content
  3. Salted CXReady for Your Logic
  4. Salted CX to Your LogicRequest
  5. Your Logic to Salted CXResponse
  6. Salted CXPostprocessing
    Performing actions from response
  7. Salted CXReady for other participants
  8. Salted CX to Other ParticipantsShow

Actions returned by Your Logic do not cause subsequent calls to Your Logic. They are directly shown to all participants. Post-processing may involve translation and other operations necessary.

Your Logic SHOULD send at most one response to one request. First response is accepted, all subsequent responses to the same request are ignored.

Activity Your Logic does not receive notifications about:

  • Typing (and similar activity) indicators

Action Stages

Each action, such as sending a message, undergoes multiple stages from the moment it is performed by a participant until it becomes visible to other participants. The following table describes the stages in chronological order.

Action StageDescription
Action StoredSalted CX received the action from a participant. The action is visible only to that original participant. Nobody else can see effect of the action (for example a message).
PreprocessingSalted CX processes the captured action and tries to provide Your Logic with the best possible input. The exact processing depends on action type. For messaging the pre-processing includes language detection and language translation.
Ready for Your LogicSalted CX is ready to send the information about the action to Your Logic. In case there is no request related to this conversation in Your Logic Salted CX sends the request with this action to Your Logic. If Your Logic is still processing a previous request related to the conversation the action is sent after Your Logic responds together with other actions. See Asynchronous Behavior in Your Logic for more details.
Post-processingSalted CX executes actions that Your Logic returned in its response. Part of the execution of the actions may be additional processing such as translation of messages to the customer language.

At the end of this stage Salted CX can send to Your Logic a next request related to the conversation.
Ready for ParticipantsSalted CX shows the effect of the action (for example a message) to other participants.

Error Handling

We ensure fallback in case Your Logic is not available due to network error, the service is down or the service is too slow to respond. The fallback ensures the stability of the infrastructure and maintain certain level of service for your customers.

Common fallback action for messaging conversations is to ask human agents for help. Depending on the volume of your conversations this may be overwhelming for them and people might not be able to provide the same response times and quality of service under such load.

Your Logic is Not Available

In case an event happens and Your Logic is not available we resort to performing a default action that would be done as if Your Logic was not setup at all. If the conversation has no engaged human agent then we mark the conversation with Needs Help flag which makes it appear in agents Live screen in Salted CX. The messages between participants continue to function normally.

Your Logic Returns an Error

If Your Logic returns an error we behave as if Your Logic was not available.

Possible errors handled by Salted CX:

  • When calling your web hook Your Logic returns HTTPS response code outside of 2xx range
  • Your Logic responds in unsupported format, corrupted file, etc.

Your Logic is Too Slow

If Your Logic does not respond in timeout in settings we behave also as if Your Logic was not available. Each request from Salted CX contains an expiration time in UTC that lets you know how much time Your Logic has to respond.

Salted CX may have additional grace period to accommodate for network delay and other potential issues. So it is possible that even responses after the timeout get accepted but there is no extra guarantee beyond the timeout. You can adjust the timeout in settings. We recommend to set the timeout as low as possible but with enough buffer for spikes during normal operations.

One Your Logic per Account

You can have only one Your Logic webhook endpoint per account. We do not support calling multiple web hooks. In case you need to send requests from Salted CX to multiple destinations, you have to implement this behavior in Your Logic.

Additional Resources

Your Logic Requests — what you will receive from Salted CX

Your Logic Responses — what you should send to Salted CX as a response to the requests

Your Logic Data — what data are exchanged during Your Logic

Asynchronous Behavior in Your Logic — how to work with asynchronous communication

Your Logic Implementation Tips — some tips on how to make Your Logic behave in a customer-friendly way

Copy section link

Your browser couldn’t copy automatically. Copy the link below.

In this section

Connect your existing automation to Salted with Your Logic

Connect existing automation in any language to Your Logic, then test your first chat or email with an authenticated webhook and JSON actions.

How automation logic controls a customer conversation

Learn how automation logic receives conversation events, decides what should happen next, and returns actions for Salted to perform. In configuration and technical documentation, this is called Your Logic.

Your Logic Events

Reference the events Salted CX sends to Your Logic, including request headers, conversation context, participant data, and triggers for messages, actions, and state changes.

Your Logic Actions

Reference the actions Your Logic can send to Salted CX, including messages, questions, conversation updates, and requests for assistance from human agents.

Your Logic Response Examples

Use example action sequences to escalate conversations to human agents or invite external experts while setting customer expectations and preserving useful context.

Asynchronous Behavior in Your Logic

Understand how Your Logic receives events while a conversation continues, and handle queued messages, changing conversation state, and activity from multiple participants.

Live Conversation Lifecycle

Understand conversation and engagement states, how requests for help are tracked, and how messages move between customers, agents, and Your Logic.

Your Logic Implementation Tips

Plan and improve Your Logic with practical patterns for conversation openings, escalation, resolution, customer feedback, and collaboration with human or external agents.

Build Menus using Your Logic

Build customer menus with Your Logic, offer context-specific choices across supported channels, and handle both selected answers and free-text responses from customers.

Conversation Urgency

Prioritize conversations in Help Needed by setting urgency through Universal Chat or Your Logic, using business rules, weighted factors, or urgency tiers.

Silent Messages

Understand how silent messages avoid unnecessary conversation reopening and notifications, and use the silent flag to decide how Your Logic should respond.

Setup Integration with ElevenLabs

Connect an ElevenLabs voice agent to Salted CX, configure call webhooks and authentication, and enable escalation to human agents when assistance is needed.

Custom Digital Channel

Connect your own chat interface to Salted CX by sending customer events and receiving reply actions, with authentication, delivery, and integration examples.

Salted CX Live MCP

Give your voice agent tools to escalate, text or email the customer, leave notes, set the language and transfer calls, and connect them to ElevenLabs.

Build for Resilience

Make Your Logic more resilient to technical failures by retrying actions appropriately and handling unavailable translations or services without losing conversation context.

Connect Slack with Your Logic

Connect agent actions to Slack using Your Logic, from posting conversation announcements to requesting human approval and returning the result to Salted.

Customize Agent Desktop with Your Logic

Use Your Logic to adapt Agent Desktop during a conversation by controlling buttons, editable attributes, and suggested replies for the current situation.