Contacts
The Contact entity in Kojo represents a point of contact that users can send Requisitions, Quotes, Purchases Orders and more.
Schema​
Contact​
| Name | Type | Description | Example |
|---|---|---|---|
| id | string | The unique contact identifier from Kojo | "ckmnpybisiy5x08abky4g2d1f" |
| displayName | string | the contact's name | "John Doe" |
string | valid email address | "john.doe@salesforce.com" | |
| phone | string? | A phone number | "+14845691493" |
| orgName | string? | Vendor name | "SalesForce Inc." |
| vendorId | string? | Vendor ID from Kojo | "ckmnpybisiy5x08abky4g2d1f" |
| createdAt | DateTime | Timestamp from when the contact was created | "2021-03-24 17:26:46.983Z" |
| updatedAt | DateTime | Timestamp from the last update | "2021-03-24 17:26:46.983Z" |
Queries​
contact​
Fetches a single contact by ID or Email
Parameters​
| Name | Description | Example |
|---|---|---|
| id | The ID of the job to fetch | "ckmnpybisiy5x08abky4g2d1f" |
| The email of the contact to be searched | "johndoes@salesforce.com" | |
| vendorId | The ID of the Vendor related to this contact | "ckmnpybisiy5x08abky4g2d1f" |
Response​
A single Contact object.
Example Query​
query {
contact(email: "johndoe@salesforce.com"){
id
email
displayName
vendorId
}
}
Example Response​
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"displayName": "John Doe",
"email": "johndoe@salesforce.com",
"vendorId": "ckmnpybisiy5x08abky4g2d1f"
}
Mutations​
createContact​
Creates a new Contact.
Parameters​
| Name | Type | Description | Example |
|---|---|---|---|
| displayName | string | the contact's name | "John Doe" |
string | valid email address | "john.doe@salesforce.com" | |
| orgName | string | Vendor name | "SalesForce Inc." |
| vendorId | string | Vendor ID from Kojo | "ckmnpybisiy5x08abky4g2d1f" |
| phone | string? | A phone number | "+14845691493" |
warning
The contact orgName can not be updated after the contact creation.
Response​
Returns the created Contact.
Example Request​
mutation {
createContact(
email: "johndoe@salesforce.com",
displayName: "John Doe",
phone: "+14845691493",
orgName: "Sales Force",
vendorId: "ckmnpybisiy5x08abky4g2d1f"
) {
id
email
phone
orgName
vendorId
displayName
}
}
Example Response​
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"displayName": "John Doe",
"email": "johndoe@salesforce.com",
"orgName": "Sales Force",
"phone": "+14845691493",
"vendorId": "ckmnpybisiy5x08abky4g2d1f"
}
updateContact​
Updates an existing Contact.
Parameters​
| Name | Type | Description | Example |
|---|---|---|---|
| id | string | Contact's id from Kojo | "ckmnpybisiy5x08abky4g2d1f" |
| displayName | string? | the contact's name | "John Doe" |
string? | valid email address | "john.doe@salesforce.com" | |
| phone | string? | A phone number | "+14845691493" |
| vendorId | string? | Vendor ID from Kojo | "ckmnpybisiy5x08abky4g2d1f" |
Response​
Returns the updated Contact object.
Example Request​
mutation {
updateContact(id: "ckmnpybisiy5x08abky4g2d1f", email: "johndoe1@salesforce.com") {
id
email
displayName
}
}
Example Response​
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"displayName": "John Doe",
"email": "johndoe1@salesforce.com"
}