Gift wrap and gift messages

When a new gift wrap item is created in Magento Commerce (MC), it needs to be synchronized with your Order Management System (OMS) in order to correctly import orders with these new gift wrapping options:

  1. A new magento.catalog.product_management.updated message is sent to the OMS and the gift wrap is created as a SKU in your OMS catalog.
  2. Orders placed with tge gift wrap option contain the SKU of the selected gift wrap to be processed correctly in your OMS.
  3. The gift message and additional details (for example, if a customer requested a printed card or a gift receipt) will be sent to the OMS as custom attributes.

New gift wrap created

When an MC client creates a new gift wrap option a magento.catalog.product_management.updated message is sent to OMS to be enabled. This message contains the SKU of the gif wrap, which is the name of the Gift Wrapping Design, such as “Blue-paper-wrap”.

Example

{
  "product": {
    "id": "Blue-paper-wrap",
    "type": "service",
    "sku": "Blue-paper-wrap",
    "name": [
      {
        "value": "Blue Paper Wrap",
        "channel": "string",
        "locale": "string"
      }
    ],
    "status": "active"
  }
}

Process order

Magento supports gift wrapping and gift messages at the order level or at the line level.

In the Magento Admin panel the gift wrap applied to the entire order is displayed at the top of the Items Ordered section.

When the gift wrap is applied to a specific order line it is displayed inside the Items Ordered section within the line that requires the gift wrapping.

Example of a gift wrap applied to an entire order

Gift wrap order

Example of a gift wrap applied to a specific line

Gift wrap line

In the OMS Backoffice, the gift wrapping is always displayed as an order line (as displayed in the following image with the line defined with the Service type):

Gift wrap oms

Example

{
    "order": {
        "customer_service_agent": null,
        "id": "000222244",
        "ip": "80.169.76.250",
        "language": "en_US",
        "lines": [
            ...
            {

                "id": "2",
                "line_number": 2,
                "product_name": "Blue Paper Wrap",
                "product_type": "SERVICE",
                "sku": "Blue-paper-wrap",
                "shipping_address_reference": "339",
                "amount": {
                    "currency": "USD",
                    "gross_amount": 0,
                    "net_amount": 0,
                    "tax_amount": 0,
                    "tax_rate": 0,
                    "taxes": [
                        {
                            "amount": 0,
                            "rate": 0,
                            "type": "NO TAX"
                        }
                    ]
                },
                "custom_attributes": [
                    {
                        "name": "sender",
                        "value": "name of sender"
                    },
                    {
                        "name": "receiver",
                        "value": "name of recipient"
                    },
                    {
                        "name": "gift_message",
                        "value": "message"
                    },
                    {
                        "name": "printed_card",
                        "value": "yes"
                    },
                    {
                        "name": "gift_receipt",
                        "value": "yes"
                    }
                ]
            }
        ...
        ]
    }    
}     

The shipment request message sent from the OMS to the logistic provider will include the detail of the gift wrap as an order line. If the gift wrap is applied to the entire order and the order is split into two different sources, both generated shipment requests will include the gift wrap line.

Example

{
    "request_id": "STORE-000222244-01",
    "sales_channel": "STORE",
    "order_id": "000222244",
    "source_id": "SOU1",
    "shipping_method": "STANDARD",
    "items": [
        ...
        {
            "order_line_id": "2",
            "order_line_number": 2,
            "item_type": "SERVICE",
            "sku": "blue-paper-wrap",
            "custom_details": [
                {
                    "name": "sender",
                    "value": "name of sender"
                },
                {
                    "name": "receiver",
                    "value": "name of recipient"
                },
                {
                    "name": "gift_message",
                    "value": "message"
                },
                {
                    "name": "printed_card",
                    "value": "yes"
                },
                {
                    "name": "gift_receipt",
                    "value": "yes"
                },
                {
                    "name": "imageUrl",
                    "value": "https:\/\/omconnect-130-bas4g2q-3q6onvytdtx6m.us-4.magentosite.cloud\/media\/wrapping\/paper.jpg"
                }
            ],
            "status": "NEW",
            "status_reason": "ITEM_PENDING_PICKING"
            ...
        }
    ]
   ...
}

Solution limitations

Currently the gift wrap details are not shown in the Ship From Store/Ship To Store picklists or the ISPU picking screens.