Answers.Body: <p>I needed to put my <code>"related"</code> array inside a <code>"content"</code> array:</p>
  
  <pre><code>[
  
    {
      "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
      "content": {
        "related": {
          "relatedResources": {
              "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
              "params": {
                  "slug": "test-import-child",
                  "sectionId": 2,
                  "siteId": 1
                }
            }
        }
      },
      "settings": {
        "updateElement": {
          "params": {
            "slug": "test-import-parent",
            "sectionId": 2,
            "siteId": 1
          }
        }
      }
    }
  
  ]
  </code></pre>
  
  <p>I also added the <code>siteId</code> parameter as a matter of good practice but it's not strictly necessary.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-10T21:28:03.797Z
Answers.LastActivityDate: 2019-01-10T21:28:03.797Z
Answers.UserDisplayName: kmgdev
Answers.Body: <p>Reasons why it is not updating</p>
  
  <ol>
  <li>The fields data should be wrapped with <strong>fields</strong>.</li>
  <li>If entry is on other site add <strong>siteId</strong> on params
  E.g.</li>
  </ol>
  
  <p><code>[
    {
      "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
      "content": {
        "title": "Test Import Parent",
        "fields": {
          "body": "Lorem ipsum dolor sit amet."
        }
      },
      "settings": {
        "updateElement": {
          "params": {
            "slug": "test-import-parent",
            "sectionId": 2,
            "siteId": 1
          }
        }
      }
    }
  ]</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-07T09:20:18.743Z
Answers.LastActivityDate: 2019-01-07T09:20:18.743Z
Answers.UserDisplayName: Dale Ramirez
Body: <p>I'm trying to update existing entries with Sprout Import but when I run the import even though there are no errors the entry's data is not updated. I simplified the JSON script as much as I could and it's still not working:</p>
  
  <pre><code>[
      {
      "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
      "related": {
        "relatedResources": {
            "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
            "params": {
                "slug": "test-import-child",
                "sectionId": 2
              }
          }
      },
      "settings": {
        "updateElement": {
          "params": {
            "slug": "test-import-parent",
            "sectionId": 2
          }
        }
      }
    }
  ]
  </code></pre>
  
  <p>I also tried doing it with just a plain text field instead of a relationship field and still didn't get any change.</p>
  
  <pre><code>[
    {
      "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
      "content": {
          "body": "Lorem ipsum dolor sit amet."
      },
      "settings": {
        "updateElement": {
          "params": {
            "slug": "test-import-parent",
            "sectionId": 2
          }
        }
      }
    }
  ]
  </code></pre>
  
Tags: <plugin-sproutimport>
Title: Sprout Import: No Changes When Updating Entry
ThreadText: # Sprout Import: No Changes When Updating Entry
  
  (Asked by: username_0 on 2018-12-29)
  
  I'm trying to update existing entries with Sprout Import but when I run the import even though there are no errors the entry's data is not updated. I simplified the JSON script as much as I could and it's still not working:
  
  ```
  [
      {
      "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
      "related": {
        "relatedResources": {
            "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
            "params": {
                "slug": "test-import-child",
                "sectionId": 2
              }
          }
      },
      "settings": {
        "updateElement": {
          "params": {
            "slug": "test-import-parent",
            "sectionId": 2
          }
        }
      }
    }
  ]
  
  ```
  
  I also tried doing it with just a plain text field instead of a relationship field and still didn't get any change.
  
  ```
  [
    {
      "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
      "content": {
          "body": "Lorem ipsum dolor sit amet."
      },
      "settings": {
        "updateElement": {
          "params": {
            "slug": "test-import-parent",
            "sectionId": 2
          }
        }
      }
    }
  ]
  
  ```
  
  **Tags:** plugin-sproutimport
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2019-01-10. Score: 2 | Accepted answer
  
  I needed to put my `"related"` array inside a `"content"` array:
  
  ```
  [
  
    {
      "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
      "content": {
        "related": {
          "relatedResources": {
              "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
              "params": {
                  "slug": "test-import-child",
                  "sectionId": 2,
                  "siteId": 1
                }
            }
        }
      },
      "settings": {
        "updateElement": {
          "params": {
            "slug": "test-import-parent",
            "sectionId": 2,
            "siteId": 1
          }
        }
      }
    }
  
  ]
  
  ```
  
  I also added the `siteId` parameter as a matter of good practice but it's not strictly necessary.
  
  
  ---
  
  ### Answer by username_1 on 2019-01-07. Score: 2
  
  Reasons why it is not updating
  
  1. The fields data should be wrapped with **fields**.
  2. If entry is on other site add **siteId** on params
     E.g.
  
  `[
  {
  "@model": "barrelstrength\\sproutbase\\app\\import\\importers\\elements\\Entry",
  "content": {
  "title": "Test Import Parent",
  "fields": {
  "body": "Lorem ipsum dolor sit amet."
  }
  },
  "settings": {
  "updateElement": {
  "params": {
  "slug": "test-import-parent",
  "sectionId": 2,
  "siteId": 1
  }
  }
  }
  }
  ]`
  
  
  ---
  
  