Skip to content

Instantly share code, notes, and snippets.

@zsy715
Last active June 5, 2019 15:12
Show Gist options
  • Save zsy715/37f9091106a808b2af1c619e79783307 to your computer and use it in GitHub Desktop.
Save zsy715/37f9091106a808b2af1c619e79783307 to your computer and use it in GitHub Desktop.

DME shipment file import process:

  • import line by line
  • get shipment by incrementId(order id lie BB*****)
    • run query Select * from birchbox_shipment_history WHERE increment_id =
    • shoud return shipment, tracking number should be empty and status should be processing
  • update shipment
    • run query
        UPDATE birchbox_shipment_history SET status = 'completed', 
            shipped_at = NOW(),
            tracking_number = ,
            shipping_method_code = ,
              shipping_method_description = ,
              shipping_facility = ,
              where id = 
    • for UK get shop id
    • for UK or US, postLabelCreatedEvent to BBMS and Braze
    • for US, if bbms box series not enabled, notify shipped by http request to BBMS transactional high endpoint
        SELECT ce.email, cev.value as name
          FROM birchbox_shipment_history bsh
          JOIN customer_entity ce ON ce.entity_id = bsh.customer_id
          JOIN catalog_product_entity_varchar cpev ON bsh.box_product_id = cpev.entity_id
          LEFT JOIN customer_entity_varchar cev ON cev.entity_id = ce.entity_id 
          and cev.attribute_id=(SELECT attribute_id FROM eav_attribute WHERE entity_type_id = 1 AND attribute_code = 'firstname')
          WHERE bsh.id =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment