diff --git entity/entity.module entity/entity.module
index 80b2a37..a3ef088 100644
--- entity/entity.module
+++ entity/entity.module
@@ -205,10 +205,10 @@ function entity_build_content($entity_type, $entity, $view_mode = 'full', $langc
  * @see entity_extract_ids()
  */
 function entity_id($entity_type, $entity) {
-  $info = entity_get_info($entity_type);
-  if (isset($info['entity class']) && method_exists($info['entity class'], 'identifier')) {
+  if (method_exists($entity, 'identifier')) {
     return $entity->identifier();
   }
+  $info = entity_get_info($entity_type);
   $key = isset($info['entity keys']['name']) ? $info['entity keys']['name'] : $info['entity keys']['id'];
   return isset($entity->$key) ? $entity->$key : NULL;
 }
@@ -555,7 +555,7 @@ function entity_forms($form_id, $args) {
  *   initialized with empty values using entity_create(). Thus entities, for
  *   which this is problematic have to care to pass in an initialized entity.
  * @param $op
- *   One of 'edit', 'add' or 'clone. Defaults to edit.
+ *   One of 'edit', 'add' or 'clone'. Defaults to edit.
  *
  * @return
  *   The fully built and processed form, ready to be rendered.
diff --git entity/entity.ui.inc entity/entity.ui.inc
index 76d95db..7f212d8 100644
--- entity/entity.ui.inc
+++ entity/entity.ui.inc
@@ -81,6 +81,17 @@ class EntityDefaultUIController {
       'access arguments' => array('delete', $this->entityType, $id_count + 1),
       'file' => 'entity.ui.inc',
     );
+    // Menu item for importing an entity.
+    $items[$this->path . '/import'] = array(
+      'title callback' => 'entity_ui_import_title',
+      'title arguments' => array($this->entityType),
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array($this->entityType . '_operation_form', $this->entityType, NULL, 'import'),
+      'access callback' => 'entity_access',
+      'access arguments' => array('create', $this->entityType),
+      'file' => 'entity.ui.inc',
+      'type' => MENU_LOCAL_ACTION,
+    );
 
     if (!empty($this->entityInfo['admin ui']['file'])) {
       // Add in the include file for the entity form.
@@ -178,7 +189,11 @@ class EntityDefaultUIController {
     }
     // Add operations with the right colspan.
     $field_ui = !empty($this->entityInfo['bundle of']) && module_exists('field_ui');
-    $header[] = array('data' => t('Operations'), 'colspan' => $field_ui ? 5 : 3);
+    $exportable = !empty($this->entityInfo['exportable']);
+    $colspan = 3;
+    $colspan = $field_ui ? $colspan + 2 : $colspan;
+    $colspan = $exportable ? $colspan + 1 : $colspan;
+    $header[] = array('data' => t('Operations'), 'colspan' => $colspan);
 
     $render = array(
       '#theme' => 'table',
@@ -221,10 +236,15 @@ class EntityDefaultUIController {
     }
     // In case this is a bundle, we add links to the field ui tabs.
     $field_ui = !empty($this->entityInfo['bundle of']) && module_exists('field_ui');
+    // For exportable entities we add an export link.
+    $exportable = !empty($this->entityInfo['exportable']);
+    $colspan = 3;
+    $colspan = $field_ui ? $colspan + 2 : $colspan;
+    $colspan = $exportable ? $colspan + 1 : $colspan;
 
     // Add operations depending on the status.
     if (entity_has_status($this->entityType, $entity, ENTITY_FIXED)) {
-      $row[] = array('data' => l(t('clone'), $this->path . '/manage/' . $id . '/clone'), 'colspan' => $field_ui ? 5 : 3);
+      $row[] = array('data' => l(t('clone'), $this->path . '/manage/' . $id . '/clone'), 'colspan' => $colspan);
     }
     else {
       $row[] = l(t('edit'), $this->path . '/manage/' . $id);
@@ -245,6 +265,9 @@ class EntityDefaultUIController {
         $row[] = '';
       }
     }
+    if ($exportable) {
+      $row[] = l(t('export'), $this->path . '/manage/' . $id . '/export');
+    }
     return $row;
   }
 
@@ -253,15 +276,42 @@ class EntityDefaultUIController {
    * Builds the operation form.
    */
   public function operationForm($form, &$form_state, $entity, $op) {
-    $label = entity_label($this->entityType, $entity);
     switch ($op) {
       case 'revert':
+        $label = entity_label($this->entityType, $entity);
         $confirm_question = t('Are you sure you want to revert the %entity %label?', array('%entity' => $this->entityInfo['label'], '%label' => $label));
         return confirm_form($form, $confirm_question, $this->path);
 
       case 'delete':
+        $label = entity_label($this->entityType, $entity);
         $confirm_question = t('Are you sure you want to delete the %entity %label?', array('%entity' => $this->entityInfo['label'], '%label' => $label));
         return confirm_form($form, $confirm_question, $this->path);
+
+      case 'export':
+        if (!empty($this->entityInfo['exportable'])) {
+          $export = entity_export($this->entityType, $entity);
+          $form['export'] = array(
+            '#type' => 'textarea',
+            '#title' => t('Export'),
+            '#description' => t('Copy these data and paste them into the import page, to import.'),
+            '#rows' => count(explode("\n", $export)),
+            '#default_value' => $export,
+          );
+          return $form;
+        }
+
+      case 'import':
+        $form['import'] = array(
+          '#type' => 'textarea',
+          '#title' => t('Import'),
+          '#description' => t('Paste an exported %entity_type here.', array('%entity_type' => $this->entityInfo['label'])),
+          '#rows' => 20,
+        );
+        $form['submit'] = array(
+          '#type' => 'submit',
+          '#value' => t('Import'),
+        );
+        return $form;
     }
     drupal_not_found();
     exit;
@@ -270,7 +320,27 @@ class EntityDefaultUIController {
   /**
    * Operation form validation callback.
    */
-  public function operationFormValidate($form, &$form_state) { }
+  public function operationFormValidate($form, &$form_state) {
+    if ($form_state['op'] == 'import') {
+      @eval('$import = ' . $form_state['values']['import'] . ';');
+      $id = entity_id($this->entityType, $import);
+      if (isset($import) && isset($id)) {
+        $existing_entity = reset(entity_load($this->entityType, array($id)));
+        if (empty($existing_entity)) {
+          // eval() was successful and entity does not yet exist in the DB.
+          $form_state[$this->entityType] = $import;
+        }
+        else {
+          $label = entity_label($this->entityType, $import);
+          $vars = array('%entity' => $this->entityInfo['label'], '%label' => $label);
+          form_set_error('import', t('Import of %entity %label failed, a %entity with the same machine name already exists.', $vars));
+        }
+      }
+      else {
+        form_set_error('import', t('Import failed.'));
+      }
+    }
+  }
 
   /**
    * Operation form submit callback.
@@ -309,6 +379,11 @@ class EntityDefaultUIController {
         watchdog($this->entityType, 'Deleted %entity %label.', $vars);
         return t('Deleted %entity %label.', $vars);
 
+      case 'import':
+        entity_save($this->entityType, $entity);
+        watchdog($this->entityType, 'Imported %entity %label.', $vars);
+        return t('Imported %entity %label.', $vars);
+
       default:
         return FALSE;
     }
@@ -440,6 +515,11 @@ function entity_ui_get_page_title($op, $entity_type, $entity = NULL) {
       return t('Revert @label', array('@label' => $label));
     case 'delete':
       return t('Delete @label', array('@label' => $label));
+    case 'export':
+      return t('Export @label', array('@label' => $label));
+    case 'import':
+      $info = entity_get_info($entity_type);
+      return t('Import @entity_type', array('@entity_type' => $info['label']));
   }
 }
 
@@ -452,6 +532,15 @@ function entity_ui_add_title($entity_type) {
 }
 
 /**
+ * Menu title callback for the 'Import' menu item.
+ */
+function entity_ui_import_title($entity_type) {
+  $entity_info = entity_get_info($entity_type);
+  return t('Import a @entity', array('@entity' => drupal_strtolower($entity_info['label'])));
+}
+
+
+/**
  * Submit builder for the main entity form, which extracts the form values and updates the entity.
  *
  * This is a helper function for entities making use of the entity UI
