Conversion Action

You need the Manage Settings permission to Manage Conversion.

Conversion Actions
- Conversion Actions Manage
GET livechat/conversionActions
GET livechat/conversionActions/{id}
POST livechat/conversionActions
PUT livechat/conversionActions/{id}
DELETE livechat/conversionActions/{id}
Model
Conversion Action JSON Format

Conversion Action is represented as simple flat JSON objects with the following keys:

Name Type Description
id guid Id of the conversion.
name string Name of the conversion.
isEnabled bool Whether conversion action is enabled or not.
type string Allowed values are "URL", "customVariable", "API".
operator string Allowed values are "is", "beginsWith", "contains", "regularExpression".
valueSource string Allowed values are "inputAValue", "getFromCustomVariable".
chatAssociatedWithConversion string Allowed values are "theFirstChat", "theLastChat".
value string The value assigned for the conversion action.
isCaseSensitive bool Whether conversion action is case sensitive or not, available when "type" is "url".
usedToDetermineConversionCustomVariableId guid The ID of the custom variable,available when type is customVariable.
isValueAssignedToConversion bool Whether a value is assigned for the conversion action or not.
assignedValueFromInputting float The value assigned for the conversion action.
assignedValueFromCustomVariableId guid Value comes from the custom variable.
isChatInLastCertainDaysConsidered bool Whether check chat in last certain days considered.
chatInLastDays integer Chat in last days.
isChatWithAtLeastCertainVisitorMessagesConsidered bool Whether check chat with at least certain visitor messages considered.
isVariableIncludedInTranscript bool Whether variable is included in transcript or not.
visitorMessagesAtLeast integer The minimum count of messages that chats will be considered.
appendFieldList string [] The field list to append to the chat transcript when this conversion actions takes place.
Endpoint
Get the list of Conversion Actions

GET livechat/conversionActions

Parameters:
No Parameters
Response:

An array of   Conversion Action

Example

Sample Request:

curl https://api15.comm100.io/v4/livechat/conversionActions \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"conversionActions":[{"id":"CEB15329-7C46-EB11-8100-00155D081D0B","name":"Carl","isEnabled":true,"type":"","operator":"","valueSource":"","chatAssociatedWithConversion":"","value":"url","isCaseSensitive":true,"usedToDetermineConversionCustomVariableId":"15B05329-7C46-EB11-8100-00155D081D0B","isValueAssignedToConversion":true,"assignedValueFromInputting":332.0,"assignedValueFromCustomVariableId":"19B05329-7C46-EB11-8100-00155D081D0B","isChatInLastCertainDaysConsidered":false,"chatInLastDays":1,"isChatWithAtLeastCertainVisitorMessagesConsidered":false,"isVariableIncludedInTranscript":true,"visitorMessagesAtLeast":1,"appendFieldList":[""]}],"nextPage":null,"previousPage":null,"total":1}
Get a single Conversion Action

GET livechat/conversionActions/{id}

Parameters:
No Parameters
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/livechat/conversionActions/CEB15329-7C46-EB11-8100-00155D081D0B \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"id":"CEB15329-7C46-EB11-8100-00155D081D0B","name":"Carl","isEnabled":true,"type":"","operator":"","valueSource":"","chatAssociatedWithConversion":"","value":"url","isCaseSensitive":true,"usedToDetermineConversionCustomVariableId":"15B05329-7C46-EB11-8100-00155D081D0B","isValueAssignedToConversion":true,"assignedValueFromInputting":332.0,"assignedValueFromCustomVariableId":"19B05329-7C46-EB11-8100-00155D081D0B","isChatInLastCertainDaysConsidered":false,"chatInLastDays":1,"isChatWithAtLeastCertainVisitorMessagesConsidered":false,"isVariableIncludedInTranscript":true,"visitorMessagesAtLeast":1,"appendFieldList":[""]}
Create a new Conversion Action

POST livechat/conversionActions

Parameters:
Name Type In Required Description
name string body yes Name of the conversion.
isEnabled bool body no Whether conversion action is enabled or not.
type string body no Allowed values are "URL", "customVariable", "API".
operator string body yes Allowed values are "is", "beginsWith", "contains", "regularExpression".
valueSource string body no Allowed values are "inputAValue", "getFromCustomVariable".
chatAssociatedWithConversion string body yes Allowed values are "theFirstChat", "theLastChat".
value string body yes The value assigned for the conversion action.
isCaseSensitive bool body no Whether conversion action is case sensitive or not, available when "type" is "url".
usedToDetermineConversionCustomVariableId guid body yes The ID of the custom variable,available when type is customVariable.
isValueAssignedToConversion bool body no Whether a value is assigned for the conversion action or not.
assignedValueFromInputting float body no The value assigned for the conversion action.
assignedValueFromCustomVariableId guid body yes Value comes from the custom variable.
isChatInLastCertainDaysConsidered bool body no Whether check chat in last certain days considered.
chatInLastDays integer body no Chat in last days.
isChatWithAtLeastCertainVisitorMessagesConsidered bool body no Whether check chat with at least certain visitor messages considered.
isVariableIncludedInTranscript bool body no Whether variable is included in transcript or not.
visitorMessagesAtLeast integer body no The minimum count of messages that chats will be considered.
appendFieldList string [] body no The field list to append to the chat transcript when this conversion actions takes place.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/livechat/conversionActions \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"name":"Carl","isEnabled":true,"type":"","operator":"","valueSource":"","chatAssociatedWithConversion":"","value":"url","isCaseSensitive":true,"usedToDetermineConversionCustomVariableId":"15B05329-7C46-EB11-8100-00155D081D0B","isValueAssignedToConversion":true,"assignedValueFromInputting":332.0,"assignedValueFromCustomVariableId":"19B05329-7C46-EB11-8100-00155D081D0B","isChatInLastCertainDaysConsidered":false,"chatInLastDays":1,"isChatWithAtLeastCertainVisitorMessagesConsidered":false,"isVariableIncludedInTranscript":true,"visitorMessagesAtLeast":1,"appendFieldList":[""]}'

Response:

 HTTP/1.1 201 Created

{"id":"CEB15329-7C46-EB11-8100-00155D081D0B","name":"Carl","isEnabled":true,"type":"","operator":"","valueSource":"","chatAssociatedWithConversion":"","value":"url","isCaseSensitive":true,"usedToDetermineConversionCustomVariableId":"15B05329-7C46-EB11-8100-00155D081D0B","isValueAssignedToConversion":true,"assignedValueFromInputting":332.0,"assignedValueFromCustomVariableId":"19B05329-7C46-EB11-8100-00155D081D0B","isChatInLastCertainDaysConsidered":false,"chatInLastDays":1,"isChatWithAtLeastCertainVisitorMessagesConsidered":false,"isVariableIncludedInTranscript":true,"visitorMessagesAtLeast":1,"appendFieldList":[""]}
Update the Conversion Action

PUT livechat/conversionActions/{id}

Parameters:
Name Type In Required Description
name string body yes Name of the conversion.
isEnabled bool body no Whether conversion action is enabled or not.
type string body no Allowed values are "URL", "customVariable", "API".
operator string body yes Allowed values are "is", "beginsWith", "contains", "regularExpression".
valueSource string body no Allowed values are "inputAValue", "getFromCustomVariable".
chatAssociatedWithConversion string body yes Allowed values are "theFirstChat", "theLastChat".
value string body yes The value assigned for the conversion action.
isCaseSensitive bool body no Whether conversion action is case sensitive or not, available when "type" is "url".
usedToDetermineConversionCustomVariableId guid body yes The ID of the custom variable,available when type is customVariable.
isValueAssignedToConversion bool body no Whether a value is assigned for the conversion action or not.
assignedValueFromInputting float body no The value assigned for the conversion action.
assignedValueFromCustomVariableId guid body yes Value comes from the custom variable.
isChatInLastCertainDaysConsidered bool body no Whether check chat in last certain days considered.
chatInLastDays integer body no Chat in last days.
isChatWithAtLeastCertainVisitorMessagesConsidered bool body no Whether check chat with at least certain visitor messages considered.
isVariableIncludedInTranscript bool body no Whether variable is included in transcript or not.
visitorMessagesAtLeast integer body no The minimum count of messages that chats will be considered.
appendFieldList string [] body no The field list to append to the chat transcript when this conversion actions takes place.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/livechat/conversionActions/CEB15329-7C46-EB11-8100-00155D081D0B \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"name":"Carl","isEnabled":true,"type":"","operator":"","valueSource":"","chatAssociatedWithConversion":"","value":"url","isCaseSensitive":true,"usedToDetermineConversionCustomVariableId":"15B05329-7C46-EB11-8100-00155D081D0B","isValueAssignedToConversion":true,"assignedValueFromInputting":332.0,"assignedValueFromCustomVariableId":"19B05329-7C46-EB11-8100-00155D081D0B","isChatInLastCertainDaysConsidered":false,"chatInLastDays":1,"isChatWithAtLeastCertainVisitorMessagesConsidered":false,"isVariableIncludedInTranscript":true,"visitorMessagesAtLeast":1,"appendFieldList":[""]}'

Response:

 HTTP/1.1 200 OK

{"id":"CEB15329-7C46-EB11-8100-00155D081D0B","name":"Carl","isEnabled":true,"type":"","operator":"","valueSource":"","chatAssociatedWithConversion":"","value":"url","isCaseSensitive":true,"usedToDetermineConversionCustomVariableId":"15B05329-7C46-EB11-8100-00155D081D0B","isValueAssignedToConversion":true,"assignedValueFromInputting":332.0,"assignedValueFromCustomVariableId":"19B05329-7C46-EB11-8100-00155D081D0B","isChatInLastCertainDaysConsidered":false,"chatInLastDays":1,"isChatWithAtLeastCertainVisitorMessagesConsidered":false,"isVariableIncludedInTranscript":true,"visitorMessagesAtLeast":1,"appendFieldList":[""]}
Remove the Conversion Action

DELETE livechat/conversionActions/{id}

Parameters:
No Parameters
Response:

No Content

Example

Sample Request:

curl https://api15.comm100.io/v4/livechat/conversionActions/CEB15329-7C46-EB11-8100-00155D081D0B \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 204 No Content