_rental_intent_token was a custom property attached to Shopify order line items that contained information about rental intents in Supercycle.
Overview
The_rental_intent_token was a JSON serialized token that contained all necessary information to create a rental when a customer purchased an item. This token was generated when customers selected rental options in the storefront and was processed when orders were fulfilled.
Field definitions
| Field | Type | Description |
|---|---|---|
variant_id | Integer | Internal variant ID (not Shopify ID). |
available_item_count | Integer | Number of items available for this rental. |
available_items | Array of integers | List of internal item IDs that were available. |
schedule | Object | Nested schedule information. |
schedule.rental_start | Date/datetime | When the rental period starts. |
schedule.rental_end | Date/datetime | When the rental period ends. |
schedule.fulfill_at | Datetime (nullable) | When to fulfill/ship the order. |
schedule.receive_at | Datetime (nullable) | When customer should receive the item. |
schedule.restock_by | Datetime (nullable) | When item should be back in inventory. |
schedule.minimum_rental_end | Date (nullable) | Minimum allowed rental end date. |
location_id | Integer (optional) | Shopify location ID where item should come from. |
condition_ids | Array of integers (optional) | Acceptable condition IDs for the item. |
custom_fields | Object (optional) | Custom field key-value pairs. |
method_type | String | Rental type: calendar, subscription, membership, or resale. |
Code example
Mapping to new format
| Old format | New format |
|---|---|
variant_id | Not included (inferred from line item). |
available_item_count | Moved to _validations.quantity.max. |
available_items | Not included (replaced by filters). |
schedule.rental_start | rental_start |
schedule.rental_end | rental_end |
schedule.fulfill_at | Not included (calculated separately). |
schedule.receive_at | Not included (calculated separately). |
schedule.restock_by | Not included (calculated separately). |
schedule.minimum_rental_end | Not included (calculated separately). |
location_id | item.filters.location.shopify_id |
condition_ids | item.filters.condition.ids |
custom_fields | attachments.custom_fields |
method_type | method_type |