Sitecore OrderCloud Documentation

docs

Portal login

Product Collection Enhancements

Published by Galina Vorobyova on June 26, 2023

We first introduced ProductCollections just over a year ago, and we're excited to share we've added new functionality to support additional use cases beyond private lists of products. Adding new endpoints and a new AccessLevel property allows greater flexibility in the implementation of ProductCollections in your marketplace.
Here are a few ideas of how you could use the expanded functionality:

  • Marketplace Owners and Suppliers can now view ProductCollections with the ProductCollectionReader role allowing insights into which products customers are saving to their collections.

  • Allowing a customer to create a grocery list and invite someone in their household to view and administer it.

  • Encouraging customers to make Sharable Holiday Wish lists for family members.

New Property AccessLevel

  • Private

    • Default value

    • Product Collection owners can grant access to their Private collections by creating ProductCollectionInvitations to send to users within the same buyer organization.

  • Public

    • Allows any user, including anonymous (unregistered users), within the same buyer organization to access the ProductCollection via GET v1/me/productcollections

  • Shareable

    • Allows any user, including anonymous (unregistered users), within the same buyer organization to access the ProductCollection using the ID via GET v1/me/productcollections/{productCollectionID}

New role ProductCollectionReader

  • Marketplace Owner with this role can view ProductCollections belonging to any buyer user in their marketplace.

  • Supplier with this role can view any ProductCollections belonging to a buyer they are authorized to sell to. They will only be able to see ProductCollectionEntries for products they own or are authorized to sell.

  • Buyer user with this role can view ProductCollections belonging to any other user within the same buyer organization. They will only be able to see ProductCollectionEntries for products they have visibility to.

Associated Endpoints

If a user has the ProductCollectionReader role, they will be able to view ProductCollections regardless of AccessLevel, within the limitations mentioned above.

  • GET v1/buyers/{buyerID}/productcollections

  • GET v1/buyers/{buyerID}/productcollections/{productCollectionID}

  • GET v1/buyers/{buyerID}/productcollections/{productCollectionID}/products

New Resource ProductCollectionInvitation

A ProductCollection owner can grant access to their Private collections by creating a ProductCollectionInvitation to send to a user within the same buyer organization.

"ProductCollectionInvitation": {
  "ID": "",
  "Name": "",
  "Admin": false,
  "Accepted": false,
  "ExpirationDate": "" ,
  "xp": {}
}
  • ID is not writable, it will be a generated ID that must be used to accept or decline the invitation

  • ExpirationDate for an invitation defaults to 30 days and cannot be greater than 365 days from the creation date.

  • When true, Admin will allow the invitee to add and remove product collection entries once they have accepted the invitation, in addition to viewing the ProductCollection and it's entries.

  • ProductCollectionInvitation xp can be used to store information about the user they wish to invite (name, email address, etc.), for display purposes but OrderCloud does not validate that information. Once any registered user is provided the invitation ID, they will be able to accept or decline. You can use pre-webhooks to validate information prior to acceptance if desired.

Associated Endpoints

Only require the Shopper role.

  • POST v1/me/productcollections/{productCollectionID}/invitations

    • Each individual needing access will require their own Invitation, once an Invitation is accepted or declined, it cannot be accepted by another user.

  • DELETE v1/me/productcollections/{productCollectionID}/invitations/{invitationID}

    • Deleting an accepted invitation will revoke access

    • Deleting a pending invitation will prevent someone from accepting or declining an invitation

  • GET v1/me/productcollections/{productCollectionID}/invitations

  • POST v1/me/productcollections/{productCollectionID}/invitations/accept/{invitationID}

    • Limited to registered users within the same buyer organization

  • POST v1/me/productcollections/{productCollectionID}/invitations/decline/{invitationID}

    • Limited to registered users within the same buyer organization

New MessageSenders

  • ProductCollectionInvitationAccepted and ProductCollectionInvitationDeclined

    • sent to the owner of the ProductCollection when someone accepts or declines an invitation

  • We do not provide a message sender for new invitations as OrderCloud does not collect or validate information about who an invitation is for. You can use webhooks to setup your own custom emails to notify a user of a ProductCollection invitation if desired.


Still have questions?
Ask in our Community Channel

Content Powered By
Sitecore Logo

© Copyright 2024, Sitecore OrderCloud®. All rights reserved.

Contact Us
Privacy Policy
Sitecore