Skip to content
Browse

Your Logic

Your Logic Events

Last updated

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

Salted CX sends conversation-related data using an HTTP POST method. Each request represents an event that happens in the conversation. Salted CX also sends entire context with each event. This enables keeping your logic implementation stateless for many scenarios.

Salted CX ensures that all requests related to the same conversation are sent sequentially, and Salted CX waits for Your Logic response before sending another request related to the same conversation.

Performance Considerations

Salted CX does send an event for every major action that happens in the conversation, such as sending a message, an agent joining or leaving the conversation, etc. This can be a significant traffic that grows with the number of conversations that are handled in Salted CX. You need to scale your implementation accordingly. Ideally, responding elastically to load.

You can expect roughly 20 to 30 events/requests per conversation. However, this strongly depends on your processes and the type of conversations you have with your customers.

Request Headers

Each request has the following headers:

HeaderTypeDescription
AuthorizationStringThe token you can use to verify that this event was sent by Salted CX. This is a shared secret and you have to ensure you protect the token on your side so a bad actor cannot use it to pretend they are Salted CX. Value is in format Bearer <shared secret>

Request Structure

Requests have a common structure as described below.

PropertyTypeDescription
requestIdUUIDUnique identifier of this request. This identifier is important when responding back so Salted CX knows that the request is resolved. The same event always has the same requestId, so a redelivered request can be recognized.
timeTimeWhen Salted CX built this request.
expiresTimeThe time until which Your Logic has time to respond to this request — 150 seconds after time unless configured differently for the account. Salted CX may or may not provide additional grace period that you should not rely on and may change based on different conditions.
triggerObjectDescribes the event that caused this request to be sent to Your Logic. You can filter by trigger type and other properties whether you want to process the request.
accountIdUUIDUnique identifier of the account in Salted CX. It is the accountId of the Your Logic actions endpoint.
domainStringThe domain of the customer within Salted CX.
regionStringThe region in which the account has all the data.
customerObjectStructured information about the customer including custom data.
conversationObjectStructured information about the conversation including custom data.
engagementsArrayEngagements related to this conversation: the digital engagements, plus voice bot engagements for Completed Engagement. Call events carry the voice engagements instead. See Engagement below.
turnsArrayChronologically ordered turns of the digital engagements in engagements. See Turn below.

See example request JSON that you would receive.

{
  "requestId": "3c99280a-9871-4656-a472-5da68d30c01f",
  "accountId": "55dc08ff-3bfa-4635-bd2c-d9474ed4597c",
  "time": "2025-07-31T05:10:08.263515641Z",
  "expires": "2025-07-31T05:10:28.263515641Z",
  "trigger": {
    "time": "2025-07-31T05:10:07Z",
    "type": "MESSAGE",
    "participantType": "CUSTOMER",
    "content": "Order is still not delivered",
    "contentCustomer": "Order is still not delivered",
    "languageCustomer": "en",
    "contentAgent": "Order is still not delivered",
    "languageAgent": "en",
    "channel": "WHATSAPP",
    "attachments": [],
    "silent": false
  },
  "domain": "demo-development",
  "region": "eu",
  "customer": {
    "pid": "e00609f4-1fa5-44b1-ad43-84c59a3450ca",
    "displayName": "Adam Novak",
    "contacts": [
      {
	      "pid": "a6d165b8-0e91-432b-b6d2-ac8ec6d78dc7",
        "contact": "+420123456789",
        "type": "Phone"
      },
      {
	      "pid": "c6d165b8-0e91-432b-b6d2-ac8ec6d78dc7",
        "contact": "adam.novak@salted.cx",
        "type": "Email"
      }
    ]
  },
  "conversation": {
    "pid": "005ea483-5151-479d-842e-f5ef0a1fa5cc",
    "startConversationTime": "2025-07-31T05:09:24Z",
    "needsHelp": false,
    "status": "IN_PROGRESS",
    "defaultChannel": "WHATSAPP",
    "direction": "INBOUND",
    "languageCustomer": "en",
    "lastVisitedUrl": "https://help.demoadventures.com/article/12345",
    "brandId": "8a1b2c3d-0000-0000-0000-000000000001",
    "liveQueueAssignmentEnabled": false,
    "attributes": {
      "reasonExternalId": "late-delivery",
      "languageExternalId": "en"
    },
    
    "custom": {
	    "orderState": "In Progress",
	    "orderNumber": "ORD-1234",
	    "history": [
		    {
		    }
	    ]
    },
    
    "info": [
	    {
		    "title": "Help",
			   "text": "Manual",
			   "url": "https://help.demo-advetures.com"
	    }
    ]
  },
  "engagements": [
    {
      "pid": "615ea483-5151-479d-842e-f5ef0a1fa5cc",
      "time": "2025-07-31T05:09:24Z",
      "contactPid": "a6d165b8-0e91-432b-b6d2-ac8ec6d78dc7",
      "channel": "WHATSAPP",
      "type": "QUEUE",
      "status": "COMPLETED"
    },
    {
      "pid": "a142fb87-c5b7-4e9f-b047-34ab7c480ae6",
      "time": "2025-07-31T05:09:31.995513Z",
      "contactPid": "a6d165b8-0e91-432b-b6d2-ac8ec6d78dc7",
      "channel": "WHATSAPP",
      "type": "AGENT",
      "status": "IN_PROGRESS",
      "agent": {
        "pid": "732e8047-73ab-5ada-bd8e-b11b764f8b08",
	      "type": "BOT",
	      "email": "yourlogic@salted.cx",
	      "name": "Your Logic"
      }
    }
  ],
  "turns": [
    {
      "time": "2025-07-31T05:09:24Z",
      "engagementPid": "615ea483-5151-479d-842e-f5ef0a1fa5cc",
      "type": "MESSAGE",
      "participantType": "CUSTOMER",
      "content": "Parcel is gone",
      "contentCustomer": "Parcel is gone",
      "languageCustomer": "en",
      "contentAgent": "Parcel is gone",
      "languageAgent": "en",
      "status": "RECEIVED",
      "id": "893da24c-32c9-4bcd-959a-bf58ef779619",
      "pid": "a68d8992-1ad5-5c7d-97dc-95fe1344f6ce"
    },
    {
      "time": "2025-07-31T05:09:32.042590Z",
      "engagementPid": "a142fb87-c5b7-4e9f-b047-34ab7c480ae6",
      "type": "MESSAGE",
      "participantType": "BOT",
      "content": "I'm not sure I understand. Can you rephrase or provide more details?",
      "contentCustomer": "I'm not sure I understand. Can you rephrase or provide more details?",
      "languageCustomer": "en",
      "contentAgent": "I'm not sure I understand. Can you rephrase or provide more details?",
      "languageAgent": "en",
      "status": "VIEWED",
      "id": "043b40d0-96a4-4e9d-8d70-f4cd8bcceec5",
      "pid": "4688baf4-5c80-5b63-8d7f-c11c1fbe2d95"
    },
    {
      "time": "2025-07-31T05:10:07Z",
      "engagementPid": "a142fb87-c5b7-4e9f-b047-34ab7c480ae6",
      "type": "MESSAGE",
      "participantType": "CUSTOMER",
      "content": "Order is still not delivered",
      "contentCustomer": "Order is still not delivered",
      "languageCustomer": "en",
      "contentAgent": "Order is still not delivered",
      "languageAgent": "en",
      "status": "WAITING_FOR_ENRICHMENTS",
      "id": "3c99280a-9871-4656-a472-5da68d30c01f",
      "pid": "c2eb7856-7e9f-5d27-bac9-7b917604d69c"
    }
  ]
}

Customer

PropertyTypeDescription
pidUUIDIdentifier of the customer.
displayNameString, nullableName of the customer as shown to agents.
contactsArrayThe conversation's contact first, followed by the customer's other Phone and Email contacts. Each item has pid (use it as contactPid in actions), contact (the value) and type such as Phone, Email or Custom.

Conversation

PropertyTypeDescription
pidUUIDIdentifier of the conversation; it is the conversationPid of the actions endpoint.
startConversationTimeTimeWhen the conversation was created.
needsHelpBooleanWhether the conversation waits for an agent in Needs Help.
statusEnumOFFERED, IN_PROGRESS or COMPLETED.
defaultChannelEnumWHATSAPP, SALTED, EMAIL, VOICE, SMS, CUSTOM or WEB_FORM.
directionEnumINBOUND or OUTBOUND.
languageCustomerString, nullableThe customer's language as a two-letter ISO 639-1 code.
lastVisitedUrlString, nullableThe URL of the last known customer location in Universal Chat. This enables you to tailor the response to the content the customer is currently looking at.
brandIdUUID, nullableThe brand the conversation belongs to.
liveQueueAssignmentEnabledBooleanWhether Live Queue Assignment is switched on for the conversation.
customObject, nullableThe custom object last stored with the CONVERSATION_UPDATE action. See Custom Data.
infoArray, nullableThe agent sidebar information last stored with the CONVERSATION_UPDATE action; items have title, text and url.
attributesObject, nullableReporting attributes: attribute01ExternalId to attribute04ExternalId, caseExternalId, menuPathExternalId, outcomeExternalId, priorityExternalId, reasonExternalId and reasonCategoryExternalId, each with its …SourceId pair, plus languageExternalId. Attributes without a value are left out. The queue attributes are not sent.

Engagement

PropertyTypeDescription
pidUUIDIdentifier of the engagement.
timeTimeWhen the engagement was created.
contactPidUUIDThe customer contact the engagement runs on.
channelEnum, nullableThe channel of the engagement; same values as defaultChannel.
typeEnumQUEUE, AGENT, SUPERVISOR or INVITATION.
statusEnumIN_PROGRESS or COMPLETED.
agentObject, nullableThe engaged agent with pid, type (USER, BOT, EXTERNAL_AGENT or SYSTEM), email and name. Missing for queue engagements.
name
reasonCategory
reason
outcomeType
outcomeCategory
outcomePid
cost
nullableThe values set when the engagement was completed, for example with the ENGAGEMENT_COMPLETE action.

Turn

PropertyTypeDescription
id
pid
UUIDIdentifiers of the turn. Use id as responseTo in the NOTE action.
timeTimeWhen Salted CX received the turn.
engagementPidUUIDThe engagement the turn belongs to.
typeEnumMESSAGE, FILE, IMAGE, AUDIO, VIDEO, QUESTION, QUESTION_DYNAMIC, ANSWER, TEMPLATE, INVITE_EXTERNAL_AGENT, NOTE, ACTION, TALK, RECORDING_PAUSED, RECORDING_RESUMED, INFO_REQUEST, INFO_RESPONSE or UNKNOWN.
participantTypeEnumCUSTOMER, AGENT, EXTERNAL_AGENT, BOT or SYSTEM.
statusEnumWAITING_FOR_ENRICHMENTS, RECEIVED, SENT, DELIVERED, VIEWED, NOT_DELIVERED, INVALID or DELETED.
content
contentCustomer
languageCustomer
contentAgent
languageAgent
String, nullableThe text and its translations — see Message.
responseToIdUUID, nullableThe turn this turn responds to.
questionId
questionName
answerId
answerName
String, nullableThe question and the chosen answer of question and answer turns.
customerReactionString, nullableThe customer's reaction to the turn: THUMBS_UP, THUMBS_DOWN__NOT_HELPFUL, THUMBS_DOWN__CONFUSING or THUMBS_DOWN__OFFENSIVE.
mediaNameString, nullableName of the first attachment.
attachmentsArrayAttachments of the turn — see Attachment.
silentBooleantrue when Live Intelligence marked the message as one that needs no reply. Such a message does not reopen a completed conversation unless the account is configured to.

Attachment

PropertyTypeDescription
pidUUIDIdentifier of the attachment.
nameStringFile name.
mimeString (optional)MIME type of the file.
sizeInteger (optional)Size in bytes.
width
height
Integer (optional)Image dimensions in pixels.
urlString (optional)Download link, valid for 24 hours.

Trigger

The trigger has common properties.

PropertyTypeDescription
timeTimeThe time when the event happened in Salted CX.
typeStringThe type of the trigger. Values: MESSAGE, QUESTION, QUESTION_DYNAMIC, ANSWER, TEMPLATE, INVITE_EXTERNAL_AGENT, UNKNOWN, FILE, IMAGE, AUDIO, VIDEO, ACTION, REVIEW, ENGAGEMENT_COMPLETE, CONVERSATION_OFFERED, CONVERSATION_COMPLETE, CONVERSATION_INACTIVE, YOUR_LOGIC_DISENGAGED, CALL_START, CALL_END, CALL_PARTICIPANT_JOIN, CALL_PARTICIPANT_LEFT, CALL_RECORDING_PAUSE, CALL_RECORDING_RESUME, CALL_TRANSCRIPT.
participantTypeStringOnly on triggers caused by a turn (messages, files, answers and actions): CUSTOMER, AGENT or EXTERNAL_AGENT. Turns of bots, the system, notes and info turns are not sent to Your Logic. Call events use their own values, see Call Events.

Depending on the type of the trigger there are additional properties covering specifics of the trigger.

Triggers List

TriggerDescription
MESSAGEA customer, an agent or an external agent sent a text message, including an email. See Message.
QUESTIONAn agent sent a question defined in Salted CX to the customer. Same structure as Message, with questionId and questionName.
QUESTION_DYNAMICAn agent sent a question with dynamically built answers. Same structure as Message, with questionId and questionName.
ANSWERA customer or an agent chose an answer to a question. See Answer.
TEMPLATEAn agent sent an approved WhatsApp template to the customer. Same structure as Message.
INVITE_EXTERNAL_AGENTAn agent invited an external agent to the conversation. Same structure as Message.
UNKNOWNA participant sent content of a type Salted CX does not recognize. Same structure as Message.
FILEA participant sent a document or another file. See Send Files and Media.
IMAGEA participant sent an image. See Send Files and Media.
AUDIOA participant sent an audio recording, for example a voice message. See Send Files and Media.
VIDEOA participant sent a video. See Send Files and Media.
ACTIONAn agent pressed a custom action button in the desktop. See Action.
REVIEWThe customer reacted to a turn (for example with a thumbs down) or removed the reaction. See Review.
ENGAGEMENT_COMPLETEAn engagement was completed, for example an agent resolved or left the conversation. See Completed Engagement.
CONVERSATION_OFFEREDA conversation was offered to the customer before they sent anything. See Offered Conversation.
CONVERSATION_COMPLETEThe conversation and all its engagements were completed. See Completed Conversation.
CONVERSATION_INACTIVENothing happened in the conversation for the configured time. See Inactive Conversation.
YOUR_LOGIC_DISENGAGEDYour Logic was disengaged from the conversation, for example because it stopped responding. See Your Logic Disengaged.
CALL_STARTA voice call started. See Call Events.
CALL_ENDThe voice call ended. See Call Events.
CALL_PARTICIPANT_JOINA participant (customer, agent, bot or external party) connected to the call. See Call Events.
CALL_PARTICIPANT_LEFTA connected participant left the call. See Call Events.
CALL_RECORDING_PAUSEThe call recording was paused. See Call Events.
CALL_RECORDING_RESUMEThe call recording was resumed. See Call Events.
CALL_TRANSCRIPTA transcript of the call is available, from the call recording or from the voice bot. See Call Events.

Message

This request is sent when a customer, an agent or an external agent sends a message. Messages that Your Logic itself sent are not sent back to it.

PropertyTypeDescription
contentString (Optional)Content of the message translated to the account content language. The content is not available in case translation is not enabled. Also if Salted CX is unable to translate the message in a short timeframe for any reason (for example translation service issues).
contentCustomerString (Optional)The content in the customer's language — verbatim for customer messages, translated for agent messages.
languageCustomerString (Optional)Detected language of the customer message. Remember that the detection is not 100% accurate and the accuracy depends on many factors including the length of the message.
contentAgentString (Optional)The content in the agent's language — verbatim for agent messages, translated for customer messages.
languageAgentString (Optional)The language of contentAgent.
channelEnumThe channel the message was sent on, such as WHATSAPP, SALTED, EMAIL, SMS or CUSTOM.
agentUUID (Optional)The PID of the agent who sent the message; only when participantType is AGENT or EXTERNAL_AGENT.
subjectString (Optional)The subject of the message on the EMAIL and CUSTOM channels.
cc
bcc
Array of Strings (Optional)Recipients in copy and blind copy on the EMAIL channel.
responseToIdUUID (Optional)The turn this message replies to.
questionId
questionName
answerId
answerName
String (Optional)Set for question and answer turns — see Answer.
attachmentsArrayAttachments sent with the message, for example email attachments — see Attachment.
silentBooleantrue when Live Intelligence marked the message as one that needs no reply.
{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	"time": "2025-04-11T10:57:42Z",
	"expires": "2025-04-11T10:57:57Z",
	
	"domain": "company",
	"region": "eu",
	
	"trigger": {
		"time": "2025-04-11T10:57:42Z",
		"type": "MESSAGE",
		"participantType": "CUSTOMER",
		"channel": "EMAIL",
		"content": "Hello, how are you?",
		"contentCustomer": "Hola, qué tal?",
		"languageCustomer": "es",
		"contentAgent": "Hello, how are you?",
		"languageAgent": "en",
		"subject": "Re: Your order ORD-1234",
		"cc": ["partner@example.com"],
		"bcc": [],
		"responseToId": "043b40d0-96a4-4e9d-8d70-f4cd8bcceec5",
		"attachments": [
			{
				"pid": "7d1e2f3a-0000-0000-0000-000000000001",
				"name": "receipt.jpg",
				"mime": "image/jpeg",
				"size": 182044,
				"width": 1024,
				"height": 768,
				"url": "https://<signed download link>"
			}
		],
		"silent": false
	}
	
	/* rest of the event */
}

Message from Agent

You can use Your Logic to watch messages from agents. Agent messages carry the agent PID.

{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	"time": "2025-04-11T10:57:42Z",
	"expires": "2025-04-11T10:57:57Z",
	
	"domain": "company",
	"region": "eu",
	
	"trigger": {
		"time": "2025-04-11T10:57:42Z",
		"type": "MESSAGE",
		"participantType": "AGENT",
		"agent": "a7ac10b5-58cc-4372-a567-0e02b2c3d472",
		"channel": "WHATSAPP",
		"content": "How can I help you?",
		"contentAgent": "How can I help you?",
		"languageAgent": "en",
		"contentCustomer": "¿En qué puedo ayudarle?",
		"languageCustomer": "es",
		"attachments": [],
		"silent": false
	}
	
	/* rest of the event */
}

Send Files and Media

This request informs about media exchange. Salted CX also sends you a link to the file you can use to access the file data. The link to the media is valid for 24 hours.

Accounts can be configured to receive media as MESSAGE triggers instead; the files are then in attachments of the Message trigger.

PropertyTypeDescription
timeTimeWhen the turn was received or sent.
typeEnumFILE, IMAGE, AUDIO or VIDEO.
participantTypeString — CUSTOMER, AGENT, EXTERNAL_AGENTWho sent the file.
mediaNameStringThe name of the file.
mimeTypeStringMIME type of the file.
mediaLinkStringThe link to download the first file. The link is valid for 24 hours.
attachmentsArrayAll files of the turn — see Attachment.
{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	"time": "2025-04-11T10:57:42Z",
	"expires": "2025-04-11T10:57:57Z",
	
	"domain": "company",
	"region": "eu",
	
	"trigger": {
		"time": "2025-04-11T10:57:42Z",
		"type": "FILE",
		"participantType": "CUSTOMER",
		"mediaName": "invoice.pdf",
		"mimeType": "application/pdf",
		"mediaLink": "https://<signed download link>",
		"attachments": [
			{
				"pid": "7d1e2f3a-0000-0000-0000-000000000002",
				"name": "invoice.pdf",
				"mime": "application/pdf",
				"size": 52311,
				"url": "https://<signed download link>"
			}
		]
	}
	
	/* rest of the event */
}

Action

When an agent presses a button in Live Conversations Salted CX sends an event notifying Your Logic that it should perform an action with the given name. Salted CX is not aware what the action does.

The action is identified only by its name and does not contain any parameters. Your Logic implementation can retrieve any value from the context sent with the event.

PropertyTypeDescription
participantTypeEnumType of the participant who triggered an action.
AGENT
CUSTOMER
EXTERNAL_AGENT
agentPID (Optional)The identifier of the agent who triggered the action; only when participantType is AGENT or EXTERNAL_AGENT.
actionStringThe id of the custom desktop action that was triggered, or not-specified when it has none.
{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	"time": "2025-04-11T10:57:42Z",
	"expires": "2025-04-11T10:57:57Z",
	
	"domain": "company",
	"region": "eu",
	
	"trigger": {
		"time": "2025-04-11T10:57:42Z",
		"type": "ACTION",
		"participantType": "AGENT",
		"agent": "dac1c10b-58cc-4372-a567-0e02b2c3d479",
		"action": "schedule-followup-code"
	}
}

We recommend you send back at least a feedback to the agent using a note action to let them know that the action perfomed an operation. In some cases triggering an action can send a message also directly to the customer.

For example if an agent presses a button to create an internal task in an issue tracking system you can send the message with the link to that task in an external system. The following example shows how that can look in the customer journey:

Can you raise the issue with our account manager?

Maria triggered the action Create Internal Ticket

Created a related ticket in the issue tracker INTERNAL-1234

Sure. I have escalated the issue internally. We will keep you posted about any updates.

Answer

When a customer or an agent replies to a question. The trigger has the same structure as Message; these properties identify the answer:

PropertyTypeDescription
questionIdStringThe question PID for a QUESTION action, or the externalId of the question for a QUESTION_DYNAMIC action.
questionNameString (Optional)The question text.
answerIdStringThe identifier of the chosen answer — the externalId of the answer for dynamic questions.
answerNameString (Optional)The text of the chosen answer.
responseToIdUUID (Optional)The turn with the question.
agentUUID (Optional)The agent who answered; only when participantType is AGENT or EXTERNAL_AGENT.
{
	"trigger": {
		"time": "2025-04-11T10:57:42Z",
		"type": "ANSWER",
		"participantType": "CUSTOMER",
		"channel": "SALTED",
		"content": "Refund credits",
		"questionId": "refund-options",
		"questionName": "How would you like to be refunded?",
		"answerId": "refund-credits",
		"answerName": "Refund credits",
		"responseToId": "043b40d0-96a4-4e9d-8d70-f4cd8bcceec5",
		"attachments": [],
		"silent": false
	}
	
	/* rest of the event */
}

Review

When the customer reacts to a turn (for example with a thumbs down) or removes the reaction, Your Logic lets you know about it. This enables you to respond to customer feedback. For example if the customer is unhappy with the response from a bot you ask agents for help.

PropertyTypeDescription
reviewTypeStringCustomer.
questionNameStringCustomer's Reaction.
answerNameString (Optional)The reaction: THUMBS_UP, THUMBS_DOWN__NOT_HELPFUL, THUMBS_DOWN__CONFUSING or THUMBS_DOWN__OFFENSIVE. Missing when the reaction was removed.
statusStringCreated or Deleted.
reviewEngagementPidUUID (Optional)The engagement the review belongs to, when the turn was a question with reviewEngagementPid.
questionPid
answerPid
UUID (Optional)Not set for reactions.

The turn with the reaction is in turns with its customerReaction.

{
	"trigger": {
		"time": "2025-04-11T10:57:42Z",
		"type": "REVIEW",
		"reviewType": "Customer",
		"questionName": "Customer's Reaction",
		"answerName": "THUMBS_DOWN__NOT_HELPFUL",
		"status": "Created",
		"reviewEngagementPid": "a142fb87-c5b7-4e9f-b047-34ab7c480ae6"
	}
}

Completed Engagement

This request is sent when an engagement gets completed. Using this event you can detect that an agent considers their engagement done and Your Logic can take over control of the conversation. This is useful for example for closing the conversation — asking the customer whether their issue is resolved, how they are satisfied, etc.

The trigger has a single engagement property with the completed engagement — see Engagement. The request's engagements also include voice bot engagements. Engagements on which a voice bot only sent a text message or an email are completed without an event.

{
  "requestId": "a7b8c9d0-1234-5678-9abc-def012345678",
  "accountId": "550e8400-e29b-41d4-a716-446655440000",
  "time": "2025-11-05T14:30:00Z",
  "expires": "2025-11-05T15:30:00Z",
  "domain": "example.eu.salted.cx",
  "region": "eu",
  "trigger": {
    "type": "ENGAGEMENT_COMPLETE",
    "time": "2025-11-05T14:29:55Z",
    "engagement": {
      "pid": "d3e4f5a6-7890-1234-5678-90abcdef1234",
      "time": "2025-11-05T14:00:00Z",
      "contactPid": "a6d165b8-0e91-432b-b6d2-ac8ec6d78dc7",
      "channel": "SALTED",
      "agent": {
        "pid": "b1c2d3e4-5678-9012-3456-789012345678",
        "type": "USER",
        "email": "agent@example.com",
        "name": "John Smith"
      },
      "type": "AGENT",
      "status": "COMPLETED",
      "name": "Customer Support Chat",
      "reasonCategory": "Orders",
      "reason": "Late delivery",
      "outcomeType": "AGENT_RESOLVED",
      "outcomeCategory": "Resolved",
      "outcomePid": "e5f6a7b8-9012-3456-7890-123456789012",
      "cost": 5.50
    }
  }
}

Offered Conversation

This event notifies Your Logic that a conversation was offered to the customer. This means that a conversation is offered to the customer. This event is created in the moment before the customer sends any message, or other content.

Offered conversations enable Your Logic to send dynamic content to the customers at the very beginning of the conversations. While the conversation is in the Offered state Your Logic (and agents) can send any content as if the covnerssation was In Progress. Once the the customer sends any message or other content the conversation state is switched to In Progress state.

Conversations without the customer response that stay in offered state are hard deleted after a timeout. Offered conversations are not visible in reporting and analytics.

PropertyTypeDescription
conversationObjectThe conversation that was offered to the customer, with status OFFERED — see Conversation.
{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	"time": "2025-04-11T10:57:42Z",
	"expires": "2025-04-11T10:57:57Z",
	
	"trigger": {
		"time": "2025-04-11T10:57:42Z",
		"type": "CONVERSATION_OFFERED",
		"conversation": {
			"pid": "4644535e-5d63-4dd8-8018-528bf55fcbac",
			"startConversationTime": "2025-04-11T10:57:40Z",
			"needsHelp": false,
			"status": "OFFERED",
			"defaultChannel": "SALTED",
			"direction": "INBOUND",
			"lastVisitedUrl": "https://help.demoadventures.com/article/12345",
			"brandId": "8a1b2c3d-0000-0000-0000-000000000001",
			"liveQueueAssignmentEnabled": false,
			"custom": null
		}
	}
}

Completed Conversation

This event notifies Your Logic about a completed conversation.

PropertyTypeDescription
conversationObjectThe completed conversation, with status COMPLETED — see Conversation.
{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	"time": "2025-04-11T10:57:42Z",
	"expires": "2025-04-11T10:57:57Z",
	
	"trigger": {
		"time": "2025-04-11T10:57:42Z",
		"type": "CONVERSATION_COMPLETE",
		"conversation": {
			"pid": "4644535e-5d63-4dd8-8018-528bf55fcbac",
			"startConversationTime": "2025-04-11T09:12:03Z",
			"needsHelp": false,
			"status": "COMPLETED",
			"defaultChannel": "WHATSAPP",
			"direction": "INBOUND",
			"languageCustomer": "en",
			"brandId": "8a1b2c3d-0000-0000-0000-000000000001",
			"liveQueueAssignmentEnabled": false,
			"custom": { "orderNumber": "ORD-1234" },
			"attributes": { "outcomeExternalId": "resolved" },
			"info": []
		}
	}
}

Inactive Conversation

The event is sent to Your Logic when there is inactivity in a conversation for a setup time frame. This event enables you to respond to inactivity in the conversation without having to schedule tasks or maintain state in your implementation.

You can set up how often you receive inactive conversation events. The maximum frequency is every 15 minutes, but you can set up less frequent notifications or turn them off in Live Conversations settings.

We do our best to deliver the inactive conversation event at latest within 1 minute after a given time period passes. So for 15 minute time internal you should receive the first inactive conversation event latest 16 minutes after the inactivity started.

PropertyTypeDescription
conversationPidUUIDThe inactive conversation.
lastActiveTimeTimeThe time of the last activity in the conversation.
{
	"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
	"time": "2025-04-11T10:57:42Z",
	"expires": "2025-04-11T10:57:57Z",

	"trigger": {
		"time": "2025-04-11T10:57:42Z",
		"type": "CONVERSATION_INACTIVE",
		"conversationPid": "4644535e-5d63-4dd8-8018-528bf55fcbac",
		"lastActiveTime": "2025-04-11T10:57:42Z"
	}
}

Your Logic Disengaged

This event is sent when Your Logic is disengaged from the conversation. A typical cause is that Your Logic became unresponsive. Salted CX sends this event to give Your Logic the chance to reengage in the conversation. It is the only event delivered while Your Logic is disengaged, and its trigger has no other properties than time and type.

{
    "requestId" : "5b1f0c2e-9d3a-5c4e-8f7a-2d6b1e9c0a41",
    "accountId" : "3f2b9c1a-7d4e-4b8a-9c6d-1e2f3a4b5c6d",
    "time" : "2026-09-03T09:41:12.318Z",
    "expires" : "2026-09-03T09:41:22.318Z",
    "trigger" : {
      "time" : "2026-09-03T09:41:12.318Z",
      "type" : "YOUR_LOGIC_DISENGAGED"
    }
}

To re-engage in the conversation, respond to this event with the Engage Your Logic action. Reengaging only means that Your Logic receives all the events it does not do anything else. If the conversation fell into Needs Help in Live Conversations it stays there unless the bot explicitly removes it.

Before you reengage, check the conversation's current state. For example, you can check whether the conversation is waiting in Needs Help and remove it so agents don’t join it.

Call Events

Call events tell Your Logic what happens on a voice call. They are switched off by default and are enabled per account. Unlike the other events, call events are not sequenced with the conversation's other events: each is delivered once with a one-second deadline and is not retried when Your Logic does not answer in time. You may still respond to a call event with actions using its requestId.

The request's engagements contain the conversation's voice engagements.

TriggerWhen it is sent
CALL_STARTA voice call started.
CALL_ENDThe voice call ended.
CALL_PARTICIPANT_JOINA participant connected to the call.
CALL_PARTICIPANT_LEFTA connected participant left the call. Participants who never connected produce no event.
CALL_RECORDING_PAUSEThe call recording was paused, for example while the customer gives payment details.
CALL_RECORDING_RESUMEThe call recording was resumed after a pause.
CALL_TRANSCRIPTA transcript of the call is available — from the call recording or from the voice bot.
PropertyTypeDescription
conferencePidUUIDIdentifier of the call.
engagementPidUUID (Optional)The engagement of the participant, or the engagement the recording or transcript belongs to.
participantPidUUID (Optional)The participant who joined or left; only on CALL_PARTICIPANT_JOIN and CALL_PARTICIPANT_LEFT.
participantTypeString (Optional)Customer, Agent, Bot or External; only on participant events.
modeString (Optional)How an agent takes part: Engagement, Listen or Whisper; only for agents.
agentPidUUID (Optional)The agent who joined or left.
turnsArray (Optional)The transcript turns in transcript order — see Turn; only on CALL_TRANSCRIPT.
{
	"requestId": "0c5a9e7d-8f21-5b3c-9d44-1a2b3c4d5e6f",
	"time": "2025-04-11T10:57:42Z",
	"expires": "2025-04-11T11:00:12Z",
	
	"trigger": {
		"time": "2025-04-11T10:57:41Z",
		"type": "CALL_PARTICIPANT_JOIN",
		"conferencePid": "9b8a7c6d-0000-0000-0000-000000000001",
		"engagementPid": "d3e4f5a6-7890-1234-5678-90abcdef1234",
		"participantPid": "5e6f7a8b-0000-0000-0000-000000000002",
		"participantType": "Agent",
		"mode": "Engagement",
		"agentPid": "b1c2d3e4-5678-9012-3456-789012345678"
	}
	
	/* rest of the event */
}
{
	"trigger": {
		"time": "2025-04-11T11:05:10Z",
		"type": "CALL_TRANSCRIPT",
		"conferencePid": "9b8a7c6d-0000-0000-0000-000000000001",
		"engagementPid": "d3e4f5a6-7890-1234-5678-90abcdef1234",
		"turns": [
			{
				"time": "2025-04-11T10:58:02Z",
				"engagementPid": "d3e4f5a6-7890-1234-5678-90abcdef1234",
				"type": "TALK",
				"participantType": "CUSTOMER",
				"content": "My order has not arrived yet.",
				"status": "RECEIVED",
				"id": "1a2b3c4d-0000-0000-0000-000000000003",
				"attachments": [],
				"silent": false
			}
		]
	}
	
	/* rest of the event */
}

Custom Data

The Conversation object has a custom JSON object, which Your Logic stores with the CONVERSATION_UPDATE action. This object can hold any data that you need to handle the conversation. Unlike the rest of the JSON, the structure of this object is not restricted and may contain any keys and values of any type.

The custom data object size is limited to 1kB. The object is not intended to contain large complex data. If you need large data associated with the conversation, store a reference to the data in the custom object and store the actual referenced data in your infrastructure.

Each CONVERSATION_UPDATE replaces the whole stored object, so always send the complete object with all values set to the latest state. Your Logic stores the custom data in its response to an event:

{
  "requestId": "3c99280a-9871-4656-a472-5da68d30c01f",
  "actions": [
    {
      "type": "CONVERSATION_UPDATE",
      "custom": {
        "orderNumber": "ORD-1234",
        "orderState": "In Progress",
        "refundOffered": false,
        "step": "waiting-for-tracking-number",
        "ordersInProgress": ["ORD-1234", "ORD-1240"]
      }
    }
  ]
}

Every following event of the conversation carries the stored object in conversation.custom, so Your Logic can continue where it left off without keeping its own state:

{
  "requestId": "7e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b",
  "trigger": {
    "time": "2025-07-31T05:12:41Z",
    "type": "MESSAGE",
    "participantType": "CUSTOMER",
    "content": "The tracking number is 1Z999AA10123456784"
  },
  "conversation": {
    "pid": "005ea483-5151-479d-842e-f5ef0a1fa5cc",
    "status": "IN_PROGRESS",
    "custom": {
      "orderNumber": "ORD-1234",
      "orderState": "In Progress",
      "refundOffered": false,
      "step": "waiting-for-tracking-number",
      "ordersInProgress": ["ORD-1234", "ORD-1240"]
    }
  }

  /* rest of the event */
}

Copy section link

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