The Order Management System is the core service that handle multiple entities linked to orders in OneStock : Orders, articles, parcels.
To handle the different entities, API routes are detailed on the documentation for each action on elements of the order (Creation, modification, retreivement).
Once an entity is created in the system, it follows a path that is configured in the Order Management Center called “Order Life Cycle” or “Workflow”. This path allows to define the different possible states for an order, an article, or a parcel. Depending on interconnected property, status, or attribute, the entity will transition from a state to another, and a list of linked action will be activated. Transitions are triggered automatically or manually through app or API interactions.
The purpose of the Workflow is to :
Define states for an entity
Allow transitions between controlled states
Apply actions
Example of Order workflow
This workflow is custom built to replicate the fulfillment management of an order, an article, or a parcel. Thus it is configured to reflect the unique business capabilities of any entity for a retailer.
Match the existing business capabilities with the configured Workflow
Define what actions and changes are technically allowed through via the configuration.
Principle
There is 3 different categories of workflows in OneStock :
Order workflow
Return parcel workflow
Store and Warehouse workflows
Order workflow is dedicated to treating orders, articles, parcel and bundles in OneStock. This workflow allows to integrate, manage stocks, orchestration and delivery to an order. It is a mandatory workflow to use OneStock as an OMS.
Return parcel workflow is specifically dedicated to create and handle return parcels. If this workflow is missing, no returns will be possible. (More informations here).
Store and Warehouse workflows shaped to handle entity flows for the Store App. They are required to make the Store App usable for a stock location, and critical to process orders through the app.
Interface and tools
All workflows have the same interface and works using same mechanism for consultations and modifications.
In the following, we detail what are the user capabilities through the interface, and what are the interpretation of visual information for technical purpose.
Interface interactions
The base mode of the order lifecycle is the view mode to consult all existing workflows.
Create a new view to filter graphs, and save.
View allows to filter and save a workflow display
Use action filters to quickly spot the transitions that contains a targeted action you want to identify.
Watch all the conditions and action by clicking on the transition.
To modify your workflow, create a draft and enter the draft mode.
To add a state in a graph, use the state dropdown, or right clic on a free space.
To add a condition or an action, click on the targeted transition (or starting state), and use the dedicated button.
For advanced users, a code mode is available for display and modification of workflow actions and conditions. The code mode is accessible on global, entity workflow view (by clicking on the three dots option), or in the transition detail (by using the right tab).
To activate the modified workflow once modifications are done, publish the draft by clicking on the dedicated button. When a draft is published, all workflows are published at the same time. If necessary, it is possible to cancel all the modifications by deleting the draft.
Diagram details
Starting state
When defining an entity, a starting state needs to be defined. Only one state can be tagged as a start state. It is recognizable by its dotted border. This first state is the only one having the possibility to execute actions after its creation.
Transition
Transitions are links having a starting and a arrival state. It has a defined unique direction.
Transitions can be either Automatic or Manual. Automatic transitions are dotted arrows, while manual transition are plain arrows.
Automatic transitions are triggered by a update_{entity}_state action without information on the target state. On the other hand, Manual transitions are triggered by a update_{entity}_state action with the target state, or by an API update of the entity.
Entities
Order workflow
Order
Orders are created through API or through the store app. Once an order is posted by the system, the entity is created and the dedicated action are launched.
Line Item Group
Line item groups are filled in within the POST /order details. They are created at the same time than the order. Dedicated actions are simultaneously launched.
Parcel
Parcels are either created during the workflow process or using API through integration layers. Actions are then processed at the moment of the creation, through delayed action or at the moment of the POST /parcel .
Bundle
Bundles are completely automated. The entity is created when the item ID corresponding to the bundle is detected, at the moment of the Line Item Group creation.
Return parcel workflow
Return Parcel
Return parcels are created through API, through the store app or using the dedicated extension. Once a return is posted by the system, the entity is created and the linked action are launched.
Return Line Item Group
Return line item groups are filled in within the POST /return parcel details. They are created at the same time than the return parcel and actions are simultaneously launched.
Store and Warehouse workflow
Every entity of the Store and Warehouse workflow are created by the partial order preparation system (Store and Warehouse workflows). Those entities are mandatory to run the Store app.
Endpoint Order
Representing a part of the order. An endpoint order is the entity similar to orders, but linked to a stock location. It is created as soon as one line item group of the order is claimed.
Piece Group
Alike a line item group, a piece group represents an item that needs to be prepared by a stock location. In the workflow, the piece group is created when a line item group is claimed by a stock location.
Containers
Containers are entities representing holding entities. Similar to a parcel, the embed other piece group (thus articles) or other containers depending on their nature. Generally, a container are used to define the mean used to handle an article, such as Bag, Box, Trolley, etc.
Operators
Operators are workflow entities used to represent users interacting with containers. Though the workflow, operators are taking actions on other entities.
Condition
Conditions can be applied either for a transition or an action.
For a transition, a condition allows or blocks a change of state.
For an action, a condition is used to define if the action is activated during the sequence.
Action
Actions can affect different entities or fields of the OMS. Some actions are mandatory to run OneStock services properly. Eg : Reservation, Stock update, Dynamic tag, etc…
Actions are run in the sequence they are configured.
Each action require different parameters. Our interface helps the user identify the mandatory fields for an action to run.
There are multiple type of action possible :
Transition Triggers a transition for an entity
Enrichment Add details in an entity
Consumption Consumption of an element of a service
Deletion Deletion of an entity or element
Creation Creation of an entity or element
Update Modification of an element
Launch Start a service process
Operation of the workflow
Trigger a transition
Automatic
Automatic transitions can be triggered two ways :
Using the Transition action without any targeted state parameter in the workflow
Using a specific service that triggers a transition : Orchestration, Stocks, etc…
Manual
Transition can be triggered manually by 3 different ways :
Using API call to patch an entity using field from as a starting state, and to as the targeted state (Please see the API documentation)
Using the backoffice pages : Dropdowns for each entity allow the user to trigger a transition to an accessible state
Through the workflow using the Transition action with the targeted state parameter
Process of the transition
Operation : A transition is triggered
Conditions Verification that the entity is matching the condition for the transition
Transition The entity switch to the new state
Action The configured action are then operated
Technical Specificity :
Order of the sequence of action is respected
Technically : The entity switch to the new state, then actions are done. This means conditions on actions need to be adapted to the targeted state.
Cascading principle
Actions on another entity are triggered at the moment of the “update_{entity}_state”. Then the remaining actions are run.
Action to another workflow happens AFTER every actions of the same workflow are processed.
How to configure
Config generator based Workflow.
The config generator ask you Q&A on the site needs and generates a base configuration as an output that matches the answers and allows a compatibility with most services.
As a result, the base workflow is refined depending on the questions to add dedicated states and actions.
Available conditions
Entity or field tested
Name
Parameters
Description
Available on the following workflows
Entity or field tested
Name
Parameters
Description
Available on the following workflows
Order
order_in_states
states(required) : The list of states to compare against the states of the order
Verify that the order linked to the entity is in one of the states
line_item_group parcel piece_group
Line item groups
all_line_item_groups_in_states
states(required) : A list of states to compare with the states of the line_item_groups
Verify that all the line_item_groups of the entity have their state included in the states list.
For an order, the verification is performed on all its line_item_groups.
For a parcel, the verification is performed on all line_item_groups contained within it.
For a line_item_group, the verification is performed on itself.
line_item_group order parcel
Line item groups
one_line_item_group_in_states
states: (required) A list of states to compare with the state of the line_item_group
Verify that at least one line_item_group is on of the states
order parcel piece_group
Line item groups
all_line_item_groups_in_parcels
in_states : list of line item groups' states to consider
Verify that all the line_item_groups of the entity, whose state is in the in_states list, are correctly included in a parcel. Other line_item_groups are not taken into account.
line_item_group order parcel
Parcels
all_parcels_in_states
states(required) : A list of states to compare with the states of the parcels
Verify that all parcels have their state included in the list of states (states).
For an order, the verification is performed on all its parcels.
For a line_item_group, the verification is performed on the parcel containing it.
For a parcel, the verification is performed on the parcel itself.
line_item_group order parcel
Piece group
all_piece_groups_in_states
states: The list of states to compare against the states of the piece groups
Verify that all piece_groups of the line_item_groups linked to the entity are in a specified list of states.
If there are no line_item_groups linked to the entity, return true.
line_item_group order parcel
Parcel
one_parcel_in_states
states (required): The list of states to compare against the states of the parcels.
same_endpoint: Indicates whether to check:
True: Only parcels whose origin matches the endpoint of the request.
False: All parcels in the order.
all_parcels: Determines the scope of the parcels to check:
True: All parcels in the order are considered.
False: Only parcels directly linked to the entity are considered.
Verify that at least one of the parcel linked to the entity is in one of the states
line_item_group order parcel piece_group
Bundle
all_bundles_in_states
states(required) : list of bundle states to compare
Verify that all the bundles of the entity have their state included in the list of states.
line_item_group
Containers
container_in_states
states(required) : A list of states to compare with the states of the parcels
if_exists : false boolean to return if a parcel doesn’t have any associated container
Verify that all containers have their state included in the list of states.
Retrieve the linked parcels and call the pop function to obtain the states of the associated containers.
line_item_group order parcel
Piece group
one_piece_group_in_states
states : The list of states to compare against the states of the piece group
Verify that at least one of the piece group linked to the entity is in one of the states
line_item_group order parcel
Order
delivery_type_is
type: type of delivery
Verify that the delivery type of the entity associated to the order is equal to type.
line_item_group order parcel
Order
order_type_is
in: A list of types where at least one must match the order's type.
only: A list of types that must exactly match the order's type.
out: A list of types where none should match the order's type.
Only one of these parameters (in, only, or out) can be specified at a time.
Verify the type of the order
line_item_group parcel piece_group
Stocks
has_global_reservation
Warning The verification is not performed on line_item_groups that already have an endpoint_id. Therefore, it must be tested either before an assign_origin operation or after a remove_origin operation.
Verify that a line_item_group has a global reservation done
line_item_group
Stocks
in_stock
stock_types: A list of stock types to consider for the condition.
from: A timestamp used to filter the stock to be considered.
to: A timestamp used to filter the stock to be considered.
use_orchestration_rule_stock_constraints: If set to true, uses stock constraints defined in the orchestration rules, corresponding to the globally reserved stock. This parameter must not be used for orders that do not go through orchestration (e.g., ckc_ready, ropis). Doing so will cause an error because the line_item_group will not have an associated endpoint_id, which is required to filter stock during retrieval.
Checks if the line item group's endpoint has enough stock to serve the line. If stock is lesser than the line item group's quantity, the condition will fail.
Key request used to check for stock is in_stock. When retrieving stock, it will be filter by the line item group's endpoint. endpoint_filters.use_requested_ids must equal true for the filter to work. The line item group must be attributed to an endpoint at the time of checking this condition, otherwise the condition will fail. Autoclaim actions, claims done through de Store App and claims by API containing an endpoint ID, must send the endpoint ID required for filtering. In the case of a missing endpoint ID, the transition will return a 400 error code. If use_orchestration_rule_stock_constraints equals true, filters stock_types, from and to in the in_stock stock request will be ignored
line_item_group
Stock location (endpoint)
origin_is_destination
Verify that the destination endpoint of the order linked to the parcel is equal to the origin endpoint of the parcel.
parcel
Stock location (endpoint)
is_straight_fulfilled
Verify that a line item group is straight fulfilled (retreived directly from a stock location through the order in store)
line_item_group
Stock location (endpoint)
endpoint_classification_is
classification: A list of tags and values of stock locations Example :
endpoint_type: store
is_destination: if true, verify the destination endpoint. Otherwise, verify the origin endpoint of the tested entity.
force: if true, forces the use of the parameter is_destination
Verify that the origin or destination endpoint matches all the classifications provided as parameters.
line_item_group order parcel
Stock location (endpoint)
endpoint_has_options
options: A list of option to consider Exemple :
claim_disabled: false
is_destination: indicates if the stock location is the destination of the entity
Verify that options are activated for the stock location
line_item_group parcel piece_group
Stock location (endpoint)
endpoint_has_modules_to_claim
Verify that the stock location provided in the request meets one of the following conditions:
The FFS module is enabled.
The CFS (or ROPIS) module is enabled and the endpoint (from the request or the origin, if not specified) is the destination of the order.
line_item_group order parcel
Stock location (endpoint)
endpoint_in_status
modules: Specifies the possible statuses of the store modules from which the state change is being requested. Example :
ffs: true
is_destination: Indicates whether the stock location making the request is the destination of the entity.
Verify that the store provided in the request has module statuses matching the specified parameters.
If no endpoint_id is present in the request, the origin or destination endpoint (depending on the parameter) is used instead.
line_item_group parcel piece_group
Notification
notification_has_to_be_sent
notification_name: name of the notification
Ensure that a notification of name notification_name has been sent by this entity
line_item_group order parcel piece_group
Ruleset
original_ruleset_id_in
values: The list of ruleset to compare
Verify that the original_ruleset_id of the order is matching
Ruleset chaining
original_ruleset_chaining_id_in
values: The list of ruleset chaining to compare
Verify that the original_ruleset_chaining_id of the order is matching
Line item groups
all_lines_with_same_item_in_same_endpoint
Verify that all the line item groups in the order containing the same item as the one whose state is being changed also share the same origin endpoint.
line_item_group
Line item groups
all_lines_with_same_item_in_same_endpoint_v2
order_type_is: List of order types for which the condition will be verified (i.e., it is sufficient for at least one order type to match an element in the order_type_is list for the condition to be checked). If no type matches, the condition is considered true.
Verify that all the line item groups in the order with the same item_id and the same information.line_item_id as the one whose state is being changed also share the same origin endpoint.
line_item_group
Information
information_in
key (required): The name of the key to search for in the information field.
value_type (required): The expected type of the value (string, int, or boolean for now).
values: List of expected values.
link_key (required): The link to the entity (parcel, order, line_item_group, or empty to search on the current entity).
Verify that the information field contains the specified key, that the associated value is of the expected value_type, and that it matches the given values.
For values of type float, value_type must be set to int, and the value will be shorten during verification.
The verification is performed within the information field of the entity linked through the link_key.
Note: If the link_key is set to line_item_group and the entity is a parcel or order, only the first line_item_group associated with the entity will be verified.
line_item_group order parcel
Bundle
is_bundled
Verify that the entity transitionning is linked to a bundle
line_item_group order
Line item groups
is_indivisible
Verify that a line item group is indivisible (the line item group is cannot be divided on its quantity)
line_item_group
Line item groups
lines_of_order_item_not_splitted
Verify that there is no splits between line item groups with the same order item ID between two stock locations
line_item_group
Parcel
parcels_have_dispatch_note
Verify that all parcels linked to the entity have a dispatch_note
line_item_group order parcel piece_group
Parcel
parcels_have_shipment
Verify that all parcels linked to the entity have a tracking code
line_item_group order parcel piece_group
Issue
reason_in
reasons: list of reasons of the issue of the piece
Verify that the reason of the line item groups is in the reasons
line_item_group order parcel
Bundle
all_bundles_splittable
Verify that all the bundles of the entity are splittable. If no bundle is linked to the entity, return true.
bundle line_item_group order parcel
Sales channel
sales_channel_in
values: list of sales channel to consider
Verify that the sale channel of the order is in the list
*
Transaction
all_transactions_state_in
status (required): A list of statuses to consider
verify_for_providers: Specifies the providers for which a status verification must be enforced (default: none).
verify_for_status: A list of current statuses for which status verification must be enforced (default: none).
check_amount_for_status: A list of statuses where the total paid amount is included in the verification to ensure it matches the expected price of the order.
Verify that the status of the transactions associated with the order linked to the entity is within one of the specified statuses in the parameter.
For transactions that do not meet this condition:
If the transaction belongs to a provider specified in verify_for_providers and is in a status defined in verify_for_status, the transaction's status will be updated after invoking the provider (handled through the payment module).
After the status update, the new status is re-evaluated against the list of status.
If both conditions above are met, the total amount of transactions in the statuses specified by check_amount_for_status is verified to ensure it matches the order's expected price.
line_item_group order parcel piece_group
Available actions
Entity processed / Action type
Name
Parameters
Description
Available on the following workflows
Entity processed / Action type
Name
Parameters
Description
Available on the following workflows
Stock location / Address Enrichment
assign_destination
endpoint_id: optionnal, fix id to assign
order_destination: if true, assign the order destination to the entity destination
Assign the destination endpoint of the entity (only one of the two parameters can be provided).
parcel
Stock location Enrichment
assign_origin/assign_endpoint
endpoint_id: optionnal, fixed id to assign
order_origin: if true, the order origin is used
line_item_origin: if true, the line item group origin is used
delivery_destination: if true, the delivery destination of the order is used
Assign the origin endpoint of the entity (only one of the four parameters can be provided).
line_item_group parcel
User Enrichment
assign_user
Assigns a line_item_group to a user (or to the claim)
line_item_group
Payment Update
cancel_payment_operations
Cancel the payment operations for all transactions in the order (PaymentV2 only).
order
Line item groups Transition
change_all_line_item_groups_in_same_parcel_state
state: Destination state
Triggers a state change to the specified state for all line_item_groups within the parcel containing the line_item_group.
line_item_group
Line item groups Transition
change_lines_with_same_item_state
from: Origin state
to: Destination state
Change the state of line_item_groups that share at least one item with those present in the parcel, from from to to.
parcel
Line item groups Transition
change_lines_with_same_item_state_v2
from: Origin state
to: Destination state
Change the state of line_item_groups that are not in the parcel but share the same item and order_item as a line_item_group in the parcel, from from to to.
parcel
Line item groups Transition
change_state_of_splitted_order_items
from: Origin state
to: Destination state
Change the state of line_item_groups that are not in the parcel.
parcel
Container Creation
create_container_from_parcel
container_type : le type du container
is_destination : create pour l'origin (false) ou pour la destination (true).
Créer un container côté POP lié à la parcel
*
Payment CreationLaunch
create_payment_execution
type : type of payment_execution to create
line_item_groups one of: ["capture", "refund"]
parcels one of: ["capture"]
orders one of: ["capture", "refund"]
Create a PaymentExecution (a PaymentV2 entity) of the specified type for the index ranges associated with the entity.
Type capture: Initiates the transfer of funds from the customer to the business. The amount is calculated based on the specified index ranges.
line_item_groups marked as "removed" and in a state listed in payment_v2.unsold_line_item_group_statuses (defined in the configuration) are ignored.
Type refund: Initiates a refund process.
line_item_groups: The amount is calculated based on the specified index ranges.
orders: The amount available at the payment level, considering any previous refunds.
line_item_group order parcel
Piece groupCreation
create_piece_group
Call the Partial Order Preparation workflow (store or warehouse) to create a piece_group for each line_item_group associated with the entity
line_item_group order parcel
Document Deletion
delete_document
document_type: Document type
Delete documents of type document_type from the parcels associated with the entity.
line_item_group order parcel
Piece group / Container Deletion
delete_entity
entity_type(required) : type of entity to remove (piece_group ou container)
with_destination: if true, remove the entity from the destination stock location, otherwise frome the origin
Delete entities of the Partial Order Preparation workflow.
line_item_group order parcel
Shipment Deletion
delete_shipment
database_only: if true, the carrier will not be called and the shipment will only be removed within OneStock database.
Remove the shipment from the entity parcel.
line_item_group order parcel
Order Creation
generate_order_token
Generates a token linked to the order and send it to the return manager.
order
Dynamic tag Consumption
increment_endpoint_tag
endpoint : (required) can be origin, destination or ordering (from the order details)
tag_key : tag (name) to increase
value : How much to increment (or decrement)
allow_negative : optionnal, allow to decrease the value
Increase the dynamic tag named tag_key with
value*quantity for line_item_group
value for other entities
*
Parcel EnrichmentCreation
link_to_parcel
modifiable_parcel_states: (required) An existing parcel can be used if its state is in this list.
Link to an existing parcel in the order if its origin endpoint matches the line_item_group's endpoint and its state is included in modifiable_parcel_states.
If no matching parcel is found, a new one is created.
line_item_group
Orchestration Launch
orchestrate
Launch the orchestration of the order
order
Stocks Consumption
patch_stock_constraints
remove: if true, remove the line_item_group.quantity stock constraints
Patch the stock constraints. If no parameters are provided, this action creates the stock constraint.
line_item_group
Taxes Update
refresh_order_taxes
-
Allows the creation or refresh of a tax document for the order associated with the entity.
line_item_group order parcel
Taxes Update
refund_order_taxes
-
Allows the refund of taxes paid during the order placement (based on the index_ranges of the line_item_group in the transition).
line_item_group
Taxes Deletion
void_order_taxes
-
Allows the deletion of a tax document on an order that is not finalized (i.e., it has not yet reached its final state).
order
Line item groups Deletion
remove_from_parcel
remove_if_empty (bool) : if true remove the parcel from the order if no article is in the parcel at the end of the action.
Remove the line_item_group from its parcel. (Send an error if it is not linked to a parcel)
line_item_group
Stock location Deletion
remove_origin
Opposite action from assign_origin. Remove the stock location from the origin.
enable: (bool) if false, cancel a notification previously created
notification_name: (string)
alert_id (string)
set (int)
incr (int)
Sends an alert, which can either be set to a specified level or incremented.
This action raises an alert on the order associated with the entity.
line_item_group order parcel
Notification CreationDeletion
send_change_state_notification
enable: if false, cancel a notification created previously
to: destination state
notification_name: name of the notification to send
params: object containing complementary information to send in the notification
Create a notification to later trigger an entity state change
*
Notification CreationDeletion
send_notification
enable: if false, cancel a notification created previously
notification_name: name of the notification to send
params : object containing complementary information to send in the notification
Send a notification
line_item_group order parcel
SMS Creation
send_sms
Can take one of the two following parameter :
script_name : name of the script to generate the sms
template_name : name of the template to generate the parameter
Send a notification that generates and send a SMS
Notification Creation
set_expiration_date
expire_in (required): (string) duration (Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h")
test_expire_in: (string) duration (Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"). PREPROD ONLY, will override expire_in value
apply_on : (string) empty (by default), order or parcel. It can be parcel only on LIG graph, and empty only on order and parcel graph.
name : (string) expiration name (only used with orders)
endpoint_timetable : (bool) true to compute with an endpoint timetable, false for calendar computation
To use the stock location timetable, if endpoint_timetable is true :
timetable (required if endpoint_timetable vaut true): (string) timetable to use for the computation (opening.open, options.claim_disabled, ...).
endpoint : (origin or destination) endpoint to use. If empty, uses request's endpoint
accuracy : (string) day (by default) or hour.
day : day granularity
hour : hour granularity
moment : (string) exact (by default), end or start .
exact : date / hours depending on expire_in
start, computed from expire_in
Start of the 1st slot if day accuracy
Start of the 1st slot of the day if hour accuracy
end, computed from expire_in
End of the last slot if day accuracy
End of the last slot of the day if hour accuracy
Set an expiration date on an entity.
On bundle graph, can only apply on order.
On line_item_group graph, can apply on parcel or order.
On parcel graph, can apply on itself or on order.
On order graph, can only apply on itself.
*
Delivery Promise Update
set_milestone
milestone: the acheived milestone name. If empty, without_always_at_start milestone is set.
Modify the current milestone of impacted line item groups in the DPDetails.
line_item_group order parcel
Notification Creation
set_milestone_alert
milestone: the milestone name
notifications: list of notifications to create
name: notification name
delay: in seconds
test_delay: in seconds. On testing environment : will override delay value
params: additional parameters to add to the notification
Schedule a set of given notifications for entity index ranges.
Each notification will be triggered at the time of the milestone cutoff (plus the given delay). When triggered, a validity check will be performed to ensure the specified milestone has not yet been reached/achieved.
A special notification named "recompute_cutoffs_sets" can be called to recompute the cutoffs for each milestones.
line_item_group parcel
Carrier Enrichment
set_parcel_eligible_carriers
forced : if true force the carrier assignation from the delivery promise (parcel.delivery.carrier). Si false, carrier is not modified if already found.
Allows saving of the eligible carriers for the parcel, as determined by the orchestrator and the delivery promise.
parcel
Stocks Launch
start_history_referencing
references ([])
name - (required) string : name of the reference
type - string : reference type
comment - string : comment to add to the reference
external_date - int64 : date
metadata - map[string]any : additional data
fail_on_error - bool : if true, the action returns an error, otherwise the error is only logged
Creates a table of references and saves them in the transitioning entity or entities. It then starts recording stock movements triggered after the action is called.
The recorded references are activated before each state transition.
line_item_group order parcel
Stocks Launch
stop_history_referencing
all (bool): If set to true, all current references associated with the entity are stopped.
comment (string): A comment to provide context when stopping all references.
references (array): Specifies the references to stop. Each reference includes:
name (string): The name of the reference, or metadata.XXXX to compare a metadata value with metadata_value using metadata_cmp.
metadata_cmp (string): The comparison operator to use for metadata. Possible values:
"=", ">", ">=", "<", "<=", "!=".
metadata_value (any): The value to compare against the metadata.
external_date_cmp (string): The comparison operator for external dates. Possible values:
"=", ">", ">=", "<", "<=", "!=".
external_date (int64): The date to compare, in a timestamp format.
type (string): The type of the reference.
comment (string): A comment to associate with the reference being stopped.
metadata (map[string]any): Additional data associated with the reference.
fail_on_error (bool):
If true, the action returns an error if an issue occurs.
If false, errors are only logged.
This action stops the use of references activated during the transition that match the parameters specified in the action. For instance, during a transition of a line_item_group, you can stop the active reference of the associated order. However, the reference will not be removed from the entity_historizer of the order unless the stop_history_referencing action is used during a transition of the order itself.
line_item_group order parcel
Stats Consumption
stats_entity_update
state (string): The state to be saved in the stat-manager.
is_destination (bool): Indicates whether to send the stat for:
false: The origin.
true: The destination.
link_key (string): Allows sending stats for each entity linked by the specified link_key.
Envoie des infos au stat manager pour un changement d'état d'entités
line_item_group order parcel
Stats Consumption
stats_remove_entity_endpoint_state
state: l'état à sauvegarder dans le stat-manager
is_destination: envoi une stat pour l'origin (false) ou pour la destination (true).
link_key: permet de supprimer des stats pour chaque entité liée de type link_key
Sends information to the stat manager for a state change of entities.
line_item_group order parcel
Capacity Consumption
unconsume_capacity
For the line_item_group: Cancels the consumption of endpoint and endpoint_carrier capacities for the line_item_group (if it is the last one in the parcel).
For the parcel: Cancels the consumption of endpoint_carrier.
line_item_group parcel
Bundle Transition
update_bundles_state
state : Destination state. If not filled, the automatic transitions will be triggered.
Change the state of the associated bundle.
line_item_group
Line item groups Transition
update_line_item_groups_state
state: Destination state. If not filled, the automatic transitions will be triggered.
Change the state of the associated line_item_group.
If this action is triggered within the bundle graph, the state of associated line_item_groups already in the state is not changed.
line_item_group order parcel bundle
Order Transition
update_order_state
state: Destination state. If not filled, the automatic transitions will be triggered.
Change the state of the associated order.
line_item_group order parcel bundle
Parcels Transition
update_parcels_state
state: Destination state. If not filled, the automatic transitions will be triggered.
Change the state of the associated parcel.
line_item_group order parcel bundle
Piece groups Transition
update_piece_groups_state
state: Destination state (Mandatory)
from: Origin state
unlink: (false by default), indicate if the link is removed with the piece_group
Change the state of the piece_group with the line_item_group.
line_item_group
Return line item groups Transition
update_return_line_item_groups_state
state: Destination state. If not filled, the automatic transitions will be triggered.
Change the state of the associated return_line_item_groups.
line_item_group
Stocks ConsumptionUpdate
update_reserved_stock
creation: boolean indicate if the stock needs to be incremented or decremented.
endpoint: boolean indicate if we modify the reserved stock from the associated stock location (true) or global stock (false).
move_reservation: if true, remove the global reservation and create a stock location reservation
use_stock_constraints: if true, take the orchestration constraints into accounth to reserve the right stock. (Should not be used if not orchestrated)
with_destination: boolean, indicate if the destination piece_groups are removed
Increments or decrements the reserved stock for the item ID of the line_item_groups associated with the transitioned entity.
line_item_group order parcel
Stocks ConsumptionUpdate
update_stock
quantity: indicate how much stock are incremented or its new value.
incremental: indicate if the stock value must be overwritten (false) or incremented (true)
Update stock for the line_item_groups linked to the transitionned entity, for the origin stock location of the line item groups.