Public/Set-GCConversationParticipantAttributes.ps1
|
<# .SYNOPSIS Updates a conversation participant's attributes. .DESCRIPTION Patches/updates the custom attributes of a specific participant within a conversation. Calls PATCH /api/v2/conversations/{conversationId}/participants/{participantId}/attributes. .PARAMETER ConversationId The unique identifier of the conversation. .PARAMETER ParticipantId The unique identifier of the participant whose attributes to update. .PARAMETER Body The request body containing the participant attributes to set or update. .EXAMPLE $attrBody = @{ attributes = @{ customerTier = 'Gold' accountNumber = '12345' } } Set-GCConversationParticipantAttributes -ConversationId 'conv-id' -ParticipantId 'part-id' -Body $attrBody .NOTES Genesys Cloud API: PATCH /api/v2/conversations/{conversationId}/participants/{participantId}/attributes #> function Set-GCConversationParticipantAttributes { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string]$ConversationId, [Parameter(Mandatory = $true)] [string]$ParticipantId, [Parameter(Mandatory = $true)] [object]$Body ) $endpoint = "conversations/$ConversationId/participants/$ParticipantId/attributes" return Invoke-GCApiRequest -Endpoint $endpoint -Method PATCH -Body $Body } |