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.
Key | Description |
---|---|
id | Id of the deal |
name | Name of the deal |
customerName | Name of the organization the deal belongs to |
status | Status the deal belongs to |
source | Source of the deal |
tags | Tags on the deal |
responsibleCoworker | Coworker responsible for the deal (id, name, email and phoneNumber) |
customFields | Custom fields on the deal (title, type and value) |
Customer | Organization 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.
Input | Description |
---|---|
id | The value that is stored in the externalKey field |
externalKeyName | The 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.
Input | Description |
---|---|
query | Searches 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. |
first | The amount of deals to fetch. Defaults to 10. Max 20 at a time. |
offset | The 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
}
}