RecipientSubscribe - Multiple Recipients to Subscribe to a Service | Community
Skip to main content
Level 5
May 30, 2024
Question

RecipientSubscribe - Multiple Recipients to Subscribe to a Service

  • May 30, 2024
  • 1 reply
  • 1124 views

Hi All,

 

I have a requirement where I need

1. Multiple recipients to subscribe to more than one service

 

I am trying to use the RecipientSubscribe to do the same, but unable to create the 

XML          recipient 

parameter. Can somebody please help me on the same

 

The set of recipients are coming as part of a query in workflow, can we use any Workflow activity other than JS to achieve this ? In Subscription services activity can we map 2 services at a time ?

 

Regards,

DG 

 

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Manoj_Kumar
Community Advisor
Community Advisor
May 30, 2024

Hello @dipendu_g 

 

You can do something like this:

var recipient = {recipient: {_key: "email", email: "john.smith@example.com"}} // identify the recipient nms.subscription.Subscribe("SVC1", recipient, false) //subscribe to service 1 nms.subscription.Subscribe("SVC2", recipient, false) //subscribe to service 2 nms.subscription.Subscribe("SVC3", recipient, false) //subscribe to service 3 nms.subscription.Subscribe("SVC4", recipient, false) //subscribe to service 4

 

more details on the function is here: https://experienceleague.adobe.com/developer/campaign-api/api/sm-subscription-Subscribe.html

Manoj  | https://themartech.pro
dipendu_gAuthor
Level 5
May 30, 2024

Hi @_manoj_kumar_ ,

 

I am looking for multiple recipients to subscribe at one Service.

Can't we use the RecipientSubscribe  API ?

 

Regards,

DG

 

Manoj_Kumar
Community Advisor
Community Advisor
May 30, 2024

Try using this.

 

 

nms.subscription.RecipientSubscribe ( <choiceList selectAll="false"> <key value={rcpId}/> <where> <condition expr={"@id = '"+rcpId+"'"}/> // condition to filter the recipient </where> </choiceList>, <entityList selectAll="false"> <key value="12732"/> <where> <condition expr="@id = '12732'"/> // condition to get the service </where> </entityList>, true, <empty>false</empty> );

Note: Don't use the bulk update the recipients via APIs. Always chunk them in small payloads.

 

Manoj  | https://themartech.pro