Skip to content
Browse

Your Logic

Your Logic Actions

Last updated

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

Your Logic decides what actions Salted CX should take and sends these updates to Your Logic. This can be as a response to a Your Logic event, or it can be sent without any prior event, just as an update of the conversation.

Your Logic Actions Endpoint

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.

Sending the Actions

Because Your Logic executes actions by sending HTTP request network traffic is involved. We strongly recommend to create

Request Body

The body has exactly two top-level properties. Any other top-level property is ignored — update conversation properties with the CONVERSATION_UPDATE action instead.

PropertyTypeDescription
requestIdUUID (Optional)The requestId of the Your Logic event this body answers. Omit it to send actions without a prior event.
actionsArray of ActionsThe actions to execute, in order. Each action has a type and the properties of that type.

The endpoint responds with 200 when all actions succeeded. When an action fails, the response is 207 if earlier actions succeeded, otherwise the status of the failure (for example 400). The body lists the result of every executed action:

{
  "results": [
    { "action": { "type": "NOTE", "content": "Customer asked about the Star Plan." }, "status": 200, "message": "Succeeded" },
    { "action": { "type": "NEEDS_HELP", "needsHelp": true }, "status": 400, "message": "Action NEEDS_HELP not allowed: unknown targetAgentPid" }
  ]
}

Response Status Codes

The status code tells Your Logic whether resending the body can help. Only a 400 can be fixed by changing the body. When the body answers a requestId that is no longer open, Salted CX refuses it with 404, 409 or 410 before it validates the actions, so a late answer with an invalid action still gets the requestId status, not 400. Never retry these three.

StatuserrorSituationWhat to do
200—All actions succeeded.Nothing.
207—An action failed after earlier actions succeeded. The rest of the actions were not executed.Check results; send only the actions that were not executed.
400—Invalid body: malformed JSON, an action not allowed on the conversation's channel, or a create conversation action sent to this endpoint.Fix the body and resend.
404REQUEST_ID_UNKNOWNThe requestId never existed. Salted CX adds a bot failure note to the conversation.Do not retry. Check that you answer with the requestId from the Your Logic event.
409REQUEST_ALREADY_ANSWEREDThe requestId was already answered. Salted CX used the first answer.Do not retry.
410REQUEST_EXPIREDThe answer arrived after Salted CX stopped waiting for it. The conversation already continued without it (for example, it was handed to a human agent).Never retry. To still act in the conversation, send the actions without the requestId.

A 404, 409 or 410 for a requestId has a JSON body. Branch on error; message is for people and can change.

{
  "status": 410,
  "error": "REQUEST_EXPIRED",
  "message": "Your logic arrived after timeout, response is not used.",
  "timestamp": "2026-11-20T09:15:02.481Z",
  "path": "/api/v1/live/your-logic/accounts/{accountId}/conversations/{conversationPid}"
}

A 404 with a plain-text body instead of JSON means the conversation in the URL was not found. Check the account ID and the conversation PID.

Response without Request

You can also send responses unrelated to any specific requests. In this case you have to reference a conversation. A good example would be a very long running background task that needs to be completed or some action you perform after an timeout unless it is canceled during the conversation.

A customer sends Message 1 to Salted CX. Salted sends Your Logic a request containing Message 1 and the content up to it. Your Logic can do anything, then returns actions. Salted performs those response actions and shows Message 1 to a human agent. Later, Your Logic sends a response without a request.
A customer sends Message 1 to Salted CX. Salted sends Your Logic a request containing Message 1 and the content up to it. Your Logic can do anything, then returns actions. Salted performs those response actions and shows Message 1 to a human agent. Later, Your Logic sends a response without a request.
Response without Request
Read diagram as text

A customer sends Message 1 to Salted CX. Salted sends Your Logic a request containing Message 1 and the content up to it. Your Logic can do anything, then returns actions. Salted performs those response actions and shows Message 1 to a human agent. Later, Your Logic sends a response without a request.

  1. Customer to Salted CXMessage 1
  2. Salted CX to Your LogicRequest Message 1
    Content up to Message 1
  3. Your LogicDo anything
  4. Your Logic to Salted CXActions to Take
  5. Salted CXPerform response actions
  6. Salted CX to Human agentShow Message 1 to a human agent
  7. Your Logic to Salted CXResponse without Request

Responses without requests can contain exactly the same actions as the responses related to a request. The conversation is identified by the Conversation PID in the endpoint URL path; simply omit the requestId from the body.

{
	"actions": [
		{
			"type": "MESSAGE",
			"content": "Your travel plans have been confirmed with all the travel agencies. Here is your itenerary https://demoadventures.com/trips/1679287. Have a nice trip!"
		}
	]
}

Response with Multiple Actions

Your Logic can send response with multiple actions. Salted CX executes those actions sequentially. If one action fails the rest of the actions are not executed. In the example below Your Logic lets customer know that it may take a while to involve a human agent and thens write a short summary of the previous conversation as a note.

{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	
	"actions": [
		{
			"type": "MESSAGE",
			"content": "Sorry, I do not know about that. Give me a moment to connect you with a human colleague shortly."
		},
		{
			"type": "NOTE",
			"content": "The customer is asking about a product not mentioned in our knowledge base - Star Plan."
		},
		{
			"type": "NEEDS_HELP",
			"needsHelp": true
		}
	]
}

You can check for examples of responses with multiple actions in Your Logic Response Examples.

Available Actions

There are these actions currently available in Your Logic.

Some actions are restricted by the conversation's default channel. On EMAIL and WEB_FORM conversations only EMAIL, MESSAGE, QUESTION, and QUESTION_DYNAMIC can produce a customer-visible turn; on SMS conversations only MESSAGE, QUESTION, and QUESTION_DYNAMIC. A request containing a customer-visible action that is not compatible with the channel (for example SEND_FILE or WHATSAPP_TEMPLATE on an EMAIL conversation) is rejected as a whole. Actions that do not produce customer-visible turns (NOTE, NEEDS_HELP, CONVERSATION_UPDATE, and others) are available on every channel.

ActionDescription
MESSAGESends a message visible to the customer as a bot.
NEEDS_HELPAsks any agent for help.
NOTESaves a note invisible to the customer.
QUESTIONAsks a question defined in Salted CX to a customer.
QUESTION_DYNAMICSends a dynamically built question. Your Logic can customize the question and the answers.
CONVERSATION_UPDATEUpdate custom properties of a conversation.
INVITE_EXTERNAL_AGENTInvites an external to the conversation by sending an email to them.
ENGAGEMENT_COMPLETECompletes the engagement. You can use this to kick the agents out of the conversation.
CONVERSATION_COMPLETECompletes the conversation and all engagements in that conversation. Customers can still write back and reopen the conversation.
CREATE_CONVERSATIONCreates an empty outbound conversation. Accepted only by the create conversation endpoint, see Start Conversation.
SEND_FILESends a file to a user.
WHATSAPP_TEMPLATESends approved WhatsApp template to the customer.
EMAILSends an email to the customer, with optional attachments.
CUSTOMER_UPDATEUpdates customer attributes.
ENGAGE_YOUR_LOGICEngages or disengages Your Logic in the conversation.
CALL_STARTStarts an outbound voice call (to a voice bot or an agent).
CALL_TRANSFER_EXTERNALTransfers the live voice call to an external phone number or SIP address.
NO_ACTIONExplicitly does nothing. Equivalent to an empty list of actions.

Sending an action type that is not in this list fails parsing of the whole response — none of the actions in that payload are executed.

No Actions

Empty list of actions means that Salted CX will do nothing as the response. You SHOULD send empty responses to tell Salted CX that it can move forward with the conversation and send the next event into Your Logic if there is any. Sending this event as soon as possible is important for reducing latency.

{
	"actions": [
	]
}
Empty response is an empty JSON object

Send Message

This response sends a message that is visible to a customer.

PropertyTypeDescription
contentStringThe content of the message to send to the customer.
agentLanguageString (Optional)Language the content is written in — two-letter ISO 639-1 code such as en, de, cs. When set, it replaces language detection: the text is translated from this language for the customer and the account, and agents see it as sent. Blank values are ignored.
attachmentsArray (Optional)Attachments to send with the message; each item has name, path (from the media upload-url endpoint), and mimeType. All three are required.
channelEnum (Optional)Channel to send the message on: WHATSAPP, SALTED, EMAIL, VOICE, SMS, CUSTOM, WEB_FORM. Defaults to the conversation's default channel.
contactPidUUID (Optional)Contact to send the message to; must be one of the customer's contacts. Defaults to the conversation's primary contact.

Basic Text Message

{
	"actions": [
		{
			"type": "MESSAGE",
			"content": "Would moving the booking to this Friday at 17:00 work for you?"
		}
	]
}

Message with All Properties

{
	"actions": [
		{
			"type": "MESSAGE",
			"content": "Here is the summary of your booking.",
			"agentLanguage": "en",
			"channel": "WHATSAPP",
			"contactPid": "550e8400-e29b-41d4-a716-446655440001",
			"attachments": [
				{
					"name": "booking.pdf",
					"path": "<path returned by the upload-url endpoint>",
					"mimeType": "application/pdf"
				}
			]
		}
	]
}

Send Email Message

Email has a dedicated action with email specific properties:

PropertyTypeDescription
subjectString (required)The subject of the email.
bodyString (required)The body of the email to send to the customer.
contactPidUUID (required)Identifier of the email contact to send the email to. Use objects in customer ⏵ contacts to find contactPid for the email address you want to use for the recipient.
attachmentsArray of Attachments (optional)The array of attachments. Each attachment requires path, name, and mimeType.
ccArray of Strings (optional)Recipients in copy. Addresses are validated and deduplicated; an email can have at most 50 recipients including the main recipient.
bccArray of Strings (optional)Recipients in blind copy. Addresses already in cc are dropped.
fromString (optional)Custom sender address. It must be at the domain of the brand's outgoing email address; any other domain fails the action. Defaults to the brand's outgoing email address.
fromNameString (optional)Display name for the custom from address. Ignored without from; the brand display name is used otherwise.
replyToString (optional)Reply-To address. Any valid address is accepted, but replies only reach the conversation if that mailbox forwards to the brand's inbound address.
{
  "requestId": "550e8400-e29b-41d4-a716-446655440000",
  "actions": [
    {
      "type": "EMAIL",
      "contactPid": "550e8400-e29b-41d4-a716-446655440001",
      "subject": "Your requested document",
      "body": "Please find the requested document attached.",
      "cc": ["partner@example.com"],
      "bcc": ["archive@example.com"],
      "from": "orders@brand-domain.com",
      "fromName": "Orders Team",
      "replyTo": "orders@brand-domain.com",
      "attachments": [
        {
          "path": "<path to media uploaded to previously>",
          "name": "document.pdf",
          "mimeType": "application/pdf"
        }
      ]
    }
  ]
}

Attachments

To send an attachment, first upload a file to Salted CX and then reference it in the EMAIL action. You can include multiple attachments in a single email. You have to first upload them all. You upload the file in two steps:

Obtain Upload Link

Send a POST request with an empty body to the /api/v1/live/media/accounts/{accountId}/upload-url endpoint. You will retrieve two properties:

s3PresignedUrl — The URL to which you perform the upload.

path — The path to use in the EMAIL action to attach the dashboard.

Upload the file

Send a PUT request to the s3PresignedUrl URL with the body containing the attachment data and the Content-Type header set to the attachment's mime type.

Send WhatsApp Template Message

Prepared reply is currently specific for WhatsApp. This will change in the future to make it channel independent. Currently you must have a template in WhatsApp that is approved for outbound.

When updating templates in Meta we strongly encourage to create a new template and then switch Your Logic to use the new template.

Sends an approved WhatsApp template to the customer. The action fails on conversations whose default channel is not WhatsApp. This enables to start outbound conversations from Your Logic. Prepared messages are picked from the existing approved templates and can be customized using variables.

PropertyTypeDescription
templateNameString (required)Name of the approved template in WhatsApp.
languageObject (required)Template locale, e.g. {"code": "en"} — lowercase WhatsApp locale codes such as en, en_US, de, cs.
parametersObject (required)Key-value pairs of variables to fill into named {{placeholders}} in the template header, body and buttons. These variables enable to customize the message for the specific customer.
{
  "actions": [
    {
      "type": "WHATSAPP_TEMPLATE",
      "templateName": "offer_help_named_params",
      "language":{"code": "en"},
      "parameters": {
        "customer_name": "Adam",
        "discount_value": "6",
        "questions_reference" : "serving lunch"
      }
    }
  ]
}

Needs Help

Ask for help makes the conversation appear in inbox for the agents. Your Logic still receives all the requests during the communication. However agents can join the conversation and help with its resolution.

PropertyTypeDescription
needsHelpBoolean (optional)Default true. Conversations with Needs Help appear in Live Conversations so agents can join them; the flag can be raised even when an agent is currently engaged, which enables another agent to join.
The value is currently not evaluated: every NEEDS_HELP action raises Needs Help, and false does not clear it.
targetAgentPidUUID (optional)Invite this specific agent. An unknown agent fails the action.
agentSelectionStrategyString (optional)Best Available — invite the least busy available agent.
timeoutInteger (optional)Seconds the invited agent has to accept. Default 30.
onTimeoutString (optional)All (default) — after the timeout the conversation goes to the shared Needs Help queue. Next Agent — the strategy picks another agent.
scheduleAtTime (optional)ISO 8601 timestamp such as 2026-10-16T14:00:00Z. Schedules the needs-help escalation for a future time instead of raising it immediately.
cancelOnNeedsHelpBoolean (optional)true (default) — a scheduled escalation is canceled if the conversation raises needs help before the scheduled time.
{
	"actions": [ 
		{
			"type": "NEEDS_HELP",
			"needsHelp": true
		}
	] 
}

Invite a specific agent later today and fall back to the next best available agent if they do not accept:

{
	"actions": [
		{
			"type": "NEEDS_HELP",
			"needsHelp": true,
			"targetAgentPid": "3f2b1c4d-0000-0000-0000-000000000001",
			"agentSelectionStrategy": "Best Available",
			"timeout": 60,
			"onTimeout": "Next Agent",
			"scheduleAt": "2026-10-16T14:00:00Z",
			"cancelOnNeedsHelp": true
		}
	]
}

Save Note

This response saves a note that is only visible to agents, external agents but invisible to customers.

PropertyTypeDescription
contentStringThe content of the note.
responseToUUID (Optional)The UUID of the turn that the note is attached to.
attachmentsArray (Optional)Attachments for the note; each item has name, path (from the media upload-url endpoint), and mimeType.
{
	"actions": [
		{
			"type": "NOTE",
			"content": "It is unlear what it our policy for Switzerland.",
			"responseTo": "<uuid>",
			"attachments": [
				{
					"name": "policy.pdf",
					"path": "<path returned by the upload-url endpoint>",
					"mimeType": "application/pdf"
				}
			]
		}
	]
}

Send File

This action sends a file to a user. Before triggering the action, you must first call the API, which returns an upload URL and file path. After uploading your file to the provided URL, you can then trigger the action using the file path from the API response.

https://api.eu.salted.cx/api/v1/live/media/accounts/[ACCOUNT]/upload-url

Each call to this endpoint MUST contain shared secret in the Authorization header.

Authorization: Bearer <shared secret>
PropertyTypeDescription
pathString (required)The path returned by the upload-url endpoint.
nameString (required)Name of the uploaded file.
contentString (optional)Content or description associated with the file.
mimeTypeString (required)MIME type indicating the file format (e.g., image/png, application/pdf).
channelEnum (Optional)Channel to send the file on; defaults to the conversation's default channel.
{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	"actions": [
		{
			"type": "SEND_FILE",
			"path": "/path/that/you/retrieved/from/our/file/service.extension",
			"name": "invoice.pdf",
			"content": "Invoice for Order #739281",
			"mimeType": "application/pdf",
			"channel": "WHATSAPP"
		}
	]
}

Ask Question

This action sends a question to the target participant. You can use any Question PID in Salted CX. To find out what is the question PID for a given question open the question in Salted CX and copy its PID from the browser address bar.

Salted CX translates the question to visualization of the target platform. In Universal Chat it shows a list of buttons to choose from. On WhatsApp it creates either a list of buttons or a list depending on the number of possible answers.

PropertyTypeDescription
allowedToRespondArray of EnumsWho can respond to the question: CUSTOMER, AGENT, EXTERNAL_AGENT.

Default ["CUSTOMER"]
allowedToViewArray of EnumsWho can see the turn with the question and the related answer.

Default ["CUSTOMER", "AGENT", "EXTERNAL_AGENT"]
allowCustomReplyBooleanHint for the front end whether to enable the agent to show write back a custom text.

true (default) — Enables the participant to reply using a custom text and thus ignoring the question.
false — The participant cannot reply to the using custom text reaply.
questionPidUUID (required)The PID of question in Salted CX to send to the participant to answer.
note String, nullableEnables to provide additional explanation to the question that is asked from the agents without altering the question itself.
reviewEngagementPidUUID, nullableThe PID of an engagement that the review will be associated with.
channelEnum (Optional)Channel to send the question on; defaults to the conversation's default channel.
contactPidUUID (Optional)Contact to send the question to; must be one of the customer's contacts. Defaults to the conversation's primary contact.
contentString (Optional)Optional text sent with the question.
emailSubjectString (Optional)Subject to use when the question is delivered over email.
{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	"actions": [
		{
			"type": "QUESTION",
			"questionPid": "36c8f00c-44c9-4633-bfa7-2f3a3b51c1df"
		}
	]
}

You can also ask questions to an agent. This is useful for giving agents closed set of options to choose from and make the process more unified.

{
	"actions": [
		{
			"type": "QUESTION",
			"allowedToRespond": ["AGENT", "EXTERNAL_AGENT"],
			"allowedToView": ["AGENT", "EXTERNAL_AGENT"],
			"allowCustomReply": false,
			"questionPid": "<Salted CX question PID>",
			"note": "What should the user take into consideration when answering this question."
		}
	]
}

A question with all properties, delivered over email:

{
	"actions": [
		{
			"type": "QUESTION",
			"questionPid": "36c8f00c-44c9-4633-bfa7-2f3a3b51c1df",
			"allowedToRespond": ["CUSTOMER"],
			"allowedToView": ["CUSTOMER", "AGENT", "EXTERNAL_AGENT"],
			"allowCustomReply": true,
			"note": "Asked after the refund was processed.",
			"reviewEngagementPid": "582fa5da-d423-46ae-b69f-aa1d2b01f736",
			"channel": "EMAIL",
			"contactPid": "550e8400-e29b-41d4-a716-446655440001",
			"content": "How satisfied are you with the resolution?",
			"emailSubject": "Tell us how we did"
		}
	]
}

See Answer how to listen for answers when participants click on them.

Customer Facing Questions

The questions that you ask the customers are translated into the communication platform. The below example shows a question asked to a customer in the Universal Chat. Depending on the preferences you allow the customers to provide a custom answer.

Your Logic Actions — documentation image

Agent Facing Questions

Agent facing questions enable you to guide agents through decisions.

Your Logic Actions — documentation image

Ask Dynamic Question

Asking a dynamic question enables you to give customers and other participant dynamically generated choices without the need for a question created in Salted CX. This enables you to have question and answers that take context into consideration. Answers to these questions are not in reporting but are visible in the customer journey. The action supports the same optional properties as Ask Question (allowedToRespond, allowedToView, allowCustomReply, note, reviewEngagementPid, channel, contactPid, content, emailSubject), plus question.shouldCreateReview (Boolean, default false). Currently shouldCreateReview must stay false for dynamic questions — a QUESTION_DYNAMIC action with shouldCreateReview: true is rejected and fails the whole request. Use the QUESTION action with a question defined in Salted CX when the answer should create a review.

PropertyTypeDescription
questionObject (required)The question to ask.
question.externalIdString (required)Your identifier of the question; it is sent back to Your Logic with the answer.
question.contentString (required)The question text shown to the participant.
question.answersArray (required)The answers to choose from; each item has externalId (your identifier, sent back with the answer) and content (the answer text). Both are required.
question.shouldCreateReviewBoolean (optional)Default false. Must stay false, see above.
allowedToRespond
allowedToView
allowCustomReply
note
reviewEngagementPid
channel
contactPid
content
emailSubject
OptionalSame meaning and defaults as in Ask Question.

When a participant choses an answer you will get the answer in a request sent to Your Logic so you can react to customer clicking on any of the options.

{
  "actions": [
    {
      "type": "QUESTION_DYNAMIC",
      "question": {
        "externalId": "question1",
        "content": "What is your preffered time slot?",
        "answers": [
          {
						"externalId": "16-00",
						"content": "16:00 to 16:30"
					},
					{
						"externalId": "16-30",
						"content": "16:30 to 17:00"
					},
					{
						"externalId": "17-00",
						"content": "17:00 to 17:30"
					}
        ]

      }
    }
  ]
}
Example of asking a question to agents

A dynamic question with all properties:

{
  "actions": [
    {
      "type": "QUESTION_DYNAMIC",
      "question": {
        "externalId": "refund-approval",
        "content": "Approve the refund of 25 EUR?",
        "answers": [
          { "externalId": "approve", "content": "Approve" },
          { "externalId": "reject", "content": "Reject" }
        ],
        "shouldCreateReview": false
      },
      "allowedToRespond": ["AGENT", "EXTERNAL_AGENT"],
      "allowedToView": ["AGENT", "EXTERNAL_AGENT"],
      "allowCustomReply": false,
      "note": "The order was delivered 3 days late.",
      "reviewEngagementPid": "582fa5da-d423-46ae-b69f-aa1d2b01f736",
      "channel": "SALTED",
      "contactPid": "550e8400-e29b-41d4-a716-446655440001",
      "content": "Refund request for order ORDER-123",
      "emailSubject": "Refund approval"
    }
  ]
}

See Answer how to listen for answers when participants click on them.

Update Conversation

Updates conversation properties. Property values are then propagated to individual engagements when they are completed. The top-level properties (language, urgency, custom, info, serviceExternalId, serviceSourceId, desktop, liveQueueAssignmentEnabled) sit directly on the action. Every property is optional; properties that are missing or null leave the stored value unchanged. All attribute pairs listed below must be nested inside an attributes object — see the example. Field names are case-sensitive.

Property names that end with externalId reference entities that are reportable in analytics. External ID is the stable ID that you can use to reference the entity. If the entity already exists in analytics, users will see its user-friendly display name. If the entity is not available in analytics, it will be created with the External ID as a user-facing name (fallback). You can use the Ingest API to import user-facing values and other attributes for the entity.

Property names that end with sourceId enable to reference leaf entities imported from other data sources. For example if you have queues in a legacy contact center platform that you want to use within Live Conversations you use the sourceId of that legacy platform to reference the same same queue.

PropertyTypeDescription
languageStringThe customer's language — two-letter ISO 639-1 language code such as en, de, cs. It overrides the detected customer language with full confidence.
urgencyIntegerThe urgency of the conversation that sorts the conversations in Needs Help section in Live Conversations.
customObjectYou can use custom attribute to store a custom object associated with the conversation. Keep it small — about 1kB at most (the limit is currently not enforced, but oversized objects may be rejected in the future). This enables you to keep conversation-related information in Salted CX without maintaining it in Your Logic. This enables you to handle some scenarios more easily, such as restarting or upgrading your service.
We take the value of the custom attribute as-is. The custom attribute value has to be a valid JSON value to be parsed successfully. Beyond this requirement and size limitation, we do not do any validation of the value. The custom object can contain any inner structure.
We do not process the content of the object in any way. Your Logic implementation is responsible for providing a complete object with all values set to the latest state.
infoArrayStructured information visible in the agent sidebar; items have title, text, and optional url. The list replaces the stored one; an empty list is ignored.
serviceExternalId
serviceSourceId
String / UUIDIdentifiers of the service associated with the conversation.
desktopObjectControls what agents can see and do in the desktop for this conversation — see the Desktop section.
liveQueueAssignmentEnabledBooleanSwitches Live Queue Assignment on or off for this conversation. New conversations take the value from the brand's settings (or the account's when the brand has none). The current value is sent to Your Logic in conversation.liveQueueAssignmentEnabled.
attributesObjectReporting attributes — see the Attributes section.

Desktop

The desktop object controls what agents can see and do in the agent desktop for this conversation. Each update replaces the whole stored desktop configuration — always send the complete object, not a diff. Elements you do not mention keep their default behavior (visible and enabled).

PropertyTypeDescription
defaultReplyObjectPrefilled reply offered to the agent: message (required), optional title, and optional subject used when the reply goes out over email. An entry without a message is ignored.
actionsObjectControls the built-in desktop actions leave, resolve, waitForCustomer, askForHelp, and inviteExternal. Each is an object with a status of Disabled or Hidden.
customActionsArrayCustom desktop actions to control; each item has id (required), status (Disabled or Hidden), and an optional title override.
attributesArrayAttribute fields in the desktop to control; each item has id (required) and status (Disabled or Hidden).

Statuses are case-sensitive: Disabled shows the element but prevents its use, Hidden removes it from the desktop. Items with a missing id or an unrecognized status are dropped from the update.

{
  "actions": [
    {
      "type": "CONVERSATION_UPDATE",
      "desktop": {
        "defaultReply": {
          "title": "Suggested reply",
          "subject": "Your order",
          "message": "Hello, thank you for reaching out about your order."
        },
        "actions": {
          "resolve": { "status": "Disabled" },
          "inviteExternal": { "status": "Hidden" }
        },
        "customActions": [
          { "id": "refund", "status": "Hidden", "title": "Issue Refund" }
        ],
        "attributes": [
          { "id": "orderNumber", "status": "Disabled" }
        ]
      }
    }
  ]
}

Attributes

The following reporting attributes are sent nested inside the attributes object of the action — not at the top level. All of them are optional strings (max 100 characters); only the fields present in the payload are updated.

PropertyTypeDescription
attribute01ExternalId
attribute01SourceId

attribute02ExternalId
attribute02SourceId

attribute03ExternalId
attribute03SourceId

attribute04ExternalId
attribute04SourceId
StringNumbered attributes that enable to segment conversation by a custom dimensions.
caseExternalId
caseSourceId
StringThe case is associated with the current engagement. Cases are units that can span many engagements, conversations, and even customers. Thus cases are no directly part of a customer journey as they may touch multiple customers. However, cases might be useful to calculate aggregated metrics to associate effort, costs, etc. with them.
language
(legacy alias languageExternalId)
StringThe predominant language associated with the engagement. In a multi-lingual contact center this enables you to segment engagements by the language you are serving. languageSourceId has been removed and is ignored.
menuPathExternalId
menuPathSourceId
StringThe menu path the customer went through during the last menu engagement.
outcomeExternalId
outcomeSourceId
StringThe outcome associated with the engagement.
queueExternalId
queueSourceId
StringThe queue with which the engagement is associated with. The meaning differs by the type of the engagement.
priorityExternalId
prioritySourceId
StringThe priority of the engagement categorized into discreet buckets such as High, Normal, Low.
reasonExternalId
reasonSourceId
StringThe reason why the customers contact the company. This may be based on customer input, agent input or automatically detected based on the environment.
reasonCategoryExternalId
reasonCategorySourceId
StringCategory for a reason that helps to organize reasons into a higher level units.
{
  "actions": [
    {
      "type": "CONVERSATION_UPDATE",
      "language": "en",
      "urgency": 1000,
      "liveQueueAssignmentEnabled": true,
      
      "attributes": {
	      "attribute01ExternalId": "Example Value 1",
	      "attribute01SourceId": "d0a1b2c3-0000-0000-0000-000000000001",
	      "attribute02ExternalId": "Example Value 2",
	      "attribute02SourceId": "d0a1b2c3-0000-0000-0000-000000000002",
	      "attribute03ExternalId": "Example Value 3",
	      "attribute03SourceId": "d0a1b2c3-0000-0000-0000-000000000003",
	      "attribute04ExternalId": "Example Value 4",
	      "attribute04SourceId": "d0a1b2c3-0000-0000-0000-000000000004",
	      "caseExternalId": "Case ID",
	      "caseSourceId": "d0a1b2c3-0000-0000-0000-000000000005",
	      "language": "en",
	      "menuPathExternalId": "main-customer-support",
	      "menuPathSourceId": "d0a1b2c3-0000-0000-0000-000000000006",
	      "outcomeExternalId": "escalated-to-agent",
	      "outcomeSourceId": "d0a1b2c3-0000-0000-0000-000000000007",
	      "queueExternalId": "queue-id",
	      "queueSourceId": "d0a1b2c3-0000-0000-0000-00000000000b",
	      "priorityExternalId": "High",
	      "prioritySourceId": "d0a1b2c3-0000-0000-0000-000000000008",
	      "reasonExternalId": "Custom Reason",
	      "reasonSourceId": "d0a1b2c3-0000-0000-0000-000000000009",
	      "reasonCategoryExternalId": "Custom Reason Category",
	      "reasonCategorySourceId": "d0a1b2c3-0000-0000-0000-00000000000a"
      },
      "desktop": {
	      "defaultReply": {
		      "title": "Suggested reply",
		      "subject": "Your order",
		      "message": "Hello, thank you for reaching out about your order."
	      },
	      "actions": {
		      "leave": { "status": "Disabled" },
		      "resolve": { "status": "Disabled" },
		      "waitForCustomer": { "status": "Hidden" },
		      "askForHelp": { "status": "Disabled" },
		      "inviteExternal": { "status": "Hidden" }
	      },
	      "customActions": [
		      { "id": "refund", "status": "Hidden", "title": "Issue Refund" }
	      ],
	      "attributes": [
		      { "id": "orderNumber", "status": "Disabled" }
	      ]
      },
      "info": [
	      {
		      "title": "Memos",
		      "text": "Holidays opening times for the partner: 9:00AM to 12:00PM"
	      },
	      {
		      "title": "Menu",
		      "url": "https://knowledgebase.company.com/article123",
		      "text": "Holidays opening times for the partner: 9:00AM to 12:00PM"
	      }
      ],
      "serviceSourceId": "56710d6f-72d2-658c-eefc-92554e59dead",
      "serviceExternalId": "YOUR-EXTERNAL-ID",
      "custom": {
	      "customer_name": "Adam",
	      "orderNumber": "ORDER-123",
	      "allOrdersInProgress": [
		      "ORDER-245",
		      "ORDER-982"
	      ]
      }
    }
  ]
}

Update Customer

Updates custom customer properties. The CUSTOMER_UPDATE action supports only the fields listed below; any other field is ignored. Every field is optional and only the fields present are updated. All properties are composed by two parts:

  • <property name>ExternalId — The identifier of the entity in an external system.
  • <property name>SourceId — The identifier of an external system, as a UUID. This ID is provided by Salted CX upon request. A SourceId value that is not a valid UUID fails parsing of the whole request.

These two parts enable to solve collisions of IDs between individual systems.

PropertyTypeDescription
country
(legacy alias countryExternalId)
StringCountry of the customer — ISO 3166-1 two letter country code. Invalid codes are skipped. There is no countrySourceId.
categoryExternalId
categorySourceId
String / UUIDBroad grouping of customers into categories. For example split between B2B and B2C customers.
organizationExternalId
organizationSourceId
String / UUIDGroups customers into their organizations. For example if you provide B2B services to large companies and you want to associate the individual customers with those companies.
regionExternalId
regionSourceId
String / UUIDGeographic region that the customer is in. This is typically a high level unit covering multiple states such as North America, EMEA, APAC, etc.
segmentExternalId
segmentSourceId
String / UUIDGroups customers by (market) segment enabling you to better understand differences in customer behavior in different demographics, areas of interest, etc.
stateExternalId
stateSourceId
String / UUIDThe state eventually other territory that is part of the country.

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 no sequence requests for customers. Customers can be involved in multiple conversations by simply emailing you and chatting at the same time about different topics.

Make sure you handle race conditions when updating the customer data. Multiple conversations can update it and read it in parallel. We keep the last value it receives as a whole. We do not resolve any conflicts nor do partial updates.

{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	"actions": [
		{
			"type": "CUSTOMER_UPDATE",
			
			"country": "de",
			"categoryExternalId": "B2B",
			"categorySourceId": "d0a1b2c3-0000-0000-0000-000000000011",
			"organizationExternalId": "ACME-GMBH",
			"organizationSourceId": "d0a1b2c3-0000-0000-0000-000000000012",
			"regionExternalId": "EMEA",
			"regionSourceId": "d0a1b2c3-0000-0000-0000-000000000013",
			"segmentExternalId": "enterprise",
			"segmentSourceId": "d0a1b2c3-0000-0000-0000-000000000014",
			"stateExternalId": "BY",
			"stateSourceId": "d0a1b2c3-0000-0000-0000-000000000015"
		}
	]
}

Start Conversation

Starts an outbound conversation from Your Logic using the selected channel. This action is accepted only by a dedicated endpoint without a conversation PID, and the body must contain exactly one CREATE_CONVERSATION action. Sending it to the conversation endpoint fails the action.

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

The response contains the PID of the new conversation, which you use for all further actions:

{ "conversationId": "11dc08ff-3bfa-4635-bd2c-d9474ed4597c" }

The customer is found by the contact, or created when it does not exist. A customer can have only one WhatsApp or SMS conversation in progress — creating a second one fails and the error contains the PID of the existing conversation.

PropertyTypeDescription
customerObject (required)Object describing the customer.
customer.displayNameStringName of the customer as it should show for the agent. It should not be protected personal information. We generally recommend using the first (given) name.
customer.contactObject (required)Object containing the contact itself.
customer.contact.contactTypeString (required)Type of the contact such as Email, Phone or Custom.
customer.contact.contactString (required)The actual contact.
customer.relatedContactsArray (optional)Further contacts of the same customer; each item has contactType and contact, like customer.contact.
conversationObject (required)Object describing the new conversation.
conversation.channelVendorEnum (required)Channel of the new conversation: WHATSAPP, SALTED, EMAIL, SMS, CUSTOM, VOICE.
conversation.brandPidUUID (required)The brand the conversation belongs to. It must belong to the account in the URL.
conversation.languageCustomerString (optional)Customer language code.
conversation.customObject (optional)Custom conversation properties.
conversation.urlString (optional)Last visited URL to associate with the conversation.
{
  "actions": [
    {
      "type": "CREATE_CONVERSATION",
      "conversation": {
        "channelVendor": "EMAIL",
        "brandPid": "8a1b2c3d-0000-0000-0000-000000000001",
        "languageCustomer": "cs",
        "url": "https://www.example.com/orders/ORDER-123",
        "custom": {
          "orderNumber": "ORDER-123"
        }
      },
      "customer": {
        "displayName": "Carol",
        "contact": {
          "contactType": "Phone",
          "contact": "+1098765431"
        },
        "relatedContacts": [
	        {
		        "contact": "+420123456789",
			      "contactType": "Phone"
	        },
	        {
		        "contact": "CUSTOMER-12345",
		        "contactType": "Custom"
	        }
        ]
      }
    }
  ]
}

Invite External Agent

This action sends an invite to an external agent to join the conversation. The external agent will receive a notification (email) with link authorizing them to access the conversation. The link lets them view the conversation, reply in it and leave it. The email address must not belong to a regular user of your account.

PropertyTypeDescription
emailString (required)Email that can be used to reach the external agent. This can be a person in your company that does not have user account in Salted CX.
nameString (required)User facing name of the external agent.
subjectString (required)Subject of the email sent to the external agent.
messageString (required)The message to send to the external agent. Use this opportunity to communicate urgency and expectations.
expiresTime (required)ISO 8601 timestamp such as 2025-07-29T10:30:00Z. The time until which the partner has access to the conversation. After this time period the link no longer enables the external agent to access the conversation. In case you want the external agent to engage in the conversation you need to send a new invite.

The maximum expiration time is 10 days from the current time.
{
  "actions": [
    {
      "type": "INVITE_EXTERNAL_AGENT",
      "email": "agent@company.cx",
      "name": "Agent Name",
      "subject": "Help with order",
      "message": "Hello, I need assistance with order from your shop.",
      "expires": "2025-07-29T10:30:00Z"
    }
  ]
}

Complete Engagement

This action enables you to tell that the engagement is considered complete.

PropertyTypeDescription
engagementPidPID (required)The engagement that should be completed.
nameString (Optional)The name of the engagement that is shown in the reporting.
reasonCategoryString (Optional)Category of the contact reason associated with the engagement.
reasonString (Optional)Contact reason associated with the engagement.
outcomeCategoryString (Optional)Category of the outcome.
outcomeTypeEnum (Optional)The outcome type related to the engagement.

Possible values:
ACCEPTED
AGENT_RESOLVED
AGENT_LEFT
MISSED
REJECTED
CUSTOMER_LEFT
MOVED
DELETED
CANCELED
REVOKED
CONVERSATION_COMPLETED
INACTIVE_CONVERSATION
EXTERNAL_TRANSFER
CHANNEL_SWITCH
COLD_TRANSFER
AGENT_UNAVAILABLE
BOT_FAILURE
TIME_OUT
HANGUP_BY_AGENT
NO_CUSTOMER_ANSWER
VOICEMAIL
REMOVED_BY_AGENT
outcomePidPID (Optional)The outcome of the engagement.
costDecimal (Optional)The costs associated with the engagement. If using LLMs you can feed the final cost here to be available for analytics.
{
  "actions": [
    {
      "type": "ENGAGEMENT_COMPLETE",
      "engagementPid": "582fa5da-d423-46ae-b69f-aa1d2b01f736",
      "name": "Engagement Outbound #2",
      "reasonCategory": "Orders",
      "reason": "Late delivery",
      "outcomeCategory": "Resolved",
      "outcomePid": "c8b61d87-6fe4-44e2-a419-bbc0963f58f2",
      "outcomeType": "AGENT_RESOLVED",
      "cost": 0.6
    }
  ]
}

Complete Conversation

This action completes the conversation and all of its engagements (if there are any). Complete conversation action has no properties.

{
	"actions": [
		{
			"type": "CONVERSATION_COMPLETE"
		}
	]
}

Completing conversation is an indicator for the customer that the conversation is completed. However customer, bots and agents can contribute to a completed conversation and change its status to in progress again.

Engage Your Logic

In case Your Logic no longer wants to be included the conversation in any way it can let Salted CX know by setting the property engageYourLogic to false. From this moment Your Logic will receive no updates regarding this conversation.

You can also switch the flag to true when sending it without responding to any Your Logic event (as you will receive them). For example Your Logic can be performing a time consuming operation, ask not to receive events, after performing the operation it can return back and ask to be notified about the conversation again.

PropertyTypeDescription
engageYourLogicBooleanTells whether to engage Your Logic in this conversation.

true — Your Logic will receive events for this conversation.
false — Your Logic stops receiving events for this conversation.
{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	"actions": [
		{
			"type": "ENGAGE_YOUR_LOGIC",
			"engageYourLogic": false
		}
	]
}

Start Voice Call

The CALL_START action starts an outbound voice call on the conversation. Salted CX dials the customer and connects the answered call either to a voice bot or to an agent.

PropertyTypeDescription
contactUUIDRequired. PID of the customer's phone contact to dial.
targetStringRequired, case-sensitive.
Bot — the answered call is connected to a voice bot.
Agent — the conversation is raised as Needs Help while the customer's phone is ringing, so an available agent can pick up the call.
botVendorStringRequired when target is Bot. Currently only ElevenLabs is supported.
botIdStringRequired when target is Bot. Identifier of the ElevenLabs agent that should handle the call. The bot must have a phone number assigned in ElevenLabs.

The action fails if a voice call is already in progress for the conversation, or if the bot cannot be resolved to a phone number in ElevenLabs.

{
  "actions": [
    {
      "type": "CALL_START",
      "contact": "550e8400-e29b-41d4-a716-446655440001",
      "target": "Bot",
      "botVendor": "ElevenLabs",
      "botId": "agent_01234567890abcdef"
    }
  ]
}

Transfer Call to an External Number

The CALL_TRANSFER_EXTERNAL action hands the live voice call over to an external phone number or SIP address. Salted CX dials the target into the call, completes the bot's engagement with the EXTERNAL_TRANSFER outcome and creates an engagement for the external party.

PropertyTypeDescription
targetString (required)The number to dial in E.164 format such as +420123456789 (spaces are removed), or a SIP address such as sip:support@pbx.example.com.

The action fails when no voice call is in progress, when the call is a direct dial to the bot, when the call is not connected yet, when the brand has no outgoing call phone number, or when the target is already on the call. The ring timeout (default 30 seconds) and answering machine detection (default off) are configured per brand.

{
  "actions": [
    {
      "type": "CALL_TRANSFER_EXTERNAL",
      "target": "+420123456789"
    }
  ]
}

No Action

The NO_ACTION action explicitly does nothing and has no properties. It behaves like an empty list of actions, with one exception: when it answers a customer turn and every human agent who was engaged in the conversation has already left, the conversation is made visible to agents again so the customer is not left without an answer.

{
  "requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "actions": [
    {
      "type": "NO_ACTION"
    }
  ]
}

Copy section link

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