Integration Web Services
In addition to the Data Integration module and the Integration framework, which allow you to move data around in bulk, we also provide you with a webservice which allows you to add and update products and users indiviually.
Product Sync
The productSync webservice is available at the url:
http://your.website/Admin/public/webservices/productManagement/ProductSync.asmx
After adding a reference to this webservice to your project, you can insert or update products with the following code:
Where the TextboxURL points to the address mentioned above, and the TextBoxToken contains the Installation checksum (found in Settings > System > System Information).
If the info.ID is not set, a new product will be added to the database, with an auto-generated ID. If the ID, VariantID and LanguageID already exist in the Dynamicweb solution, it will be updated. If the VariantID or LangaugeID are left out, the default product/main product will be updated.
After the product is added/updated, the index is updated.
User Sync
The UserSync webservice is available at:
http://your.website/Admin/public/webservices/userManagement/UserSync.asmx
The implementation is similar to the one described above for Products, with some small differences:
- If using Visual Studio, add web reference as Service Reference, rather than Web Reference. Otherwise all methods and functions of the reference may not be available.
- The user must have an ExternalID – this is used when retrieving the user from the Dynamicweb database.
- By setting the SyncAction on the userInfo object to Delete, it is possible to remove a user from dynamicweb using the service.
Example: