> ## Documentation Index
> Fetch the complete documentation index at: https://pro-docs.bglobale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RMA Variables & Events

The Returns portal uses RMA events and variables to automate and personalize email and SMS notifications. You can trigger notifications based on actions, such as request approved or shipment received, and personalize the content using variables such as RMA ID, order status, and rejection reason.

You can open the Variables and Events page by clicking the lighting bolt icon on the email content page. From here you can view all available options.

If you have a marketing integration such as Klaviyo, RMA events can also be used to trigger notifications sent through the third-party platform.

## Events

The Returns portal events can be used as triggers to automatically send certain notifications when a specific event happens, such as when a request is approved or a shipment is received.

### Returns Events

Supported return events include:

| **Pending Approval** - The return request is pending approval on the Returns portal.<br />**Request Approved** - The return request has been approved.<br />**Request Rejected** - The return request has been rejected.<br />**Request Canceled** - The return request has been canceled.<br />**Request Reopened** - The return request was canceled and has been reopened. | **Order Canceled** - The order has been canceled.<br />**Shipment Received** - The return shipment has been received.<br />**Shipment In-Transit** - The return shipment is on its way.<br />**Manual Credit** - Store credit has been issued to the customer.<br />**Manual Gift Card** - A gift card has been issued to the customer. |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

### Tracking Events

Supported tracking events include:

| **Order In transit** - Order is in transit.<br />**Order waiting for pickup** - Order is waiting for pickup.<br />**Order out for delivery** - Order is out for delivery. | **Order ready for collection** - Order is ready for collection.<br />**Order delivered** - Order was delivered.<br />**Order failure to deliver** - Order failed to deliver. |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

## Variables

Adding variables to your notifications personalizes the information provided, such as adding the RMA ID or reject reason directly into the message.

### Returns Variables

| `rma_id`                                | The ID number of the customer's return request.                        |
| --------------------------------------- | ---------------------------------------------------------------------- |
| `payment_authorization_expiration_date` | Date of charge of authorized amount.                                   |
| `rma_created_at`                        | RMA created date.                                                      |
| `rma_status`                            | The status of the return request.                                      |
| `order_name`                            | The ID number of the customer's order.                                 |
| `first_name`                            | The customer's first name.                                             |
| `last_name`                             | The customer's last name.                                              |
| `full_name`                             | The customer's full name.                                              |
| `store_name`                            | The name of your online store.                                         |
| `store_url`                             | The link to your online store.                                         |
| `reject_reason`                         | The reason the return request was rejected.                            |
| `cancel_reason`                         | The reason the return request was canceled.                            |
| `expire`                                | The remaining time before a gift card or store credit expires.         |
| `credits`                               | The amount of store credit the customer has in their balance.          |
| `payment_currency_code`                 | The currency used to pay for the order.                                |
| `customer_support_url`                  | The link for contacting your customer support.                         |
| `carrier_location_name`                 | The name of the drop-off location.                                     |
| `refund_provider`                       | The entity that issues the refund.                                     |
| `tracking_number`                       | The number used to track the return shipment.                          |
| `tracking_link`                         | Shipment tracking URL.                                                 |
| `expected_delivery_date`                | The date the delivery is expected to arrive.                           |
| `shipping_date`                         | The date the shipping label was created.                               |
| `return_label_url`                      | Shipping label URL.                                                    |
| `packing_slip_url`                      | Packing slip URL.                                                      |
| `qr_code_link`                          | QR code URL.                                                           |
| `return_method`                         | Return method name (internal).                                         |
| `return_type`                           | Return type (Return / Exchange / Mixed).                               |
| `gift_card_code`                        | Generated gift card code, when applicable.                             |
| `portal_name`                           | The name of the relevant portal, as it appears in the portal selector. |

### Tracking Variables

| `order_name`              | The ID number of the customer's order.              |
| ------------------------- | --------------------------------------------------- |
| `first_name`              | The customer's first name.                          |
| `last_name`               | The customer's last name.                           |
| `full_name`               | The customer's full name.                           |
| `store_name`              | The name of your online store.                      |
| `store_url`               | The link to your online store.                      |
| `customer_support_url`    | The link for contacting your customer support.      |
| `order_tracking_number`   | Order tracking number.                              |
| `portal_tracking_url`     | Portal tracking URL.                                |
| `unsubscribe_link`        | Tracking unsubscribe link.                          |
| `status_description`      | Description of the main tracking status sub-status. |
| `estimated_delivery_date` | Order estimated delivery date.                      |
| `carrier_name`            | Carrier for this delivery.                          |
