Conversion Action
  • 05 Dec 2023
  • 5 Minutes to read
  • Dark
    Light

Conversion Action

  • Dark
    Light

Article summary

Conversion Action

You need the Manage Settings permission to Manage Conversion.

Conversion Action JSON Format

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

NameTypeDescription
idguidId of the conversion.
namestringName of the conversion.
isEnabledboolWhether conversion action is enabled or not.
typestringAllowed values are "URL", "customVariable", "API".
operatorstringAllowed values are "is", "beginsWith", "contains", "regularExpression".
valueSourcestringAllowed values are "inputAValue", "getFromCustomVariable".
chatAssociatedWithConversionstringAllowed values are "theFirstChat", "theLastChat".
valuestringThe value assigned for the conversion action.
isCaseSensitiveboolWhether conversion action is case sensitive or not, available when "type" is "url".
usedToDetermineConversionCustomVariableIdguidThe ID of the custom variable,available when type is customVariable.
isValueAssignedToConversionboolWhether a value is assigned for the conversion action or not.
assignedValueFromInputtingfloatThe value assigned for the conversion action.
assignedValueFromCustomVariableIdguidValue comes from the custom variable.
isChatInLastCertainDaysConsideredboolWhether check chat in last certain days considered.
chatInLastDaysintegerChat in last days.
isChatWithAtLeastCertainVisitorMessagesConsideredboolWhether check chat with at least certain visitor messages considered.
isVariableIncludedInTranscriptboolWhether variable is included in transcript or not.
visitorMessagesAtLeastintegerThe minimum count of messages that chats will be considered.
appendFieldListstring []The field list to append to the chat transcript when this conversion actions takes place.

Get the list of Conversion Actions

GET livechat/conversionActions

  • Parameters:

No Parameters

  • Response:

An array of Conversion Action

  • Example

Sample Request:

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

Response:

HTTP/1.1 200 OK

{
  "conversionActions": [
      {
          "id": "38ae462f-7f73-454b-a6f4-b39cebace826",
          "name": "1123",
          "isEnabled": true,
          "type": "API",
          "operator": "is",
          "value": "",
          "isCaseSensitive": true,
          "usedToDetermineConversionCustomVariableId": "00000000-0000-0000-0000-000000000000",
          "isValueAssignedToConversion": false,
          "valueSource": "inputAValue",
          "assignedValueFromInputting": 4.00,
          "assignedValueFromCustomVariableId": "00000000-0000-0000-0000-000000000000",
          "chatAssociatedWithConversion": "theFirstChat",
          "isChatInLastCertainDaysConsidered": false,
          "chatInLastDays": 1,
          "isChatWithAtLeastCertainVisitorMessagesConsidered": false,
          "visitorMessagesAtLeast": 1,
          "isVariableIncludedInTranscript": false,
          "appendFieldList": [],
          "isDeleted": false
      }
  ],
  "nextPage": null,
  "previousPage": null,
  "total": 1
}

Get a single Conversion Action

GET livechat/conversionActions/{id}

  • Parameters:

No Parameters

  • Response:

Conversion Action

  • Example

Sample Request:

curl https://api11.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:

NameTypeinRequiredDescription
namestringbodyyesName of the conversion.
isEnabledboolbodynoWhether conversion action is enabled or not.
typestringbodynoAllowed values are "URL", "customVariable", "API".
operatorstringbodyyesAllowed values are "is", "beginsWith", "contains", "regularExpression".
valueSourcestringbodynoAllowed values are "inputAValue", "getFromCustomVariable".
chatAssociatedWithConversionstringbodyyesAllowed values are "theFirstChat", "theLastChat".
valuestringbodyyesThe value assigned for the conversion action.
isCaseSensitiveboolbodynoWhether conversion action is case sensitive or not, available when "type" is "url".
usedToDetermineConversionCustomVariableIdguidbodyyesThe ID of the custom variable,available when type is customVariable.
isValueAssignedToConversionboolbodynoWhether a value is assigned for the conversion action or not.
assignedValueFromInputtingfloatbodynoThe value assigned for the conversion action.
assignedValueFromCustomVariableIdguidbodyyesValue comes from the custom variable.
isChatInLastCertainDaysConsideredboolbodynoWhether check chat in last certain days considered.
chatInLastDaysintegerbodynoChat in last days.
isChatWithAtLeastCertainVisitorMessagesConsideredboolbodynoWhether check chat with at least certain visitor messages considered.
isVariableIncludedInTranscriptboolbodynoWhether variable is included in transcript or not.
visitorMessagesAtLeastintegerbodynoThe minimum count of messages that chats will be considered.
appendFieldListstring []bodynoThe field list to append to the chat transcript when this conversion actions takes place.
  • Response:

Conversion Action

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/conversionActions \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"name": "1000","isEnabled": true,"type": "API","operator": "is","value": "","isCaseSensitive": true,"usedToDetermineConversionCustomVariableId": "00000000-0000-0000-0000-000000000000","isValueAssignedToConversion": false,"valueSource": "inputAValue","assignedValueFromInputting": 4.00,"assignedValueFromCustomVariableId": "00000000-0000-0000-0000-000000000000","chatAssociatedWithConversion": "theFirstChat","isChatInLastCertainDaysConsidered": false,"chatInLastDays": 1,"isChatWithAtLeastCertainVisitorMessagesConsidered": false,"visitorMessagesAtLeast": 1,"isVariableIncludedInTranscript": false,"appendFieldList": [],"isDeleted": false}' 

Response:

HTTP/1.1 201 Created

{
  "id": "6f4abec8-8e62-412d-9c8f-823f2221814b",
  "name": "1000",
  "isEnabled": true,
  "type": "API",
  "operator": "is",
  "value": "",
  "isCaseSensitive": true,
  "usedToDetermineConversionCustomVariableId": "00000000-0000-0000-0000-000000000000",
  "isValueAssignedToConversion": false,
  "valueSource": "inputAValue",
  "assignedValueFromInputting": 4.00,
  "assignedValueFromCustomVariableId": "00000000-0000-0000-0000-000000000000",
  "chatAssociatedWithConversion": "theFirstChat",
  "isChatInLastCertainDaysConsidered": false,
  "chatInLastDays": 1,
  "isChatWithAtLeastCertainVisitorMessagesConsidered": false,
  "visitorMessagesAtLeast": 1,
  "isVariableIncludedInTranscript": false,
  "appendFieldList": [],
  "isDeleted": false
}

Update the Conversion Action

PUT livechat/conversionActions/{id}

  • Parameters:

NameTypeinRequiredDescription
namestringbodyyesName of the conversion.
isEnabledboolbodynoWhether conversion action is enabled or not.
typestringbodynoAllowed values are "URL", "customVariable", "API".
operatorstringbodyyesAllowed values are "is", "beginsWith", "contains", "regularExpression".
valueSourcestringbodynoAllowed values are "inputAValue", "getFromCustomVariable".
chatAssociatedWithConversionstringbodyyesAllowed values are "theFirstChat", "theLastChat".
valuestringbodyyesThe value assigned for the conversion action.
isCaseSensitiveboolbodynoWhether conversion action is case sensitive or not, available when "type" is "url".
usedToDetermineConversionCustomVariableIdguidbodyyesThe ID of the custom variable,available when type is customVariable.
isValueAssignedToConversionboolbodynoWhether a value is assigned for the conversion action or not.
assignedValueFromInputtingfloatbodynoThe value assigned for the conversion action.
assignedValueFromCustomVariableIdguidbodyyesValue comes from the custom variable.
isChatInLastCertainDaysConsideredboolbodynoWhether check chat in last certain days considered.
chatInLastDaysintegerbodynoChat in last days.
isChatWithAtLeastCertainVisitorMessagesConsideredboolbodynoWhether check chat with at least certain visitor messages considered.
isVariableIncludedInTranscriptboolbodynoWhether variable is included in transcript or not.
visitorMessagesAtLeastintegerbodynoThe minimum count of messages that chats will be considered.
appendFieldListstring []bodynoThe field list to append to the chat transcript when this conversion actions takes place.
  • Response:

Conversion Action

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/conversionActions/CEB15329-7C46-EB11-8100-00155D081D0B \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"name": "testapi","isEnabled": false,"type": "URL","usedToDetermineConversionCustomVariableId": "a42fc7da-26e7-403f-8370-306fd005d478","operator": "is","value": "12","isCaseSensitive": true,"isValueAssignedToConversion": false,"valueSource": "inputAValue","chatAssociatedWithConversion": "theFirstChat","isChatInLastCertainDaysConsidered": false,"chatInLastDays": 1,"isChatWithAtLeastCertainVisitorMessagesConsidered": false,"visitorMessagesAtLeast": 1,"isVariableIncludedInTranscript": false,"appendFieldList": [],"id": "5d9918c4-6b23-4889-b16d-947778a5cf4f","assignedValueFromInputting": 1,"assignedValueFromCustomVariableId": "00000000-0000-0000-0000-000000000000","isDeleted": false}' 

Response:

HTTP/1.1 200 OK

{
  "id": "5d9918c4-6b23-4889-b16d-947778a5cf4f",
  "name": "testapi",
  "isEnabled": false,
  "type": "URL",
  "operator": "is",
  "value": "12",
  "isCaseSensitive": true,
  "usedToDetermineConversionCustomVariableId": "a42fc7da-26e7-403f-8370-306fd005d478",
  "isValueAssignedToConversion": false,
  "valueSource": "inputAValue",
  "assignedValueFromInputting": 1.00,
  "assignedValueFromCustomVariableId": "00000000-0000-0000-0000-000000000000",
  "chatAssociatedWithConversion": "theFirstChat",
  "isChatInLastCertainDaysConsidered": false,
  "chatInLastDays": 1,
  "isChatWithAtLeastCertainVisitorMessagesConsidered": false,
  "visitorMessagesAtLeast": 1,
  "isVariableIncludedInTranscript": false,
  "appendFieldList": [],
  "isDeleted": false
}

Remove the Conversion Action

DELETE livechat/conversionActions/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

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

Response:

HTTP/1.1 204 No Content

Mark API Conversion Successful

POST livechat/conversionActions/achieved

  • Parameters:

NameTypeinRequiredDescription
namestringbodyyesName of the conversion.
visitorGuidguidbodyyesIdentifier of visitor, visitor must be online.
valuedoublebodynoThe value assigned for the conversion action.
  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/conversionActions/achieved \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"name": "xxxxx","value": 0,"visitorGuid":"00000000-0000-0000-0000-000000000000": }' 

Response:

HTTP/1.1 200 OK


Was this article helpful?