Agentless SMS API Pass Custom Attributes

Hello,

I am using the Agentless API to send outbound SMS messages. However, I would like to know if there is a way to pass custom attributes. I reviewed the dev page but it wasn't very clear.

Here is what I have so far:
API URL:
/api/v2/conversations/messages/agentless

Request body template:
{
"fromAddress": "${input.fromAddress}",
"toAddress": "${input.toAddress}",
"toAddressMessengerType": "${input.toAddressMessengerType}",
"textBody": "${input.textBody}"

}

Help would be appreciated.

Thank you.

Hi Jamie,
You have the right developer page there, and as you already found there isn't any custom attribute support there. That agentless sms message request, is going outbound to the end customer via their sms carrier and handset. So really it's only going to support text and media (media is not supported through agentless api) over sms channel. Aside from using the textBody field to pass through some information to them, I'm not sure how else it would work. Are you instead looking to "tag" some custom attribute information to the Conversation in Genesys Cloud, but not actually send it to the end user here?

Hi @Greg_Boston,

Yes. This will mainly be internal. I'm offering a text SMS within the in-queue and ideally, I'd like to pass the call conversation ID to connect the two. If that is possible.

Thank you.

@Jaime_Perez This scenario works for me, and it might help you in your use case too.

  1. Make your Agentless API request, in the response there will be a conversationId field
  2. Use the conversationId and GET it (GET /api/v2/conversations/{conversationId}) filter out the participants to the api participant for instance (the one who out-bounded the agentless message), and retrieve it's participantId.
  3. Make a call to PATCH/api/v2/conversations/messages/{conversationId}/participants/{participantId}/attributes and add the customAttribute(s) you need for your use case to the participantId and conversationId you have from #1 and #2 above

Hope this helps

@Greg_Boston, I think this will work. I appreciate the solution. Thank you.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.