Create Picklists

Create picklists in Vlocity Product Console by specifying them in the request body.

POST /v2/epc/picklists

Remote Method

createPicklist

REST Handler

APIPicklistRestHandler

Apex Remote Service

PCAppHandler

Package

Communication (vlocity_cmt)

API Parameters and Response Format

For API parameter names and descriptions, see the Swagger (OpenAPI) reference documentation for Industries EPC REST APIs.

Resource Information

Response Format JSON
Resource URL /services/apexrest/{namespace}/v2/epc/picklists

Example Request

POST /v2/epc/picklists

{
  "epcRequest": {
    "entity": {
      "Name": "Picklist-Example",
        "vlocity_cmt__Code__c": "Picklist-Example",
        "vlocity_cmt__VersionLabel__c": "Version-1",
        "vlocity_cmt__DataType__c": "Text",
        "vlocity_cmt__LifecycleStatus__c": "Draft",
        "vlocity_cmt__IsActive__c": true
    }
  }
}

Example Result

{
    "epcResponse": {
        "entities": [
            {
                "entity": {
                    "attributes": {
                        "type": "vlocity_cmt__Picklist__c",
                        "url": "/services/data/v52.0/sobjects/vlocity_cmt__Picklist__c/a313h000000rqfRAAQ"
                    },
                    "Id": "a313h000000rqfRAAQ",
                    "OwnerId": "0053h000002UGCUAA4",
                    "IsDeleted": false,
                    "Name": "Picklist-Example",
                    "CurrencyIsoCode": "USD",
                    "CreatedDate": "2021-09-02T07:37:46.000+0000",
                    "CreatedById": "0053h000002UGCUAA4",
                    "LastModifiedDate": "2021-09-02T07:37:46.000+0000",
                    "LastModifiedById": "0053h000002UGCUAA4",
                    "SystemModstamp": "2021-09-02T07:37:46.000+0000",
                    "LastViewedDate": "2021-09-02T07:37:46.000+0000",
                    "LastReferencedDate": "2021-09-02T07:37:46.000+0000",
                    "vlocity_cmt__Code__c": "Picklist-Example",
                    "vlocity_cmt__DataType__c": "Text",
                    "vlocity_cmt__GlobalGroupKey__c": "66b60d23-8a58-397e-30fb-f1b0fe85ad92",
                    "vlocity_cmt__GlobalKey__c": "cdbe7a6f-0cb8-b239-43a4-a13780fdf702",
                    "vlocity_cmt__IsActive__c": true,
                    "vlocity_cmt__IsShared__c": false,
                    "vlocity_cmt__LifecycleStatus__c": "Draft",
                    "vlocity_cmt__VersionLabel__c": "Version-1"
                }
            }
        ],
        "overallResult": "success"
    }
}