Genesys Cloud - Developer Community!

 View Only

Sign Up

Expand all | Collapse all

Questions about v2.workforcemanagement.businessunits.{id}.shorttermforecasts.generate

  • 1.  Questions about v2.workforcemanagement.businessunits.{id}.shorttermforecasts.generate

    Posted 5 hours ago

    Hello,

    I am having difficulty understanding how the topic v2.workforcemanagement.businessunits.{id}.shorttermforecasts.generate works.

    This morning, I generated several forecasts (4 that are identical), but only for the last one, i have received events (and therefore only one with the status "Complete").
    Why did I not receive events for the first three forecasts?

    Additionally, for the events received with the status "Processing," there is no information other than the operationId. Is this normal?
    These events seem to be useless if they do not contain other data such as weekdate, weekcount, etc.

    Thank you in advance for your assistance.


    #PlatformAPI
    #PlatformSDK

    ------------------------------
    Stéphane
    NA
    ------------------------------


  • 2.  RE: Questions about v2.workforcemanagement.businessunits.{id}.shorttermforecasts.generate

    Posted 2 hours ago

    Hi @Stéphane Labrune,

    I think there are actually two separate points here.

    Regarding the events with status = Processing, what you are seeing seems consistent with the asynchronous nature of the forecast generation. At that stage, the operation is still running, so the operationId is mainly there to correlate the notification with the generation request. The actual forecast details are expected to become available when the operation reaches Complete.

    The part I am less sure about is why you received notifications only for the fourth forecast. I think we would need a little more information about how the requests and notifications are being handled before concluding that the first three events were not published.

    Could you share a few additional details?

    • What HTTP status and response body did you receive for each of the four generate requests?

    • Did each request return a different operationId?

    • Were all four requests made with the same parameters, including forceAsync if you are using it?

    • Was the notification subscription already active before the first request?

    • Did the WebSocket/channel remain connected during all four executions, or was it recreated/reconnected at some point?

    • Are you filtering the incoming notifications by operationId, status, or any other property in your code?

    • Are you consuming this topic through the Notifications API/WebSocket or through EventBridge?

    It would also be useful to confirm whether the first three forecasts were actually created successfully. That would help separate a forecast generation issue from a notification delivery/consumption issue.

    If the forecasts exist but only the last operation produced notifications on your consumer, I would probably start investigating the subscription/channel lifecycle and how the application is processing the messages.

    Hope this helps narrow it down a bit. If you can share the request/response samples - with any sensitive information removed - it may be easier to understand what is happening.



    ------------------------------
    Fernando Sotto dos Santos
    Consultor de Atendimento Senior Grupo Casas Bahia
    ------------------------------