Thursday, October 31, 2013

SharePoint Request Management



$w = Get-SPWebApplication -identity http://sp2013wfe1

$rmset = $w | Get-SPRequestManagementSettings

New-SPSite -Url http://sp2013wfe1 -owneralias sp2013\Administrator -ownerEmail administrator@sp2013.loc

New-SPSite -url http://www.contoso.loc -HostHeaderWebApplication $w -owneralias sp2013\Administrator -owneremail administrator@sp2013.loc -template sts#0

New-SPSite -url http://www.fabrikam.loc -HostHeaderWebApplication $w -owneralias sp2013\Administrator -owneremail administrator@sp2013.loc -template sts#0

$mp1 = Add-SPRoutingMachinePool -RequestManagementSettings $rmset -Name MachinePool1 -MachineTargets @("SP2013WFE1")

Get-SPRoutingMachinePool -RequestManagementSettings $rmset

$rmset | Get-SPRoutingMachineInfo -Name "sp2013wfe1"

$rmmi = $rmset | Get-SPRoutingMachineInfo -Name "sp2013wfe1"
Set-SPRoutingMachineInfo -Identity $rmmi -StaticWeight 9

$criteria = New-SPRequestManagementRuleCriteria -Property UserAgent -MatchType Regex -Value ".*Microsoft Office OneNote 2013*"
$rmset | Add-SPThrottlingRule -Name "Refuse OneNote Requests" -Criteria $criteria -Threshold 8

$criteria = New-SPRequestManagementRuleCriteria -Property Url -MatchType Regex -Value ".*\.pdf"
$rule = Add-SPRoutingRule -RequestManagementSettings $rmset -Name SendAllPdf2mp1 -ExecutionGroup 0 -MachinePool $mp1 -Criteria $criteria

$criteria = New-SPRequestManagementRuleCriteria -Property Host -MatchType Equals -Value "www.fabrikam.loc"
$rule = Add-SPRoutingRule -RequestManagementSettings $rmset -Name fabrikam2mp1 -ExecutionGroup 1 -MachinePool $mp1 -Criteria $criteria

%systemroot%\System32\runas.exe /user:user@dc07.loc "%ProgramFiles(x86)%\Internet Explorer\iexplore.exe

Tuesday, May 28, 2013

Commerce Server User Group

Just had the first User Group meeting for Commerce Server 10. It was interesting to hear about some of the projects that are out there. There is one public site already live. Thanks to all that attended.

Commerce Server Inventory System Part 7

Common Inventory Scenarios

There are a couple of scenarios that are common enough to justify a discussion on how to set them up in the Inventory System. Among these scenarios are:

• Configuring SKUs to be back-orderable
• Configuring SKUs to be pre-orderable

Configuring your Web site to allow your customers to purchase back-ordered SKUs and pre-order unavailable SKUs increases your ability to maximize sales. Rather than having to wait for inventory levels to be replenished, you can continue to market and sell out-of-stock or unreleased inventory. Customers expect and demand this functionality, and if you are unable to satisfy these demands you risk losing your customers.

Configuring SKUs to be Back-Orderable

Giving your customers the ability to back-order inventory adds rich functionality and flexibility to your Web site. Fortunately, setting up this process is both straightforward and simple. For the golf pro shop, you want to make sure that the product variants can continue to be purchased even if they have run out-of-stock.Consequently, you must configure the site to allow back-ordered inventory.
In order to define the product variants as back-orderable, you must use the Commerce Server Manager and the Catalog Manager.

1. Click Start > All Programs > Microsoft Commerce Server > Commerce Server Manager.
2. Under Commerce Sites expand the ProShop site, then expand Site Resources. Under Site Resources select Inventory. The Inventory resources will display in the Commerce Server Resource window.
3. Right-click the Stock Handling resource and click Properties. This will open the Stock Handling Properties screen.
4. Change the Selected Property Value from 0 to 1 (Figure 4-12). This indicates that the Commerce Site uses special handling for SKUs, and will otherwise prevent back-orderable products from being reported as out-of-stock.


Figure 4-12

5. Now that you have specified that the site uses special handling for SKUs you must also tell the site to display back-ordered SKUs (this is set to True by default). Click the Display Backordered Items property and change the value from 0 (False) to -1 (True). Click the OK button when finished. Close the Commerce Server Manager.

6. You must now set the appropriate inventory SKU properties to allow your product or product variants to be back-orderable. Click Start > All Programs > Microsoft Commerce Server > Commerce Server Manager.
7. In the Catalogs tree view pane, expand the ProShopCatalog catalog, the Golf Clubs category, and select the Drivers category.
8. Double-click the “Calloway FT-5 Driver” from the Category and Product Details list (or any available
product). This will open the product properties screen.
9. Click the Variant Inventory Properties tab (the Inventory Properties tab if the catalog does not have product variants). In order to make the product variants associated with this driver back-orderable, you must specify two properties: Backorderable and Backorder Limit. Click the Backorderable check box for each variant, and define a positive value for the Backorder Limit. Unless these two properties are defined, the product or product variant will not function as a back-orderable SKU on the Web site. To provide more information for customers, you may also want to specify the Backorder Availability date.
10. Once you have specified the Backorderable and Backorder Limit for the product variants click Save And Close to finish.

Configuring SKUs to be Pre-Orderable

The process for defining a SKU as pre-orderable is very similar to defining a SKU as back-orderable. In order to define the product variants as pre-orderable, you must use the Commerce Server Manager and the Catalog Manager.
1. Click Start > All Programs > Microsoft Commerce Server > Commerce Server Manager.
2. Under Commerce Sites expand the ProShop site, and then expand Site Resources. Under Site Resources select Inventory. The Inventory resources will display in the Commerce Server Resource window.
3. Right-click the Stock Handling resource and click Properties. This will open the Stock Handling Properties screen.
4. Change the Selected Property Value from 0 to 1. This indicates that the Commerce Site uses special handling for SKUs, and will otherwise prevent pre-orderable products from being reported as out-of-stock.
5. Now that you have specified that the site uses special handling for SKUs you must also tell the site to display pre-ordered SKUs (this is set to True by default). Click the Display Preordered Items property and change the value from 0 (False) to -1 (True). Click the OK button when finished. Close the Commerce Server Manager.
6. You must now set the appropriate inventory SKU properties to allow your product or product variants to be pre-orderable. Click Start > All Programs > Microsoft Commerce Server > Commerce Server Manager.
7. In the Catalogs tree view pane, expand the ProShopCatalog catalog, the Golf Clubs category, and select the Drivers category.
8. Double-click the “Calloway FT-5 Driver” from the Category and Product Details list (or any available product). This will open the product properties screen.
9. Click the Variant Inventory Properties tab (the Inventory Properties tab if the catalog does not have product variants). In order to make the product variants associated with this driver pre-orderable, you must specify two properties: Preorderable, Preorder Limit, and Preorder Availability date. Click the Preorderable check box for each variant, define a positive value for the Preorder Limit, and set a Preorder Availability date for the future.
10. Once you have specified the Preorderable, Preorder Limit, and Preorder Availability Date for the product variants click Save And Close to finish.
Remember that Commerce Server will first exhaust the pre-order limit before moving onto the back-order limit.For efficiencies sake, it would probably be best to define the back-orderable and pre-orderable settings when you first configure your products or product variants. Consequently, make sure to add your product catalog to your inventory catalog immediately after creating the product catalog. This way the inventory SKU properties are available from the very beginning.


External Inventory Sources

In most large-scale Commerce Server solutions the Inventory System will likely work in parallel with an
external LOB application. If the solution requires real-time inventory management, then the BizTalk Server 2006 adapters for Commerce Server can be used to keep both systems up-to-date and working synchronously. If the solution doesn’t require real-time inventory, then export and import process can be utilized to keep both systems synchronized. Through either the BizTalk inventory adapter or import processes, it is possible to aggregate multiple external inventory sources into a consolidated inventory catalog. This can be a very efficient way to combine inventory data together that would otherwise be disparate and unrelated, so that the Website has a coherent depiction of inventory levels.

The BizTalk Server Inventory Adapter

Utilizing the BizTalk adapters for Commerce Server, you can provide relatively easy integration between
Commerce Server, BizTalk Server, and a warehousing LOB application. The inventory adapter defines a specific XML format that is exchanged between Commerce Server and BizTalk Server, so that inventory data can then be transferred between BizTalk Server and the warehousing LOB inventory system.

Exporting and Importing Inventory Catalogs

As with most tasks in the Inventory System, exporting and importing inventory catalog is very similar to
exporting or importing product catalogs. Exporting and importing inventory catalogs is used to keep inventory synchronized either with a trading partner or a LOB system. Unlike inventory data exchange via the BizTalk 2006 adapters, exporting and importing inventory catalog data is not a real-time solution, and should only be used if it is not critical to transfer real-time information concerning the condition of the inventory.
Inventory catalog exports and imports is most often accomplished by using the Catalog Manager, although the Inventory APIs can also be used directly to export and import data. The inventory catalog can be exported in full, incrementally, or based on an expression. If advanced options are specified, you can select whether or not to include inventory catalog schema data, as well as choose whether or not to export deleted or blank values. Furthermore, specific inventory catalog and SKU metadata can be chosen to be excluded or included in the export.
Inventory catalogs can be imported either incrementally, which will update an existing inventory catalog, or in full, which replaces the entire inventory catalog. Additionally, you can choose to import, validate, or validate and import inventory catalog data. If advanced options are specified, you can select the inventory catalog(s) you want to import, import schema changes, transact the import process, and choose specific inventory catalog and SKU metadata to be excluded or included in the import.

Summary

The inclusion of the Inventory System into the Commerce Server product provides a comprehensive inventory management system that is capable of providing real-time inventory conditions to customers and partners. Inventory catalogs are created to represent inventory levels for products and product variants contained within product catalogs. Product catalogs that are added to an inventory catalog are mapped to the inventory catalog, and can only be mapped to one inventory catalog at a time. Multiple product catalogs, including both base and virtual product catalogs, can be mapped to a single inventory catalog. Within the context of the Inventory System, products and product variants are referred to as stock-keeping units (SKUs), as they represent physical items that exist in inventory.

Inventory catalogs are tightly coupled to product catalogs, and are similarly extendable and modifiable. The inventory catalog and inventory SKU metadata can be extended to contain custom information about the inventory catalog and SKUs. The Inventory System can provide real-time reporting of inventory conditions, indicating the inventory is in stock, out-of-stock, back-ordered, or pre-ordered. Additionally, the Inventory System provides thresholds to warn administrators if stock levels are running low and need to be replenished. The Inventory System can integrate with external LOB applications, such as warehousing applications, either through the BizTalk Server adapters or the export and import processes. The export and import processes can run either through the Catalog Manager or directly by the Inventory APIs.

Based on my book on Commerce Server. Part 1.