Use Lime Go's GraphQL API to search for and update data related to Deals

Available data

This is the only data that can be requested from our API. If you have any additional wishes, please contact us.

KeyDescription
idId of the deal
nameName of the deal
customerNameName of the organization the deal belongs to
statusStatus the deal belongs to
sourceSource of the deal
tagsTags on the deal
responsibleCoworkerCoworker responsible for the deal (id, name, email and phoneNumber)
customFieldsCustom fields on the deal (title, type and value)
CustomerOrganization the deal belongs to. Contains the same data as available when fetching Organizations

Queries

The available queries for fetching data from a deal.

Get a specific deal by id.

deal(id: 850851) {
  id
  name
  customerName
  status
  source
  responsibleCoworker {
		id
  	name
  	email
  	phoneNumber
	}
	customer {
    id
    name
    city
    email
    phoneNumber
    organizationNumber
    responsibleCoworker {
      id
      name
      email
      phoneNumber
    }
    customFields {
      title
      type
      value
    }
    integrationId
    temperature
    customerRelation
    tags
	}
  tags
	customFields {
  	title
    type
    value
  }
}
{
  "data": {
    "deal": {
      "id": 850851,
      "name": "Big Deal",
      "customerName": "Lime Technologies Sweden AB",
      "status": "ORDER",
      "source": "Upselling",
      "responsibleCoworker": {
				"id": 2343,
  			"name" : "Max Nyman",
  			"email": "[email protected]",
  			"phoneNumber": "046-2704800"
			},
      "customer": {
        "id": "pase106797",
        "name": "Lime Technologies Sweden AB",
        "city": "LUND",
        "email": "[email protected]",
        "phoneNumber": [
          "046-2704800"
        ],
        "organizationNumber" : "23235-23123",
        "responsibleCoworker": {
          "id": 2343,
          "name" : "Max Nyman",
          "email": "[email protected]",
          "phoneNumber": "046-2704800"
        },
        customFields: [
          {
            "title": "Social Media Link",
            "type": "Link",
            "value": "https://www.linkedin.com/company/limetechnologies"
          }
        ],
        "integrationId": 2344,
        "temperature": 66.98342680275138,
        "customerRelation": "IS_A_CUSTOMER",
        "tags": [
          "sample", 
          "batch"
        ]
    	},
      "tags": [
          "sample", 
          "batch"
      ],
			customFields [
      	{
      		"title": "Won cause",
      		"type": "Text",
       		"value": "Forms addon"
    		}
      ]
    }
  }
}

Get a specific deal by externalKey

External key is a user defined Custom field of type ExternalKey that can be created in Lime Go. You'll find it under Settings after you logged into Lime Go.

InputDescription
idThe value that is stored in the externalKey field
externalKeyNameThe name of the custom field or __integrationid

You can also set externalKeyName to __integrationid. This will change the scope from the user defined Custom field to look for the supplied value in the field Identity In External System.

deal(id: "123", externalKeyName: "Name of external key") {
  id
  name
  customerName
  status
  source
  responsibleCoworker {
		id
  	name
  	email
  	phoneNumber
	}
	customer {
    id
    name
    city
    email
    phoneNumber
    organizationNumber
    responsibleCoworker {
      id
      name
      email
      phoneNumber
    }
    customFields {
      title
      type
      value
    }
    integrationId
    temperature
    customerRelation
    tags
	}
  tags
	customFields {
  	title
    type
    value
  }
}
{
  "data": {
    "deal": {
      "id": 850851,
      "name": "Big Deal",
      "customerName": "Lime Technologies Sweden AB",
      "status": "ORDER",
      "source": "Upselling",
      "responsibleCoworker": {
				"id": 2343,
  			"name" : "Max Nyman",
  			"email": "[email protected]",
  			"phoneNumber": "046-2704800"
			},
      "customer": {
        "id": "pase106797",
        "name": "Lime Technologies Sweden AB",
        "city": "LUND",
        "email": "[email protected]",
        "phoneNumber": [
          "046-2704800"
        ],
        "organizationNumber" : "23235-23123",
        "responsibleCoworker": {
          "id": 2343,
          "name" : "Max Nyman",
          "email": "[email protected]",
          "phoneNumber": "046-2704800"
        },
        customFields: [
          {
            "title": "Social Media Link",
            "type": "Link",
            "value": "https://www.linkedin.com/company/limetechnologies"
          }
        ],
        "integrationId": 2344,
        "temperature": 66.98342680275138,
        "customerRelation": "IS_A_CUSTOMER",
        "tags": [
          "sample", 
          "batch"
        ]
    	},
      "tags": [
          "sample", 
          "batch"
      ],
			customFields [
      	{
      		"title": "Won cause",
      		"type": "Text",
       		"value": "Forms addon"
    		}
      ]
    }
  }
}

Search for deals.

InputDescription
querySearches against a deal's name and the company's name that its associated with. If no query has been provided then all first x deals are returned.
firstThe amount of deals to fetch.
Defaults to 10. Max 20 at a time.
offsetThe amount of deals to skip.
Defaults to 0.
{
  deals(query: "Big Deal", first: 15, offset: 0) {
    id
    name
    customerName
    status
    tags
    customer {
      id
      name
      city
      email
      phoneNumber
      organizationNumber
      responsibleCoworker {
        id
        name
        email
        phoneNumber
      }
      customFields {
        title
        type
        value
      }
      integrationId
      temperature
      customerRelation
      tags
    }
  }
}
{
  "data": {
    "deals": [
      {
        "id": 850851,
        "name": "Big Deal",
        "customerName": "Lime Technologies Sweden AB",
        "status": "ORDER",
        "tags": [
            "sample", 
            "batch"
        ],
        "customer": {
          "id": "pase106797",
          "name": "Lime Technologies Sweden AB",
          "city": "LUND",
          "email": "[email protected]",
          "phoneNumber": [
            "046-2704800"
          ],
          "organizationNumber" : "23235-23123",
          "responsibleCoworker": {
            "id": 2343,
            "name" : "Max Nyman",
            "email": "[email protected]",
            "phoneNumber": "046-2704800"
          },
          customFields: [
            {
              "title": "Social Media Link",
              "type": "Link",
              "value": "https://www.linkedin.com/company/limetechnologies"
            }
          ],
          "integrationId": 2344,
          "temperature": 66.98342680275138,
          "customerRelation": "IS_A_CUSTOMER",
          "tags": [
            "sample", 
            "batch"
          ]
        }
      }
    ]
  }
}

Mutations

These are the available mutations for updating deals.

💡

Use one mutation for everything

If you intend to do multiple modifications to the deal, we recommend that you set them all in the same mutation (as below) since this will be fully transactional. Meaning that either all data gets saved or none.

Update multiple fields

In the example below we are setting a status together with a note as well as responsibleCoworker and adding two new tags to a deal with id 123.

Using a GraphQL client you'll get the available values for status

mutation {
  updateDeal(input: {
    id: 123
    tags: { addTags: ["Tag one", "another tag"] }
    responsibleCoworker: { identifier: "1001" }
    status: { status: ORDER, note: "lorem" }
  }) {
    id
    name
    status
    tags
    responsibleCoworker { id, email, name }
  }
}

Set responsible coworker on deal

mutation {
  updateDeal(input: {
    id: 123
    responsibleCoworker: { identifier: "1001" }
  }) {
    id
    name
    responsibleCoworker { id, email, name }
  }
}

Set status on deal

Using a GraphQL client you'll get the available values for status

mutation  {
  updateDeal(input: {
    id: 123
    status: { status: ORDER, note: "lorem" }
  }) {
    id
    name
    status
  }
}

Add tags on deal

mutation {
  updateDeal(input: {
    id: 123
    tags: { addTags: ["Tag one", "another tag"] }
  }) {
    id
    name
    tags
  }
}

Set external key on deal

A Custom Field with name Name of existing field must already exist on Deal

mutation {
  updateDeal(input: {
    id: 123
    externalKey: { name: "Name of existing field", value: "123-from-graphql" }
  }) {
    id
    name
  }
}