Forum Discussion

Vikas2022's avatar
Vikas2022
New Contributor II
2 years ago

NetSuite Update SNAP updating unchanged fields

Hello,

I am reading data from Salesforce for a couple of fields and using NetSuite Update Snap, to update the record for those fields in the NetSuite Customer object. 

However, While updating records in NetSuite (System Notes) what I have observed is every time any Salesforce-specific field value is changed let's say for Invoice_Preference__c from "Other" to "Email", Then along with "Invoice Preference", the "Address field" in NetSuite (System Notes) is also logged as Create type. 

So why is this happening only for the Address field and how can it be avoided?

Salesforce Input data 

[
  {
    "record": {
      "companyName": "GTML2C-483_test1",
      "customFields": {
        "Invoice Preference": {
          "internalId": 1
        },
        "SFDC ID": "0015Ed9AE",
        "UCID": "101575",
        "PO required": false,
        "Multiple Invoice Emails": false,
        "Additional Invoice Emails": null
      },
      "parent": {
        "externalId": null
      },
      "currency": {
        "internalId": 1
      },
      "phone": null,
      "addressbookList": {
        "addressbook": [
          {
            "addressbookAddress": {
              "addr1": "Ring 1",
              "city": "Vienna",
              "zip": "1010",
              "state": null,
              "country": "_austria"
            },
            "defaultBilling": "true",
            "defaultShipping": "false"
          },
          {
            "addressbookAddress": {
              "city": "Vienna",
              "zip": "1010",
              "state": null,
              "addr1": "Ring 1",
              "country": "_austria"
            },
            "defaultBilling": "false",
            "defaultShipping": "true"
          }
        ],
        "replaceAll": "false"
      },
      "email": "v.xyz@xyz.com",
      "externalId": "0015Ed9AE",
      "fax": null,
      "accountNumber": "2974",
      "comments": null,
      "vatRegNumber": null,
      "taxItem": {
        "name": null
      },
      "terms": {
        "internalId": null
      },
      "subsidiary": {
        "internalId": 1
      },
      "internalId": "28248"
    }
  }
]

 

NetSuite Update Snap Output

[
  {
    "soapenv:Body": {
      "@xmlns:soapenv": "http://schemas.xmlsoap.org/soap/envelope/",
      "@xmlns:xsd": "http://www.w3.org/2001/XMLSchema",
      "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
      "updateResponse": {
        "@xmlns": "urn:messages_2020_1.platform.webservices.netsuite.com",
        "writeResponse": {
          "platformCore:status": {
            "@xmlns:platformCore": "urn:core_2020_1.platform.webservices.netsuite.com",
            "@isSuccess": "true",
            "platformCore:statusDetail": {
              "platformCore:afterSubmitFailed": "false"
            }
          },
          "baseRef": {
            "@xmlns:platformCore": "urn:core_2020_1.platform.webservices.netsuite.com",
            "@externalId": "0015Ed9AE",
            "@internalId": "28248",
            "@type": "customer",
            "@xsi:type": "platformCore:RecordRef"
          }
        }
      }
    },
    "original": {
      "record": {
        "companyName": "GTML2C-483_test1",
        "customFields": {
          "Invoice Preference": {
            "internalId": 1
          },
          "SFDC ID": "0015Ed9AE",
          "UCID": "101575",
          "PO required": false,
          "Multiple Invoice Emails": false,
          "Additional Invoice Emails": null
        },
        "parent": {
          "externalId": null
        },
        "currency": {
          "internalId": 1
        },
        "addressbookList": {
          "addressbook": [
            {
              "addressbookAddress": {
                "addr1": "Ring 1",
                "city": "Vienna",
                "zip": "1010",
                "state": null,
                "country": "_austria"
              },
              "defaultBilling": "true",
              "defaultShipping": "false"
            },
            {
              "addressbookAddress": {
                "city": "Vienna",
                "zip": "1010",
                "state": null,
                "addr1": "Ring 1",
                "country": "_austria"
              },
              "defaultBilling": "false",
              "defaultShipping": "true"
            }
          ],
          "replaceAll": "false"
        },
        "email": "v.xyz@xyz.com",
        "externalId": "0015Ed9AE",
        "accountNumber": "2974",
        "taxItem": {
          "name": null
        },
        "terms": {
          "internalId": null
        },
        "subsidiary": {
          "internalId": 1
        },
        "internalId": "28248",
        "customFieldList": {
          "customField": [
            {
              "scriptId": "custentity_invoice_preference",
              "internalId": "2769",
              "type": "SelectCustomFieldRef",
              "value": {
                "internalId": 1
              }
            },
            {
              "scriptId": "custentity_sfdc_id",
              "internalId": "2759",
              "type": "StringCustomFieldRef",
              "value": "0015Ed9AE"
            },
            {
              "scriptId": "custentity_ucid",
              "internalId": "4499",
              "type": "StringCustomFieldRef",
              "value": "101575"
            },
            {
              "scriptId": "custentity_tri_po_required",
              "internalId": "3336",
              "type": "BooleanCustomFieldRef",
              "value": false
            },
            {
              "scriptId": "custentity_mult_invoice_emails",
              "internalId": "2754",
              "type": "BooleanCustomFieldRef",
              "value": false
            }
          ]
        },
        "nullFieldList": {
          "name": [
            "phone",
            "fax",
            "comments",
            "vatRegNumber",
            "custentity_addl_invoice_emails"
          ]
        }
      }
    }
  }
]

NetSuite Update SNAP

Salesforce_NetSuite Field Mapping

 



NetSuite System Notes for reference:


Thanks!

SpiroTaleski og_integration 

5 Replies

  • Supratim's avatar
    Supratim
    Contributor III

    Vikas2022 , As you already mapped external id, Did you observe the same behavior with NS Upsert Snap ? 

    • Supratim's avatar
      Supratim
      Contributor III

      Hi Vikas2022 In such case you can validate your request from NS  (Setup -> Integration _> SOAP Webservices log ). If your request doesn't contain that change then there would be chance of some NS internal script rans behind the scene while you update that particular NS object. Ask NS team to validate. I have faced same kind of issue before. 

      • Vikas2022's avatar
        Vikas2022
        New Contributor II

        Hello Supratim Thanks for the information. So in Salesforce, I had just updated the phone field yet in the NetSuite's request.xml along with phone I could see the Address section code included, so Snaplogic is resending non-changed fields data as well in NetSuite via Update/Upsert SNAP which is resulting in duplicates. 




        <ns1:addressbookList replaceAll="false">
                            <ns1:addressbook>
                                <ns1:defaultShipping>false</ns1:defaultShipping>
                                <ns1:defaultBilling>true</ns1:defaultBilling>
                                <ns1:addressbookAddress>
                                    <ns4:country>_austria</ns4:country>
                                    <ns4:addr1>Carinthian Street</ns4:addr1>
                                    <ns4:city>Vienna</ns4:city>
                                    <ns4:state/>
                                    <ns4:zip>1010</ns4:zip>
                                </ns1:addressbookAddress>
                            </ns1:addressbook>
                            <ns1:addressbook>





        How can I avoid this?