Create Picklist Items

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

POST /v2/epc/picklists/{picklist_ID}/items

Remote Method

createPicklistValue

REST Handler

APIPicklistItemRestHandler

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/{picklist_ID}/items

Example Request

POST /v2/epc/picklists/a313h000000rqfbAAA/items
{
  "epcRequest": {
    "entity": {
        "vlocity_cmt__TextValue__c": "Bangalore",
        "Name": "Bangalore",
        "vlocity_cmt__Code__c": "Bangalore",
        "vlocity_cmt__Abbreviation__c": "Bangalore",
        "vlocity_cmt__Sequence__c": 1,
        "vlocity_cmt__IsActive__c": true,
        "vlocity_cmt__PicklistId__c": "a2u4T000003xGYQQA2"
    }
  }
}

Example Result

{
    "epcResponse": {
        "entities": [
            {
                "entity": {
                    "attributes": {
                        "type": "vlocity_cmt__Picklist__c",
                        "url": "/services/data/v52.0/sobjects/vlocity_cmt__Picklist__c/a313h000000rqfbAAA"
                    },
                    "Id": "a313h000000rqfbAAA",
                    "OwnerId": "0053h000002UGCUAA4",
                    "IsDeleted": false,
                    "Name": "Bangalore",
                    "CurrencyIsoCode": "USD",
                    "CreatedDate": "2021-09-02T10:05:16.000+0000",
                    "CreatedById": "0053h000002UGCUAA4",
                    "LastModifiedDate": "2021-09-02T10:05:16.000+0000",
                    "LastModifiedById": "0053h000002UGCUAA4",
                    "SystemModstamp": "2021-09-02T10:05:16.000+0000",
                    "LastViewedDate": "2021-09-02T10:05:16.000+0000",
                    "LastReferencedDate": "2021-09-02T10:05:16.000+0000",
                    "vlocity_cmt__DataType__c": "Text",
                    "vlocity_cmt__GlobalGroupKey__c": "51af4c1a-995f-2fff-c25d-c6badf1ebd63",
                    "vlocity_cmt__GlobalKey__c": "6f776181-87c4-517e-ba72-5bc8e7b985fc",
                    "vlocity_cmt__IsActive__c": true,
                    "vlocity_cmt__IsShared__c": false,
                    "vlocity_cmt__LifecycleStatus__c": "Draft"
                }
            }
        ],
        "overallResult": "success"
    }
}