Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Get recipients from a API to delivery and send an email

Avatar

Avatar
Validate 1
Level 1
ags
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
ags
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
ags
Level 1

24-03-2021

I have a requirement to send a personalized delivery, the data comes from an API call with HttpClientRequest("url");.

But I'm not sure if the workflow recognize the recipients in the inbound event, or the javascript allow me create a temp schema or only if I insert the data into recipient schema is enough or is impossible do this kind of things.

 

I don't now how the template derivery could recognize the recipients. 

 

ags_2-1616635659107.png

 

Thanks for your help.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Darren_Bowers
MVP

Likes

78 likes

Total Posts

261 posts

Correct Reply

85 solutions
Top badges earned
Validate 1
Affirm 50
Establish
Give Back 3
Applaud 25
View profile

Avatar
Validate 1
MVP
Darren_Bowers
MVP

Likes

78 likes

Total Posts

261 posts

Correct Reply

85 solutions
Top badges earned
Validate 1
Affirm 50
Establish
Give Back 3
Applaud 25
View profile
Darren_Bowers
MVP

24-03-2021

Hi @ags - Yes you can do this but it would be up to you how you want to treat the incoming targets. You can choose to add them as Recipients in the Javascript, then load them from the Recipient table further in the workflow. You can also save the new targets into a temporary table and again retrieve them as your targets before the send. There are a few options you have available.

Typically what you also want to do (whichever way you choose) is have some way to identify them again, either by putting them in a specific recipient folder when you add them, or some unique identifier when you add them to a temporary table. This helps retrieve them later in the workflow

Cheers

Darren

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1
Level 1
ags
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
ags
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
ags
Level 1

13-04-2021

Hi @wodnicki @Darren_Bowers  I have a one more question the workflow works really well, sent the emails for each recipient, but when the delivery add 0 recipients to send it enter in "pending" status 

ags_1-1618323801791.png

 

Or when a error occurred enter in "retry pendding"  and I reduce the validity duration, but I need to avoid this and display "finished",

Is possible do the status always "finished"? 

Avatar

Avatar
Validate 1
Level 1
ags
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
ags
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
ags
Level 1

25-03-2021

Thank you @wodnicki @Darren_Bowers you help me a lot 

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

958 likes

Total Posts

1,079 posts

Correct Reply

506 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

958 likes

Total Posts

1,079 posts

Correct Reply

506 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

24-03-2021

Hi,

 

I once made a workflow activity that allows for arbitrary service enrichment ala the ootb enrichment activity, was not easy (temp schema manipulation is undocumented).

The easy way is to not manipulate the temp schema:

  1. Query for desired recipients, adding empty fields as desired. E.g. if your email is recipient + credit scores from service, add a field in Additional data called @creditScore with expr=''
  2. Use JS to batch query the service to populate the blank cols with xtk. The temp schema is called {vars.schema}

NB hardcoding the fields is essentially 'throw away' work as it can't be reused past whatever's implemented.

If data is static or non-time-sensitive consider using ETL processes to populate permanent tables instead.

 

Thanks,

-Jon