Skip to main content

Create an action for a sales rep

Create an action in the Action Hub of the Sales Hub. Actions flag situations that need a sales rep, such as an inactive account, a product to recommend or an order to check. In the API an action is a ticket. For the buttons, assignment and statuses in detail, see Send actions to the Action Hub.

Mutation​

mutation CreateAction($input: TicketCreateInput!) {
ticketCreate(input: $input) {
id
titles { language value }
descriptions { language value }
type
status
companyId
contactId
productId
orderId
assignedToAdminUserId
createdAt
}
}

Variables​

{
"input": {
"titles": [{ "language": "EN", "value": "Inactive account: MeterTech Solutions GmbH" }],
"descriptions": [{ "language": "EN", "value": "No orders in the last 90 days. The company used to order twice a month." }],
"type": "VIEW_COMPANY",
"status": "OPEN",
"companyId": 37,
"assignedToAdminUserId": 65
}
}

Response​

{
"data": {
"ticketCreate": {
"id": "01a139c8-a15e-7064-9bf4-10a377511622",
"titles": [{ "language": "EN", "value": "Inactive account: MeterTech Solutions GmbH" }],
"descriptions": [{ "language": "EN", "value": "No orders in the last 90 days. The company used to order twice a month." }],
"type": "VIEW_COMPANY",
"status": "OPEN",
"companyId": 37,
"contactId": null,
"productId": null,
"orderId": null,
"assignedToAdminUserId": 65,
"createdAt": "2026-10-14T09:40:12.255Z"
}
}
}

More input examples​

Recommend a product. View Product opens the product in the Backoffice:

{
"input": {
"titles": [{ "language": "EN", "value": "Recommend the T96SD4N meter to MeterTech Solutions GmbH" }],
"descriptions": [{ "language": "EN", "value": "Markus Weber ordered the matching installation kit three times but never the meter itself." }],
"type": "VIEW_PRODUCT",
"status": "OPEN",
"productId": 408,
"companyId": 37,
"contactId": 94,
"assignedToAdminUserId": 65
}
}

Check an order. View Order opens the order in a new tab:

{
"input": {
"titles": [{ "language": "EN", "value": "Check order 1737 before it is confirmed" }],
"descriptions": [{ "language": "EN", "value": "The order is three times larger than the average order of this company. Check the quantities with the customer." }],
"type": "VIEW_ORDER",
"status": "OPEN",
"orderId": 1737,
"companyId": 36,
"assignedToAdminUserId": 65
}
}

How it works​

The type decides the button of the action, and each type needs the field the button uses: VIEW_COMPANY needs companyId, VIEW_PRODUCT needs productId and VIEW_ORDER needs orderId. Other types and missing fields give an action without a button. assignedToAdminUserId is the admin user ID of the sales rep, who then finds the action under My Actions. Create actions with status OPEN. For all types, see Choose the button.

See also​