Developer forum

Forum » Ecommerce - Standard features » Shipmondo and address copying

Shipmondo and address copying

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

As it turns out, Shipmondo can return drop locations that have an address field that is too long to fit in the ERP's order record. As an example, here's what I got back from them for "address line 2": "Kein Barverkauf, keine Annahme von XL-Paketen und nur Annahme bis max. 25 kg möglich."

That data is copied to the order like this:

                            if (SaveParcelShopAddressInDeliveryAddress)
                            {
                                order.DeliveryCompany = selectedServicePoint.company_name;
                                order.DeliveryAddress = selectedServicePoint.address;
                                order.DeliveryAddress2 = selectedServicePoint.address2;
                                order.DeliveryZip = selectedServicePoint.zipcode;
                                order.DeliveryCity = selectedServicePoint.city;
                                order.DeliveryCountryCode = selectedServicePoint.country;
                                order.ShippingMethodAgentCode = selectedServicePoint.carrier_code;
                            }

The user can never edit that field so a Validation Rule constraining the length won't help.

What would be a good extensibility point to use and clip the data? We're using OData integration, so I can't use the standard XML subscribers for order XML generation that I would with LI.

Thanks!

Imar


Replies

 
Rasmus Sanggaard Dynamicweb Employee
Rasmus Sanggaard
Reply

Hi Imar,

Sorry for the late response. I missed that this was actually an integration question.

I'm not sure what version of DW you are using. If you are using DW10, you can use the script type Substring. The syntax is [START:END], where the end index is not included in the result. For example, taking the substring 0:3 of 'DynamicWeb' gives you 'Dyn'.

If you are using DW9, I would suggest having a scheduled task with the SQL add-in to prepare the data before exporting it.

BR Rasmus Sanggaard

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

No worries., Rasmus. I wasn't sure it was integration either, as it could be handled in different places :-)

Good to hear that DW 10 will give us Substring. is that documented somewhere already or yet to come? Couldn't find it at the DW 10 doc portal.

Imar

 

You must be logged in to post in the forum