Configuration for both user and queue or user and campaign recording

If you use recording for both user and queue or both user and campaign, you'll need to define different configurations for them by using owner type in a condition.

If you want to use AI analysis, define it only for either queue or campaign recording, not user recording.

Example: queue recording with AI analysis

{
  "request": {
    "condition": "contact.get_attached_data_value('recording_owner_type') == 'queue'",
    "method": "POST",
    "authentication": {
      "type": "oauth",
      "secrets_ref": "orchestration-layer"
    },
    "headers": {
      "x-cmi-api-key": "{secrets.ri-apikey}",
      "x-cmi-password": "{secrets.cmi-user}"
    },
    "body": {
      "s3_key": "{contact.cad.s3_key}",
      "s3_bucket": "{contact.cad.s3_bucket}",
      "s3_root": "{contact.cad.s3_root}",
      "cmi_url": "https://94xr3t3d50.execute-api.eu-west-3.amazonaws.com/QA1/cmi",
      "cmi_user": "recording.user",
      "ai_analytics": true,
      "recording_id": "{contact.cad.recording_id}",
      "contact_id": "{contact.id}",
      "s3_region": "{contact.cad.s3_region}"   
    },
    "timeout": 60
  }
}

Example: queue recording without AI analysis

{
  "request": {
    "condition": "contact.get_attached_data_value('recording_owner_type') == 'queue'",
    "method": "POST",
    "authentication": {
      "type": "oauth",
      "secrets_ref": "orchestration-layer"
    },
    "headers": {
      "x-cmi-api-key": "{secrets.ri-apikey}",
      "x-cmi-password": "{secrets.cmi-user}"
    },
    "body": {
      "s3_key": "{contact.cad.s3_key}",
      "s3_bucket": "{contact.cad.s3_bucket}",
      "s3_root": "{contact.cad.s3_root}",
      "cmi_url": "https://94xr3t3d50.execute-api.eu-west-3.amazonaws.com/QA1/cmi",
      "cmi_user": "recording.user",
      "recording_id": "{contact.cad.recording_id}",
      "contact_id": "{contact.id}",
      "s3_region": "{contact.cad.s3_region}"   
    },
    "timeout": 60
  }
}

Example: campaign recording with AI analysis

{
  "request": {
    "condition": "contact.get_attached_data_value('recording_owner_type') == 'campaign'",
    "method": "POST",
    "authentication": {
      "type": "oauth",
      "secrets_ref": "orchestration-layer"
    },
    "headers": {
      "x-cmi-api-key": "{secrets.ri-apikey}",
      "x-cmi-password": "{secrets.cmi-user}"
    },
    "body": {
      "s3_key": "{contact.cad.s3_key}",
      "s3_bucket": "{contact.cad.s3_bucket}",
      "s3_root": "{contact.cad.s3_root}",
      "cmi_url": "https://94xr3t3d50.execute-api.eu-west-3.amazonaws.com/QA1/cmi",
      "cmi_user": "recording.user",
      "ai_analytics": true,
      "recording_id": "{contact.cad.recording_id}",
      "contact_id": "{contact.id}",
      "s3_region": "{contact.cad.s3_region}"   
    },
    "timeout": 60
  }
}

Example: user recording without AI analysis

If you also want to transcribe user recordings in addition to queue or campaign recording, don't include AI analysis. The user recording is exactly or almost the same so please only configure transcription for user recordings if there is a real reason for that.

{
  "request": {
    "condition": "contact.get_attached_data_value('recording_owner_type') == 'user'",
    "method": "POST",
    "authentication": {
      "type": "oauth",
      "secrets_ref": "orchestration-layer"
    },
    "headers": {
      "x-cmi-api-key": "{secrets.ri-apikey}",
      "x-cmi-password": "{secrets.cmi-user}"
    },
    "body": {
      "s3_key": "{contact.cad.s3_key}",
      "s3_bucket": "{contact.cad.s3_bucket}",
      "s3_root": "{contact.cad.s3_root}",
      "cmi_url": "https://94xr3t3d50.execute-api.eu-west-3.amazonaws.com/QA1/cmi",
      "cmi_user": "recording.user",
      "recording_id": "{contact.cad.recording_id}",
      "contact_id": "{contact.id}",
      "s3_region": "{contact.cad.s3_region}"   
    },
    "timeout": 60
  }
}