Options
All
  • Public
  • Public/Protected
  • All
Menu

Product Structure Facade to interact with Vlocity Product Console functionality.

Hierarchy

  • ProductStructure

Index

Constructors

constructor

  • Parameters

    • config: any

    Returns ProductStructure

Properties

config

config: any

Methods

createChildProduct

  • method

    createChildProduct - creates a new child product as provided in the CreateChildProductInput

    example
    
       // Instantiate the input object for createChildProduct using createParentChildItemInput method
       const input = productconsole.getProductStructureSdk().createParentChildItemInput();
    
       // Invoke API via method createChildProduct()
       productconsole
      .getProductStructureSdk().createChildProduct(input)
      .then(result => {
        Logger.info("createChildProduct() success " + result);
      })
      .catch(error => {
        Logger.info("createChildProduct() failed " + error);
      });
    
    API Path: (PATCH) `/services/data/v43.0/sobjects/{namespacePrefix}ProductChildItem__c/{input.parentChildItemId}`
    throws

    {Error} - "CreateChildProductInput :: createChildProduct() must be defined"

    throws

    {Error} - "CreateChildProductInput :: createChildProduct() must have parentProductId"

    throws

    {Error} - "CreateChildProductInput :: createChildProduct() must have childProductId"

    throws

    {Error} - "CreateChildProductInput :: createChildProduct() must have relationshipType as 'Child' "

    Parameters

    Returns Promise<Result>

    • A promise that resolves to the ID of the newly created relationship

createCreateChildProductInput

  • Creates an instance of CreateChildProductInput object

    Returns CreateChildProductInput

createGetProductDetailsInput

  • Create an instance of GetProductDetailsInput object

    Returns GetProductDetailsInput

    • an instance of GetProductDetailsInput

createGetRelatedProductsInput

  • Creates an instance of GetRelatedProductsInput object

    Returns GetRelatedProductsInput

    • an instance of GetRelatedProductsInput

createParentChildItemInput

  • Create an instance of ParentChildItemInput object.

    Returns ParentChildItemInput

    • an instance of ParentChildItemInput

deleteParentChildItem

  • method

    deleteParentChildItem - delete an existing ParentChildItem record

    example
    
       // Instantiate the input object for deleteParentChildItem using createParentChildItemInput method
       const input = productconsole.getProductStructureSdk().createParentChildItemInput();
    
       // Invoke API via method deleteParentChildItem()
       productconsole
      .getProductStructureSdk().deleteParentChildItem(input)
      .then(result => {
        Logger.info("deleteParentChildItem() success " + result);
      })
      .catch(error => {
        Logger.info("deleteParentChildItem() failed " + error);
      });
    
    throws

    {Error} - "ParentChildItemInput :: deleteParentChildItem() must be defined"

    throws

    {Error} - "ParentChildItemInput :: deleteParentChildItem() must have parentChildItemId"

    Parameters

    • input: ParentChildItemInput
      API Path: (DELETE) `/services/data/v43.0/sobjects/{namespacePrefix}ProductChildItem__c/{input.parentChildItemId}`

    Returns Promise<any>

    • Promise that returns a success or failure message

getProduct2Details

  • method

    getProduct2Details - returns a product and its children

    example
    
       // Instantiate the input object for getProductDetails using createGetProductDetailsInput method
       const input = productconsole.getProductStructureSdk().createGetProductDetailsInput();
    
       // Invoke API via method getProduct2Details()
       productconsole
      .getProductStructureSdk().getProduct2Details(input)
      .then(result => {
        Logger.info("getProduct2Details() success " + result);
      })
      .catch(error => {
        Logger.info("getProduct2Details() failed " + error);
      });
    
    throws

    {Error} - "GetProductDetailsInput :: getProductDetails() must be defined"

    Parameters

    • input: GetProductDetailsInput
      API Path: (GET) `${SalesForceNamespace.restAPIPrefix}/v1/studio/products/${encodedQueryString}`

    Returns Promise<any>

    • Promise that returns a success or failure message

getProductChildItem

  • method

    getProductChildItem - returns a list of attributes, fields and attribute values that are available for the corresponding ProductChildItem Id

    example
    
       // Instantiate the input object for getProductChildItem using createParentChildItemInput method
       const input = productconsole.getProductStructureSdk().createParentChildItemInput();
    
       // Invoke API via method getProductChildItem()
       productconsole
      .getProductStructureSdk().getProductChildItem(input)
      .then(result => {
        Logger.info("getProductChildItem() success " + result);
      })
      .catch(error => {
        Logger.info("getProductChildItem() failed " + error);
      });
    
    API Path: (GET) `/services/data/v43.0/sobjects/{namespacePrefix}ProductChildItem__c/${input.parentChildItemId}`
    throws

    {Error} - "ParentChildItemInput :: getProductChildItem() must be defined"

    throws

    {Error} - "ParentChildItemInput :: getProductChildItem() must have parentChildItemId"

    Parameters

    Returns Promise<any>

    • A promise that resolves to the list of available fields, attributes and attribute values.

getProductDetails

  • method

    getProductDetails - returns a product and its children

    example
    
       // Instantiate the input object for getProductDetails using createGetProductDetailsInput method
       const input = productconsole.getProductStructureSdk().createGetProductDetailsInput();
    
       // Invoke API via method getProductDetails()
       productconsole
      .getProductStructureSdk().getProductDetails(input)
      .then(result => {
        Logger.info("getProductDetails() success " + result);
      })
      .catch(error => {
        Logger.info("getProductDetails() failed " + error);
      });
    
    throws

    {Error} - "GetProductDetailsInput :: getProductDetails() must be defined"

    Parameters

    • input: GetProductDetailsInput
      API Path: (GET) `${SalesForceNamespace.restAPIPrefix}/v1/studio/products/${encodedQueryString}`

    Returns Promise<Result>

    • Promise that returns a success or failure message

getRelatedProducts

  • method

    getRelatedProducts - executes remote call to get related products for quick add

    example
    
       // Instantiate the input object for getRelatedProducts using createGetRelatedProducts method
       const input = productconsole.getProductStructureSdk().createGetRelatedProductsInput();
    
       // Invoke API via method getRelatedProducts()
       productconsole
      .getProductStructureSdk().getRelatedProducts(input)
      .then(result => {
        Logger.info("getRelatedProducts() success " + result);
      })
      .catch(error => {
        Logger.info("getRelatedProducts() failed " + error);
      });
    
    throws

    {Error} - "GetRelatedProductsInput :: getRelatedProducts() must be defined"

    throws

    {Error} - "GetRelatedProductsInput :: getRelatedProducts() must have productId"

    Parameters

    Returns Promise<any>

    • Promise that returns a success or failure message

updateProductChildItem

  • method

    updateProductChildItem - updates fields and attribute values that are available for the corresponding ProductChildItem Id

    example
    
       // Instantiate the input object for updateProductChildItem using createParentChildItemInput method
       const input = productconsole.getProductStructureSdk().createParentChildItemInput();
    
       // Invoke API via method updateProductChildItem()
       productconsole
      .getProductStructureSdk().updateProductChildItem(input)
      .then(result => {
        Logger.info("updateProductChildItem() success " + result);
      })
      .catch(error => {
        Logger.info("updateProductChildItem() failed " + error);
      });
    
    API Path: (PATCH) `/services/data/v43.0/sobjects/{namespacePrefix}ProductChildItem__c/{input.parentChildItemId}`
    throws

    {Error} - "ParentChildItemInput :: updateProductChildItem() must be defined"

    throws

    {Error} - "ParentChildItemInput :: updateProductChildItem() must have parentChildItemId"

    throws

    {Error} - "ParentChildItemInput :: updateProductChildItem() must have reqBody"

    Parameters

    Returns Promise<any>

    • A promise that resolves to the list of available fields, attributes and attribute values.

Generated using TypeDoc