Skip to main content
Version: v2.0

Case API overview

The Case API manages Customer Service Management (CSM) cases: create cases, retrieve or update them, and read case activities and field values.

Basic usage

This module hangs off the client root via the CustomerService() namespace:

cases := client.CustomerService().Case()

// List cases
list, err := cases.Get(context.Background(), nil)
if err != nil {
log.Fatal(err)
}

// Create a case
created, err := cases.Post(context.Background(), newCase, nil)
if err != nil {
log.Fatal(err)
}

// Get and update a specific case
item, err := cases.ByID("{caseSysID}").Get(context.Background(), nil)
if err != nil {
log.Fatal(err)
}
updated, err := cases.ByID("{caseSysID}").Put(context.Background(), caseBody, nil)
if err != nil {
log.Fatal(err)
}

Available operations

  • List casesCase().Get(ctx, config).
  • Create caseCase().Post(ctx, body, config).
  • Get caseCase().ByID(id).Get(ctx, config).
  • Update caseCase().ByID(id).Put(ctx, body, config).
  • Case activitiesCase().ByID(id).Activities() reads a case's activity stream.
  • Field valuesCase().FieldValues(fieldName).Get and Case().ByID(id).FieldValues(fieldName).Get list valid values for a case field.
Was this page helpful?