Fluent Commerce Logo
Docs
Sign In

ValidateOrderDeliveryAddress

Rule

Changed on:

28 Nov 2023

Overview

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


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

The Order Reference Module is the foundation for order-related implementations. It provides reference workflows for click & collect, home delivery 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

Event to be triggered in case of a valid delivery address.

responseEventIfInvalidAddress

Event to be triggered in case of invalid delivery address.

responseEventIfMissingAddress

Event to be triggered in case of missing delivery address.

applyDefaultCoordinates

Parameter to decide if default coordinates should be applied.

Event attributes

This rule does not directly identify any event attributes.

Exceptions

This rule 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}

Language: json

Detailed Technical Description

Setting Name

User Type

Setting Type

Value

DEFAULT.COORDINATES

RETAILER or ACCOUNT

JSON

Example:

`[`

`  {`

`    "longitude": "100.2054",`

`    "latitude": "-20.8396",`

`    "postCodeRangeStart": "1",`

`    "ostCodeRangeEnd": "100000"`

`  }`

`]`


Version History

2023-08-03

v1.0.0

refers to plugin

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo