Fluent Commerce Logo
Docs
Sign In

ValidateOrderDeliveryAddress

Rule

Changed on:

28 Nov 2023

Overview

The verifies the delivery address of the , sets the address coordinates accordingly and sends out an .


Plugin NameOrder Reference Module
Namespace[[account.id]].order

The is the foundation for order-related implementations. It provides reference workflows for , and mixed baskets and those needed to build your own. Extensible by design, use this Module as a base to build a solution to your customers' needs.

UI Description

Verifies delivery address of the order. In the case of a valid address, coordinates are updated in the customer address and a corresponding event is sent. In case of exceptions or invalid addresses 'applyDefaultCoordinates' input parameter is checked. If it is set to true then the 'DEFAULT.COORDINATES' setting is used to identify the default coordinates, else 'responseEventIfInvalidAddress' event is sent.

Accepts

  • ORDER

Actions

  • This rule creates and sends relevant event and also performs an update mutation on customer address if needed.

Rule parameters

Parameter

Description

responseEventIfValidAddress

to be triggered in case of a valid delivery address.

responseEventIfInvalidAddress

to be triggered in case of invalid delivery address.

responseEventIfMissingAddress

to be triggered in case of missing delivery address.

applyDefaultCoordinates

Parameter to decide if default coordinates should be applied.

Event attributes

This does not directly identify any attributes.

Exceptions

This does not directly throw any exception.

Configuration example

1{
2  "name": "<ACCOUNTID>.order.ValidateOrderDeliveryAddress",
3  "props": {
4    "responseEventIfValidAddress": "Event to be triggered in case of valid address",
5    "responseEventIfInvalidAddress": "Event to be triggered in case of invalid address",
6    "responseEventIfMissingAddress": "Event to be triggered in case of missing address",
7    "applyDefaultCoordinates": "Parameter to decide if default coordinates should be applied"
8  }
9}

Detailed Technical Description

Setting Name

User Type

Setting Type

Value

DEFAULT.COORDINATES

RETAILER or

JSON

Example:
`[`
`  {`
`    "longitude": "100.2054",`
`    "latitude": "-20.8396",`
`    "postCodeRangeStart": "1",`
`    "ostCodeRangeEnd": "100000"`
`  }`
`]`


Version History

2023-08-03

v1.0.0

refers to