Skip to main content

Contacts

The Contact entity in Kojo represents a point of contact that users can send Requisitions, Quotes, Purchases Orders and more.

Schema​

Contact​

NameTypeDescriptionExample
idstringThe unique contact identifier from Kojo"ckmnpybisiy5x08abky4g2d1f"
displayNamestringthe contact's name"John Doe"
emailstringvalid email address"john.doe@salesforce.com"
phonestring?A phone number"+14845691493"
orgNamestring?Vendor name"SalesForce Inc."
vendorIdstring?Vendor ID from Kojo"ckmnpybisiy5x08abky4g2d1f"
createdAtDateTimeTimestamp from when the contact was created"2021-03-24 17:26:46.983Z"
updatedAtDateTimeTimestamp from the last update"2021-03-24 17:26:46.983Z"

Queries​

contact​

Fetches a single contact by ID or Email

Parameters​

NameDescriptionExample
idThe ID of the job to fetch"ckmnpybisiy5x08abky4g2d1f"
emailThe email of the contact to be searched"johndoes@salesforce.com"
vendorIdThe 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​

NameTypeDescriptionExample
displayNamestringthe contact's name"John Doe"
emailstringvalid email address"john.doe@salesforce.com"
orgNamestringVendor name"SalesForce Inc."
vendorIdstringVendor ID from Kojo"ckmnpybisiy5x08abky4g2d1f"
phonestring?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​

NameTypeDescriptionExample
idstringContact's id from Kojo"ckmnpybisiy5x08abky4g2d1f"
displayNamestring?the contact's name"John Doe"
emailstring?valid email address"john.doe@salesforce.com"
phonestring?A phone number"+14845691493"
vendorIdstring?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"
}