Epoch

The epoch panel is a popup window offered to the user when selecting where to start from when configuring a trigger.

Specification

If the Epoch configuration is defined, then there will be at least 1 item available in the Epoch panel: Select, which will allow the user to select an item the user wants to start with. Other items depend on the trigger type. The underlying data is retrieved via the Epoch RPC.

If the trigger type is id, then there will be one more option available: All, which will allow the user to process all the items from the beginning. But, if the Epoch configuration was not specified, then the Epoch panel will not be available to the user.

On the other hand, if the trigger type is date, then 3 additional options will be available for the user: All, From date and From now. From date will allow the user to start processing items from a specific day forward and from now is the same as From date, except the date is automatically set to the current date and time.

Retrieving Data for the Epoch Panel

You can customize how the data for the Epoch panel will be retrieved by providing specific request overrides in the Epoch section. These overrides will then be merged with trigger configuration to retrieve the data.

You also have to provide the labels and dates for the returned items. You can do that with the response.output directive. Dates are not required, but it would be better to provide them for a better user experience.

To correctly return epoch panel items from your Epoch RPC, the output section of response should contain only 2 items: label and date. The limit is used to limit the number of items displayed to the user when using the Epoch panel.

All other directives are inherited from the Triggers' communication and can be overridden by specifying them inside the Epoch RPC.

{
    "response": {
        "limit": 500,
        "iterate": "",
        "output": {
            "label": "",
            "date": ""
        }
    }
}

All other directives (like url, pagination, method,...) are inherited from the Triggers' communication and can be overridden by specifying them inside the Epoch RPC.

label is what the user sees when selecting items from the select box and date is when this item was created (updated), which the user will see in gray.

Best Practices

As we can't wait too long for the epoch's output, there are best practices.

NameRecommended limit of ...Value

Request Count

... calls performed by RPC

3

Record Count

... paginated records

300 or 3 * number of objects per page

Available IML variables

These IML variables are available for you to use everywhere in this module:

  • now - Current date and time

  • environment - TBD

  • temp - Contains custom variables created via temp directive

  • parameters - Contains module’s input parameters.

  • connection - Contains connection’s data collection.

  • common - Contains app’s common data collection.

  • data - Contains module’s data collection.

  • scenario - TBD

  • metadata.expect - Contains module’s raw parameters array the way you have specified it in the configuration.

  • metadata.interface - Contains module’s raw interface array the way you have specified it in the configuration.

Additional variables available to Response Object:

  • output - When using the wrapper directive, the output variable represents the result of the outputdirective

Additional variables available after using the iterate directive, i.e. in wrapper or pagination directives:

  • iterate.container.first - Represents the first item of the array you iterated

  • iterate.container.last - Represents the last item of the array you iterated

Additional variables available to Pagination and Response Objects:

  • body - Contains the body that was retrieved from the last request.

  • headers - Contains the response headers that were retrieved from the last request.

  • item - When iterating this variable represents the current item that is being iterated.

Additional variables available in Attach Remote Procedure.

  • webhook.id - Internal webhook ID.

  • webhook.url - Webhook URL, which you need to register in the remote service.

Additional variables available in Detach Remote Procedure and the expect/interface section of an instant trigger.

  • webhook - Contains webhook’s data collection.

Last updated