Fluent Commerce Logo
Docs
Sign In

CreateBillingAccount

Rule

Changed on:

18 Dec 2023

Overview

The rule creates customer’s Billing Account with billing account reference.

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

Creates customer's Billing Account with type {billingAccountType}, sends event {eventName} after billing account is created with billing account reference.

Accepts

  • ORDER
  • RETURN ORDER

Actions

  • This rule produces an action that triggers a mutation which creates the Billing Account with an associated reference

Rule parameters

Parameter

Description

eventName

Event name for outgoing event.

billingAccountType

BillingAccount type, default value = CUSTOMER.

Event attributes

This rule does not directly identify any event attributes.

Exceptions

This rule will throw an IllegalArgumentException

  • if the 
    `retailerId/entityRef`
     property is not provided
  • if the 
    `order/return order/customer link`
     not found or invalid
  • if attempted against unsupported entities

All generated exceptions will be wrapped with RubixException: 422.

Configuration example

1{
2  "name": "<ACCOUNTID>.order.CreateBillingAccount",
3  "props": {
4    "eventName": "CheckMaxSplitLimitReached",
5    "billingAccountType": "CUSTOMER"
6  }
7}

Language: json

Version History

2023-08-04

v1.0.0

refers to plugin