Create/Import Case

Creates a Case in Social Gateway.

POST /api/v2/case

A Case represents a ticket, task or interaction that the company has with a Contact. A case represents a unit of work for a contact center representative or community manager. Cases can be either Open or Closed. They can be assigned to people, groups of people or left pending in the global inbox.

Cases can be synchronized with existing activities in external CRMs, Quality Control tools, Marketing automation systems, etc.

Using the Cases API you can feed your CRM or Marketing tools with the activity in Social Networks, emails, chats and any communication channel you plugged into Social Gateway.

Input Parameters

Name Type Description
campaign string The name of the campaign this case is created for
contact_id string Id of the contact this case is created for
subject string Title of the case
source string The channel to start the case on
private boolean The initial type of communication
note string Text note to be associated with the Case (supports multiple values)
tag string Tag to be associated with the Case (supports multiple values)
echo_data string If set to true, SG will send over a data attribute in the response with the whole newly created object.
<any_attribute_name> string Additional dynamic attributes can be added by simply passing them on.

Response Sample

Status: 200 OK
{
  "success": true,
  "case_id": 203
}

Response Sample with echo_data

Status: 200 OK
{
  "success": true,
  "case_id": 203,
  "data": {
    "id": 203,
    "first_open_date": "2015-03-16T22:13:03-0300",
    "reopened": false,
    "last_open_date": "2015-03-16T22:13:03-0300",
    "inbox_date": "2015-03-17T08:00:00-0300",
    "campaign": {
      "id": 2,
      "name": "gg"
    },
    "source": "email",
    "private": true,
    "subject": "Necesito ayuda !!!",
    "contact": {
      "id": 43,
      "name": "Juan Perez",
      "first_name": "Juan",
      "last_name": "Perez",
      "client_id": "4234534625",
      "extended_value": "53242354352253",
      "cases": 3,
      "profiles": [
        {
          "id": 113,
          "source": "email",
          "name": "Juan Perez",
          "ext_id": "jp@socialgateway.net",
          "user_name": "aram@socialgateway.net",
          "tags": [
            "spam"
          ],
          "creation_date": "2015-02-20T16:32:51-0300",
          "update_date": "2015-05-11T15:53:54-0300",
          "updated_by": "api"
        },
        {
          "id": 292,
          "source": "twitter",
          "name": "Juan Perez",
          "ext_id": "42416688",
          "user_name": "juanperez7010",
          "image_url": "http://pbs.twimg.com/profile_images/542701207/165901190_9e133991fb_o_normal.jpg",
          "about": "",
          "location": "Mexico",
          "followers": 436,
          "following": 2000,
          "creation_date": "2015-05-11T16:03:57-0300"
        },
        {
          "id": 5,
          "source": "facebook",
          "name": "Gatu Bela",
          "ext_id": "100003438147119",
          "user_name": "gatu.bela.129",
          "gender": "female",
          "image_url": "http://graph.facebook.com/100003438147119/picture",
          "tags": [
            "aaaee"
          ],
          "creation_date": "2015-01-08T00:39:42-0300",
          "update_date": "2015-05-11T16:04:55-0300",
          "updated_by": "support"
        }
      ],
      "url": "http://master.local2.socialgateway.net:8080/contact/43",
      "tags": [
        "spam"
      ],
      "notes": [
        {
          "date": 1431371012000,
          "text": "este cliente es ficticio",
          "userName": "support"
        }
      ],
      "creation_date": "2015-02-20T16:32:51-0300",
      "update_date": "2015-05-11T16:03:57-0300",
      "updated_by": "support"
    },
    "state": "Arrived",
    "credits": 0,
    "we_did_not_reply_since_date": "2015-03-16T22:13:03-0300",
    "handling_ms": 0,
    "sla_seconds": 259200,
    "messages_sent": 0,
    "messages_received": 1,
    "messages": 1,
    "url": "http://master.local2.socialgateway.net:8080/case/203",
    "tags": [
      "spam"
    ],
    "creation_date": "2015-03-19T00:35:28-0300",
    "update_date": "2015-05-11T16:03:57-0300",
    "updated_by": "support"
  }
}