Server Events
The Events page lists all events generated by the Pricefx server. For example, when a price is approved, ITEM_APPROVED_PGI event is generated.
Events are an important part in integration between Pricefx and external systems. The Pricefx server either sends (pushes) events to a specified URL (or email address) where IntegrationManager (IM) listens and then IM performs actions based on a specific implementation. Or IntegrationManager fetches (pulls) events from the server and then performs actions based on the specific implementation.
In this section:
See also:
Complete list of event types at EventType Class
IntegrationManager documentation on Events
Events Page
The Events page displays:
Name of the event, its creation time and the time of the last update.
Message (payload) of the event.
Number of retries left – if the first attempt to send the event data fails, the server has two more attempts.
HTTP response returned by the destination server.
Error message if returned by the destination server.
The partition in this screenshot is set up for Pull Events but there is no IntegrationManager to read the events, so they still have Retries Left set to 5. When you move your mouse over the message, its full content is shown.
Configuration
To have events generated, you need to configure two places: system partition and your own partition.
These events can also be configured in PlatformManager.
System Partition Configuration
Here it is defined which events are generated. By default, all event types are generated by Pricefx (when events generating is enabled). But, depending on the project, certain user actions can generate a lot of events (e.g., ITEM_APPROVED_PGI or ITEM_UPDATE_PPV) which you might not need.
If you need changes in this configuration, ask Pricefx Support (this functionality is available only to superadmins).
Partition Configuration
Here you define how and where events are delivered. Events generation is driven by the Event URL field in Administration > Configuration > General Settings.
Event URL is an HTTP endpoint to which events from the current partition are published.
If it is filled in, events are generated.
If you want to use Pull Events or you want Pricefx to generate events without sending them anywhere, use any dummy value here, e.g., "http://dummy_url". In addition, select the Disable sending events through HTTP (PUSH) checkbox.
If you want to use Push Events, use the URL of an IntegrationManager endpoint (contact the Integrations team to get a correct URL). Also, make sure the Disable sending events through HTTP (PUSH) checkbox is not selected.
If it is blank, events are not generated.
In addition, generated events can also be sent to an email address.
Additional System Setting
The events are deleted and disappear from the list after a specified time: successful events after 5 days, failed events after 100 days. If necessary, you can change the default settings by adding the following elements to the /var/pricefx/static/<instance_config_file>.xml with the required values:
<event>
<retainEventsInDays>
<successful>5</successful>
<failed>100</failed>
</retainEventsInDays>
</event>
Working with Events
An event in Pricefx is often used to trigger an action, for example:
A Quote or Price List is exported to an external system immediately on approval.
The completion of an Analytics Data Load notifies IntegrationManager.
Typical Flow
The following example of a Price List export after approval illustrates how events are used:
Pricing manager creates a Price List and submits it for approval.
Approver approves the Price List.
Pricefx creates an event (record) and stores it in a table EventTask (type code: EVT).
If Push Events is required, it pushes a message with the event to IntegrationManager over an HTTP request.
The unsent messages (with Retries Left > 0) are sent regularly (by default every minute) to IntegrationManager. The response status code of that call is stored in the field Response. When IM replies with success (Status 200), Pricefx will set Retries Left to 0, so that it does not try to send it again.
IntegrationManager:
If Pull Events is required, it pulls a list of new events from the EventTask table via Pricefx REST API.
IM reads events regularly (by default every 60 seconds) and you can filter which events to read.
If the processing of the event is successful, IM will update Retries Left (set to 0) and Response in the EventTask table (via Pricefx REST API call).
Reads the records of the Price List from the PL/PLI tables (via Pricefx REST API).
Converts the PLI records as required by the external system (CSV, XML,…).
Sends the converted records to the external system (the channel depends on project specification).
For more details on Push and Pull methods, see the IntegrationManager documentation.
Found an issue in documentation? Write to us.
Pricefx version 13.1