2

Question

I am trying to create a Digital based product in Sitecore Commerce, where the product can be fulfilled via digital means (e.g email).

Based on my testing via postman using Habitat Catalog(see below), it appears that a fulfillment type for a cart is directly related to the Sellable items added on the cart.

But in the Sitecore Commerce Business tool, I can't find a way to configure the sellable item's fulfillment type/options to digital.

Does anyone know how the logic works and how to configure it? Thanks in advance

Testing via Postman

1. Digital Product Example

1a. Postman - Add Cart Line with Variant Product: Habitat_Master|6042986|56042986 -- Habitat Gift Cards ($25)

Url: {{ServiceHost}}/{{ShopsApi}}/AddCartLine()

Body:

{
    "cartId":"TestCart01",
    "itemId": "Habitat_Master|6042986|56042986",
    "quantity": 1
}

1b. Postman - Get cart fulfillment options

Url: {{ServiceHost}}/{{ShopsApi}}/GetCartFulfillmentOptions(cartId='TestCart01')

Response:

{
    "@odata.context": "https://localhost:5000/Api/$metadata#FulfillmentOptions",
    "value": [
        {
            "CompositeKey": null,
            "CreatedBy": null,
            "UpdatedBy": null,
            "DateCreated": "2019-06-27T03:24:56.3161735Z",
            "DateUpdated": "2019-06-27T03:24:56.3161735Z",
            "DisplayName": "Digital",
            "FriendlyId": null,
            "Id": "3878b502-85ac-41b5-9203-e0f8712a854b",
            "Version": 0,
            "EntityVersion": 1,
            "Published": true,
            "IsPersisted": false,
            "Name": "Digital",
            "Policies": [],
            "FulfillmentType": "Digital",
            "Enabled": false,
            "Provider": null,
            "CostType": null,
            "Cost": null
        }
    ]
}

2. Physical Product Example

2a. Postman - Add Cart Line with Variant

Product: Habitat_Master|6042963|56042963 -- Habitat Sentinel Touchscreen Thermostat

Url: {{ServiceHost}}/{{ShopsApi}}/AddCartLine()

Body:

{
    "cartId":"TestCart02",
    "itemId": "Habitat_Master|6042963|56042963",
    "quantity": 1
}

2b. Postman - Get cart fulfillment options

Url: {{ServiceHost}}/{{ShopsApi}}/GetCartFulfillmentOptions(cartId='TestCart02')

Response:

{
    "@odata.context": "https://localhost:5000/Api/$metadata#FulfillmentOptions",
    "value": [
        {
            "CompositeKey": null,
            "CreatedBy": null,
            "UpdatedBy": null,
            "DateCreated": "2019-06-27T03:24:56.3421052Z",
            "DateUpdated": "2019-06-27T03:24:56.3421052Z",
            "DisplayName": "Ship items",
            "FriendlyId": null,
            "Id": "3817f8d5-994b-4fbc-8bbe-4c342ec7553a",
            "Version": 0,
            "EntityVersion": 1,
            "Published": true,
            "IsPersisted": false,
            "Name": "Ship items",
            "Policies": [],
            "FulfillmentType": "ShipToMe",
            "Enabled": false,
            "Provider": null,
            "CostType": null,
            "Cost": null
        }
    ]
}
3

If you want to mark your product as digital, you need to add any tag to the product or product variant from list below:

  • OnlineTraining
  • OnlineLearning
  • Subscription
  • DigitalSubscription

Read my blog post about that:

https://www.brimit.com/blog/sitecore-commerce-9-how-to-override-policy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.