My Products
Help
Florian Haase
PARTNER

Overvåkningspunkt / Taskoverview in API?

by Florian Haase

Hi

 

we try to find the correct API-table for UI Overvåkningspunkt or probably TaskOverview in the datamodel. But we can't find the data which are shown in the UserInterface.

 

Could you help us to find the right GraphQL table?

 

Florian

7 REPLIES 7
Florian Haase
PARTNER

by Florian Haase

Sorry - that is not solved. As I wrote we did connect the taskOverview in BNxt to the Isv - user but the API request with that isv-user still results in an empty response

@Florian Haase Sorry, I know, the "Reply"-button in the UI here changes to "Accept as solution" once it is pressed, and I happened to click it once too much apparently. 

Florian Haase
PARTNER

by Florian Haase

Hmm, UI shows:

FlorianHaase_0-1702391606728.png

 

API request:

query 
{ useCustomer(no:4613192 ) {
taskOverview
{
items
{
companyName
count
description
}
}
}
}

 

 

shows:

{
"data": {
"useCustomer": {
"taskOverview": {
"items": null
}
}
},
"extensions": {
"vbnxt-trace-id": "00000000000000005d0630672b22937c"
}
}

 

Florian Haase
PARTNER

One thing we wonder about: These taskOverviews are defined per user. When we sent in the first request (above) the taskOverview was not connected to the isv -- user. That we have fixed now but it still results in a null - response.

 

@Florian Haase The TaskOverview-table is not in use in Business NXT, so you will not be able to get the desired outcome. What you see in the UI is generated based on the other TaskOverview-tables, and not directly reproducible through the API to my knowledge. Is there a use case for it? 

Florian Haase
PARTNER

Yes there is: 

We currently offer a solution tailored for accounting offices. In this context, it is essential for us to identify any open customer transactions and perform specific processes on them. Presently, our approach involves executing a SQL query to determine the existence of open transactions, and subsequently, we record this information in either a master client or the vbsys. This allows us to selectively carry out the necessary processes only for those clients with active open transactions.

However, this method may pose challenges in Bnxt due to the need to iterate through over 1000 companies to identify where open transactions exist. To streamline this process, we initially considered leveraging the TaskOverview. While an alternative solution involving webhooks might be viable, it could introduce technical complexities and potentially be less stable compared to the simplicity of retrieving information directly from a table.

 

Florian

by Øyvind Årseth

@Florian Haase Would this work for your purpose? 

query taskOverview($custno: Int) {
  useCustomer(no: $custno) {
    taskOverviewDefinition {
      totalCount
      items {
        taskOverviewNo
        description
      }
    }
  }
}