What are line item attributes?
Line item properties are additional details stored against individual product line within a subscription - such as delivery preferences, gift messages, personalisation notes or bundle configurations. These are captured at checkout and are applied to every subscription order generated by Submarine.
Submarine carries these attributes through to every recurring order, so the original attributes are automatically populated each time an order is created by Submarine.
You can view and edit those attributes directly in Submarines UI and via the API when you need to make changes after the initial checkout order.
When to use this action
Use this when you need to:
- View the line item attributes stored against a subscription product line
- Update attribute details on a specific product line
View line item attributes
- Open the Subscription
- Under the Subscription order lines section, locate the product whose attributes you'd like to view
- Click the
</> # attributesbadge beneath the product name - The attributes will expand inline, showing all key value pairs attached to that line
Note: Attributes are hidden by default. Click the badge again to expand them.
Edit line item attributes on an ongoing basis
Line item attributes can be edited on a child subscription order or across all orders via the subscription.
- Open the subscription
- In the Subscription lines section, expand the attributes for the relevant product line by clicking the
</> N attributesbadge - Click Edit
- Make your changes:
- Edit the value of any existing attribute
- Remove an attribute by clicking Remove next to it
- Add a new attribute by entering a name in the New attribute name field and clicking Add
- If you'd like your changes to also apply to any already edited but unprocessed subscription orders, check Overwrite changes on child subscription order lines. Leave this unticked to preserve any attribute edits that have already been made on those individual orders.
- Click Save
- This will apply the change across all subscription order line attributes.
Edit line item attributes on a single subscription order
Use this when you need to update attributes for one specific order only, without affecting the overall subscription or any other orders.
- Open the subscription
- Open the specific subscription order you'd like to update
- In the Subscription order lines section, expand the attributes for the relevant product line by clicking the
</> N attributesbadge - Click Edit (appears to the right once attributes are expanded)
- Make your changes - you can:
- Edit the value of any existing attribute
- Remove an attribute by clicking Remove next to it
- Add a new attribute by entering a name in the New attribute name field and clicking Add
- Click Save
- This will apply the changes to the singular subscription order.
Notes & Tips
- The number shown on the badge (e.g. 20 attributes) reflects the total count of attributes on that line - useful for quickly spotting lines with complex configurations
- When editing at the subscription level, use the Overwrite changes on child subscription order lines checkbox if you also need those changes to apply to orders that have already been generated but not yet processed
- Line item attributes are separate from subscription level custom attributes, which are managed via the Custom Attributes section on the subscription record
- The mutation structure for sending requests to the API for subscriptions and subscription order editing would follow the pattern below.
Please note that when sending updates, you need to send the full set of attributes even if only 1 of 10 is being changed. If you are editing the lines but not the customAttributes, then please remove the argument altogether; sending
"customAttributes": []will remove the custom attributes.