Get recipients from a API to delivery and send an email | Adobe Higher Education
Skip to main content
Level 2
March 25, 2021
解決済み

Get recipients from a API to delivery and send an email

  • March 25, 2021
  • 4 の返信
  • 1701 ビュー

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. 

 

 

Thanks for your help.

このトピックへの返信は締め切られました。
ベストアンサー Darren_Bowers

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

4 の返信

Darren_Bowers
Level 9
March 25, 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

Jonathon_wodnicki
Community Advisor
Community Advisor
March 25, 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

ags作成者
Level 2
March 25, 2021

Thank you @jonathon_wodnicki @darren_bowers you help me a lot 

ags作成者
Level 2
April 13, 2021

Hi @jonathon_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 

 

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"?