Forum Discussion

salesopsintegra's avatar
salesopsintegra
New Contributor II
3 years ago

Netsuite Upsert to Multiple Addresses on Customer Object

Hello,
I have a requirement to write to multiple addresses on the customer object. I am looking to write to two different address records within Netsuite.

This is a screenshot of what I’m referring to.

I only see 1 set of address fields on the Customer object in the Upsert snap. How can I accomplish this with the available snaps in the Netsuite pack?

7 Replies

  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor

    @salesopsintegration

    If you add an upstream mapper snap in front of NetSuite Upsert, you will notice that the address is a type of Array.

    So, if you want to add multiple addresses, you should compose an array of objects where each object will stand for a single address line.

    Hope this helps!

    BR,
    Spiro Taleski

  • Vikas2022's avatar
    Vikas2022
    New Contributor II

    Hello, SpiroTaleski & salesopsintegra I have a similar requirement, wherein I have to append the address on top of the existing one, but Snaplogic via NetSuite Update SNAP is overriding it and in NetSuite (Customer) I could only see latest overridden address.

    So how can I view both addresses and mark the latest address as Default?

    I also checked for NetSuite property override (jsonPath($, "$['soapenv:Body'].getResponse.readResponse.record['listRel:addressbookList']['listRel:addressbook'][*]['listRel:addressbookAddress']['platformCommon:override']"))  it is false

    • SpiroTaleski's avatar
      SpiroTaleski
      Valued Contributor

      Vikas2022 

      There should be a flag within the address list, called "replaceAll". And while updating, that flag should be set to false. 

  • Vikas2022's avatar
    Vikas2022
    New Contributor II

    Thanks, SpiroTaleski for the prompt reply. However, I cannot see any property/flag (replaceAll) within the address list. Below are the details which I see for the address.
    So can you please share a screenshot of that property?

    Thanks

      "listRel:addressbookList": {
                      "listRel:addressbook": [
                        {
                          "listRel:defaultShipping": "true",
                          "listRel:defaultBilling": "true",
                          "listRel:isResidential": "false",
                          "listRel:label": "3234 Peachtree Road NE",
                          "listRel:addressbookAddress": {
                            "@xmlns:platformCommon": "urn:common_2020_1.platform.webservices.netsuite.com",
                            "platformCommon:country": "_unitedStates",
                            "platformCommon:addrPhone": " 383-89",
                            "platformCommon:addr1": "3234 Peachtree Road NE",
                            "platformCommon:addr2": "#1000",
                            "platformCommon:city": "Atlanta",
                            "platformCommon:state": "GA",
                            "platformCommon:zip": "3046",
                            "platformCommon:addrText": "3234 Peachtree Road NE<br>#1000<br>Atlanta GA 3046<br>United States",
                            "platformCommon:override": "false"
                          },
                          "listRel:internalId": "1"
                        }
                      ]
                    }




  • Hi Vikas2022

    I was only able to see the replaceAll flag by searching for customers and pull that field down that way. 
    It was defaulted to No/False so I didn't have to set it. 
    I put more weight back on the source data within Snowflake and set multiple addresses as one being
    true for default billing and shipping and one as false for those fields.