An invoice or cart display of a collection of items to be paid for.
The line-item-action is designed to facilitate straightforward and efficient management of individual products or services within a transaction. This action is crucial in scenarios like adding, modifying, or removing items from a shopping cart or an order list. It enables merchants to streamline operations and provide customers with the flexibility to adjust their purchases as needed, such as changing quantities, selecting specific variants, or applying special instructions. This functionality not only simplifies the purchasing process for both the merchant and the customer but also enhances the overall efficiency of the transaction handling, allowing for a smoother and more responsive shopping experience.
Related Actions
This action pairs well with the following actions:
State
The final selection of items and all the details for each when the user accepted it.
Union
The target action is expected to be the next step after configuring the line items to the desired state. So this is likely a payment, but could be a payout or signature depending on the use case.
Macro level details for how union attribute behaves can be found within the Union documentation.
Features
| Name | Type | Description | Rules |
|---|---|---|---|
| currency | string | Currency of the payout (ISO 3 Digit Currency Code). Optional when 'union' is not defined; not allowed when 'union' is defined. Examples: "USD". | MaxLength: 3 MinLength: 3 Pattern: ^([A-Z]*)$ |
| variant | string | Line-item variant to define layout on GUI. Examples: "invoice", "cart". | Possible values: invoice, cart. |
Context (required)
| Name | Type | Description | Rules |
|---|---|---|---|
| items | array | (required) Items in the line items payload. | |
| modifiers | array | Modifiers show up at the end of the invoice display to modify the totals. Modifiers are displayed and calculated in the order presented. |
Example
Below is an example payload for adding an Line-item action to a business process or blueprint.
{
"type": "line-items",
"union": 1,
"context": {},
"features": {
"currency": "USD",
"variant": "cart"
}
}