Create Line Attributes
4 min
create a line attribute definition post /api/objects/lineattribute name and scope are required see the line attribute data reference guides and examples/customer lifecycle/cpq revenue lifecycle/line attributes/line attribute data reference mdx for every field, and draft vs active guides and examples/customer lifecycle/cpq revenue lifecycle/line attributes/line attributes overview\ mdx for what activation does create a draft (no provisioning) create the attribute inactive to register it without provisioning the mapped field this is the only way to create a line attribute in a not yet active state curl x post '{baseurl}/api/objects/lineattribute' \\ h 'nue api key your api key' \\ h 'content type application/json' \\ d '{ "name" "overage rate", "scope" \["line editor"], "mappedfieldapiname" "overage rate c", "isactive" false }' { "id" "a1sa5000006awvzeau" } create and activate send "isactive" true to create the attribute active on activation nue provisions overage rate c across the five line objects (quote line item, order product, subscription, asset, entitlement), adds it to the fields expose to nue field sets, and runs a business objects sync if provisioning fails, the create fails and no record is persisted curl x post '{baseurl}/api/objects/lineattribute' \\ h 'nue api key your api key' \\ h 'content type application/json' \\ d '{ "name" "overage rate", "scope" \["line editor"], "mappedfieldapiname" "overage rate c", "isactive" true }' confirm field names first lineattribute fields use nue camelcase apinames, and the mapped field is a namespaced salesforce field describe the object before writing a payload get {baseurl}/api/metadata/objects/lineattribute