Find The: Distance From Last 
distance_from_last
The distance from the location of the current event to the location of the most recent event matching the criteria.
For example:
- The distance travelled between the current event and the most recent login. A large distance can trigger a step-up challenge or expire the session.
- Distance of a shipping address from the last order.
- In some gaming use cases, knowing that a user moves large distances frequently can mitigate regulatory risk.

Configuration
- Feature Name: The "dictionary" name under which the feature value will be stored and referenced by in rules.
- Coordinate Attribute: The attribute holding the location. It must have the Coordinate data type; anything else is rejected at build time.
- In Units:
kilometersormiles. Required. - For Events:
- With The Same: Provides a way of filtering past events based on the attribute values. There must be at least one Identifier and only Identifier and Subject attributes can be used.
Optional Configuration
- Default Value: A value that can be assigned to the feature if the attributes to calculate the features are not present.
- Scope: Can be used to extend the event search from the local node, to all nodes within the same organization all the way to all across customers (global).
- For Events:
- All event types: Default, no filter
- Same as current: Filter by event_type of event being processed
- Specific event type: List out the
event_typeto restrict to, as a list. Example: only consideraccount_login_success.
- Condition: A Query-Language filter that can be used to refine Features for specific use cases.
- Time Window: Can be used to limit the Feature calculation to a specific time period/window. e.g 1 week. Default is
all; no time window - Starting: Can be used to remove recent events from Feature calculation. Default is
immediately; no lag.
Use Case 1
Calculate the distance of the current event's location from the location of the account's last purchase, in miles.
Implementing In The Feature Editor



- name: address_distance_from_last_order
default_value: null
time_window: all
starting: immediately
find_the:
distance_from_last:
events:
event_type:
- purchase
include_current_event: false
with_the_same:
- identity['ACCOUNT'].customer_token.customer_token
coordinate: profiling.tcp_connection['WEBRTC'].ipdb.coordinate
in_units: miles
with_scope: same_node_instance