Event Queue

Modified on Fri, 7 Aug at 12:14 PM

The Event Queue is a message broker system within iCFM. It lets you react to things happening in iCFM - a Project status changing, a Media record being updated, a Purchase Order being approved - by having iCFM notify a web service that you control. From there you can trigger whatever you need: email alerts, folder creation, updates in another system, or anything else your workflow requires.


Before you start

You will need a publicly reachable web service that our servers can call. Most customers do this using a reverse proxy - something like nginx works well, pointing at a web service or script on your LAN.


The Event Queue is configured by CETA at our end, so it is not something you can switch on yourself. The steps below cover what we need from you.


Setting it up

  1. Set up a listener endpoint on your domain, for example https://cetaevents.yourdomain.studio/listen.php
  2. Send the URL to CETA Support, along with which events you are interested in
  3. We configure your iCFM instance to send to that URL
  4. Configure your listener to action or ignore each event as required


Sending different events to different URLs

The destination URL can be set globally, so that every event goes to a single endpoint, or per Project Type, so that events raised against different Project Types go to different endpoints. If you run several Project Types and want them handled separately, let us know when you send your URL through.


How it works

When a relevant event occurs, iCFM writes a record to its event queue and then calls your URL, passing the ID of that queued event and the event type.


Your listener therefore receives a notification that something happened, rather than the full detail of what happened. To retrieve the detail, use the ID passed to your listener to look up the corresponding eventqueue record via the Spectrum API. That record holds the event type, the user responsible, the timestamp and a JSON payload.


Things to be aware of

  • Events tell you a record was saved, not what changed inside it. The payload varies by event. Some carry useful context — a Project status change, for example, includes the old and new status — but others simply indicate that the record was saved. If you need to know which specific field changed, your listener will usually need to compare against its own stored copy of the record.
  • Not every event is raised by every route into iCFM. Changes made through the Spectrum API do not currently raise every event that the same change would raise in the iCFM interface. If your integration both writes to iCFM and listens for events, check the Spectrum documentation for the events you rely on (see below).
  • Delivery is a single call. Your endpoint should accept the request quickly and do any slow processing afterwards.


Available events

The events below are those present in iCFM. Not all of them are raised by the Spectrum API — for the current Spectrum support status of each event, developers should refer to the API documentation for your instance at https://[your-instance].cetacloud.tv/api/cetadocs/?page=Eventqueue


EventDescription
allocation_changeAny change to Project Type information
client_attend_addedClient Attending information added
client_attend_deletedClient Attending information deleted
client_attend_modifiedClient Attending information updated
company_addedA new Company record created
company_modifiedAn existing Company record updated
despatch_data_updateDespatch Note saved
despatch_status_changeDespatch Note status changed
dmg_actual_modifiedDMG Actuals updated
dmg_description_modifiedDMG Description updated
dmg_input_addedA DMG Input item added to a job
dmg_input_deletedA DMG Input item removed from a job
dmg_input_modifiedA DMG Input item updated
dmg_job_allocatedDMG Job allocated to a user
dmg_job_detail_allocatedA DMG job detail row allocated to a user
dmg_operation_addedA DMG Operation added to a job
dmg_operation_deletedDMG Operation on a job deleted
dmg_operation_modifiedDMG Operation on a job modified
dmg_output_addedA DMG Output item added to a job
dmg_output_deletedA DMG Output item removed from a job
dmg_output_modifiedA DMG Output item updated
dmg_quantity_modifiedQuantity on a DMG Operation updated
dmg_service_addedA DMG Service added to a job
dmg_service_deletedA DMG Service removed from a job
dmg_service_modifiedA DMG Service updated
dmg_work_startedWork started against a DMG job
dmg_work_stoppedWork stopped against a DMG job
gekko_createInternal iCFM reporting event
job_completedA Job marked as complete
job_detail_addedA row added to a Job
job_detail_completedA Job row marked as complete
job_detail_deletedA Job row deleted
job_detail_startedWork started against a Job row
job_detail_stoppedWork stopped against a Job row
job_savedA Job saved
job_status_changeA Job status changed
lead_addedA new Lead created
lead_comment_addedA comment added to a Lead
lead_modifiedAn existing Lead updated
lead_status_assignedA Lead assigned to a user
lead_status_completedA Lead marked as complete
lead_status_modifiedA Lead status changed
lead_to_projectA Lead converted into a Project
library_data_updateAn existing Media record saved
library_item_createdA new Media record created
note_added_to_jobA note added to a Job
note_added_to_jobdetailIDA note added to a Job row
po_status_changeA Purchase Order status changed
project_comment_addedA comment added to a Project
project_createdA new Project created
project_status_changeA Project status changed
project_step_status_attr_changeA Project step, status or attribute changed
quote_createdA new Quote created
quote_status_changeA Quote status changed
resource_createdA new Resource created
resource_freelance_flag_changeA Resource marked as, or unmarked as, freelance
resource_updateAn existing Resource updated
resource_update_fromA Resource updated from another source
risk_assessment_emailA Risk Assessment email raised against a Quote
rs_addedA Resource Schedule booking added
rs_deletedA Resource Schedule booking deleted
rs_modifiedA Resource Schedule booking updated
rss_actuals_completedActuals completed against a Resource Schedule service
rss_addedA service added to a Resource Schedule booking
rss_deletedA service removed from a Resource Schedule booking
rss_modifiedA service on a Resource Schedule booking updated
spot_savedA Spot record saved
sundry_savedA Sundry Cost saved


If you are unsure which events suit your workflow, or you need help interpreting a payload, contact CETA Support and we will point you in the right direction.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article