Pricefx Classic UI is no longer supported. It has been replaced by Pricefx Unity UI.

 

Event Admin

The Event Admin 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 specific implementation. Or IntegrationManager fetches (pulls) events from the server and then performs actions based on the specific implementation.

In this section:

See also: 

Event Admin Page

The Event Admin 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.

Configuration

To have events generated, you need to configure two places: system partition and your own partition.

System Partition Configuration

Here you define 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. 

To select which types of events are generated for a particular partition:

  1. Log in to the system partition (or ask Pricefx Support to do this for you; this functionality is available only to superadmins).
  2. Go to Partition Admin.
  3. In the Event BitMask field select for which event types Pricefx should generate events.

Partition Configuration

Here you define how and where events are delivered. Events generation is driven by the Event URL field in System Configuration > General Settings.

  • If Event URL 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 Event URL 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:

  1. Pricing manager creates a price list and submits it for approval. 
  2. Approver approves the price list. 
  3. Pricefx creates an event (record) and stores it in a table EventTask (type code: EVT). 
    1. If Push Events is required, it pushes a message with the event to IntegrationManager over an HTTP request.
      1. The unsent messages (with Retries Left > 0) are sent regularly (by default every 60 seconds) 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.
  4. IntegrationManager:
    1. If Pull Events is required, it pulls a list of new events from the EventTask table via Pricefx REST API.
      1. IM reads events regularly (by default every 60 seconds) and you can filter which events to read.
      2. 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).
    2. Reads the records of the price list from the PL/PLI tables (via Pricefx REST API).
    3. Converts the PLI records as required by the external system (CSV, XML,…).
    4. 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.