Retrieve account representatives assigned to customers.
GraphQL
query {
AccountRepresentative (id: 100012) {
label
email
}
}
GraphQL
query {
AccountRepresentatives {
data {
label
email
active
}
}
}
Field Type Description idInt Unique identifier of the account representative. labelString The full name of the account representative. first_nameString The first name of the account representative. last_nameString The last name of the account representative. phoneString The phone number of the account representative. emailString The email address of the account representative. activeBoolean If true, the account representative is active. created_atDateTime Creation date of the account representative. updated_atDateTime Date of the latest update of the account representative.
You can create filters based on following fields
id Example: { column": "ID", "operator": "EQ", "value": "100001" }
label Example: { "column" : "LABEL", "operator" : "LIKE", "value" : "%Ford%" }
first_name Example: { "column" : "FIRST_NAME", "operator" : "EQ", "value" : "John" }
last_name Example: { column": "LAST_NAME", "operator": "NEQ", "value": "Ford"
email Example: { "column": "EMAIL", "operator": "LIKE", "value": "%samsung.com" }
active Example: { column": "ACTIVE", "operator": "EQ", "value": true }
company_id Example: { column": "COMPANY_ID", "operator": "EQ", "value": "71357171" }
created_at Example: { "column": "CREATED_AT", "operator": "LT", "value": "2023-03-03 15:55:32" }
updated_at Example: { "column": "UPDATED_AT", "operator": "GT", "value": "2023-03-03 15:55:32" }
You can sort data based on following fields : id, label, first_name,
last_name, email, active, created_at, updated_at
GraphQL
query AccountRepresentatives(
$where: QueryAccountRepresentativesWhereWhereConditions,
) {
AccountRepresentatives(
orderBy: [{column: LABEL, order: ASC}]
where: $where
) {
paginatorInfo {
total
}
data {
id
label
email
created_at
}
}
}
Variables (JSON)
{
"where": {
"AND": [
{
"column": "ACTIVE",
"operator": "EQ",
"value": true
}
]
}
}
JSON
{
"data": {
"AccountRepresentatives": {
"paginatorInfo": {
"total": 1
},
"data": [
{
"id": 100002,
"label": "John Ford",
"email": "[email protected] ",
"created_at": "2019-08-24"
}
]
}
}
}