Skip to main content

updateSessionsForecast

Forecasts, for each session in a proposed updateSessions change, whether an undo of the change is expected to work and which effects of the change an undo cannot repair. Use it to tell people what to expect before they save the change.

It takes the same input as updateSessions, checks it the same way and builds the same change, but it saves nothing and changes no business records.

Returns one forecast for each session the forecast answered, in the order of sessions. Each forecast's recordId is the item's sessionId. A session with no forecast in the list was not checked: treat it as not checked, not as UNKNOWN. An EXPECTED outcome is a forecast, not a promise. A later edit of the session, or a failure to record the undo when the change is saved, can still prevent the undo.

Throws the same errors as updateSessions for the checks it makes on the input, before anything is forecast:

  • BAD_USER_INPUT if sessions is empty, has more than 100 items, or names the same sessionId or survey alias more than once.
  • BAD_USER_INPUT if an item fails any of the checks updateSession makes on its input, for example duplicate trackNumbers, or a start or end outside the session block.
  • NOT_FOUND if an item's sessionId, locationId, sessionBlockId, or a contactId or sessionRoleId in its roleAssignments, is not associated with the event specified by the input's eventId field.
  • BAD_REQUEST if an item's survey alias is already in use.

An error from these checks on an item carries that item's position in sessions and its sessionId in the error's extensions, as index and sessionId.

It also throws an error with code BAD_REQUEST if EventsAir refuses the forecast. The error's extensions.message field gives the reason.

The checks EventsAir makes only when the change is saved, for example that a uniqueCode is not already in use, are not made here. A change can still be refused after a forecast.

updateSessionsForecast(
input: UpdateSessionsInput!
): [ChangeForecast!]!

Arguments​

updateSessionsForecast.input ● UpdateSessionsInput! non-null input​

Type​

ChangeForecast object​

A forecast for one record of a proposed change that has not been saved: whether an undo of the change is expected to work, and which effects of the change an undo cannot repair. Reading a forecast changes no business records.