AlmondTill/G3N API

Keep contacts for suppliers, customers and sites

Add the people and addresses your business deals with, and assign each contact to the record it belongs to — the buyer on this supplier, the manager at this store.

Address book · a play in 2 steps.

The steps

  1. Add the person or address-book entry. — createContact
  2. Assign the contact to its record — who they are for this supplier or this store. — createContactAssignment

The calls

Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.

createContact

createContact — mutation · Create a new contact — a person or address book entry at your organization.

Example request

mutation ExampleCreateContact($input: NewContactInput!) {
  createContact(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    notes
  }
}

Variables:

{
  "input": {
    "caption": "Blue jeans"
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

{
  "data": {
    "createContact": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "CO-EXMP-0000-000F",
      "type": "Contact",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "notes": "Restock before the weekend."
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

createContactAssignment

createContactAssignment — mutation · Create a new contact’s assignment to a record — who is the buyer on this vendor, the manager at this store at your organization.

Example request

mutation ExampleCreateContactAssignment($input: NewContactAssignmentInput!) {
  createContactAssignment(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    contactId
    hostType
    role
  }
}

Variables:

{
  "input": {
    "caption": "Blue jeans",
    "hostId": "01900000-0000-7000-8000-5c71ac820000",
    "hostType": "organization_group",
    "contactId": "01900000-0000-7000-8000-4db757ce0000",
    "role": "<role>"
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

{
  "data": {
    "createContactAssignment": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "CA-EXMP-0000-000F",
      "type": "ContactAssignment",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "contactId": "01900000-0000-7000-8000-4db757ce0000",
      "hostType": "organization_group",
      "role": "<role>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}