Digital Commerce generic APIs support custom objects by replacing the :custom_object__c with the custom object API name into the URL path as shown in the example below:

[GET] .../apexrest/Apttus_WebStore/apttus/v3/:custom_object__c

[POST] .../apexrest/Apttus_WebStore/apttus/v3/:custom_object__c /query

You need to ensure that the SDK utilizes these APIs for custom services and models by following the steps below:

  1. Create a custom object in Salesforce and add some custom fields.
    1. The custom object must have at least one lookup to another object.
    2. The other object must have a lookup to this custom object as a child object. You can just enable attachments for this object.
  2. Open a template and install the latest SDK libraries.
  3. Create a service and model for the custom object created in step 1.
    1. You may need to add the ‘route’ attribute to the ATable decorator similar to what was done in ‘cart’ and set it to the API name of the custom object:

  4. Verify that all the methods within the service work:
    1. query
    2. where
    3. search
    4. aggregate
    5. describe
    6. get
    7. fetch
    8. delete
    9. create
    10. update
    11. upsert
  5. Verify that relationships work on the model.
    1. The lookup you created in step 1 should be pulled.
    2. The model should be able to pull the child object with attachments.