DevPortal - Syntax for Replacement Patterns arrays

We are trying to create a custom email when application gets created. What is syntax to access array elements of replacement pattern "[app:appId]" in the email message body?

0 4 137
4 REPLIES 4

It sounds like you are using the rules module to send the email? If so, the "Replacement Patterns" will show up in the message body. Here are the steps:

  1. Enable Rules and Rules UI modules.
  2. Go to Configuration > Workflow > Rules.
  3. Click on "Add new Rule".
  4. Name it whatever you want, select "Upon creation of a developer app" for the "React on Event" field, click Save.
  5. On the next page, click "Add action".
  6. For "Select the action to add", select "Send email".
  7. For the body and subject fields, click the "Replacement Patterns" dropdown, and use any of those variables in your Subject or Body. For example, use [app:name] or [app:appId] in the body to use those variables in the email.
  8. Click Save.

Here is a screenshot of what it looks like:

1386-screen-shot-2015-10-23-at-113113-am.png

Additionally, you can write a custom module to do anything you want including sending an email by using the hook_devconnect_developer_app_save() hook. There is an example of using this hook in the file: profiles/apigee/modules/custom/devconnect/devconnect_developer_apps/devconnect_developer_apps.api.php

Hi @Chris Novak Thats exactly what we are trying. We want to add use [app:appId] in email body and its showing up as Array. [app:attributes:DisplayName] also does not work.

@Vineet Bhatia , Seems like it's an issue with change in API response from Apigee Edge. Clearly, It looks like a bug. We will keep you updated on same.

Awesome. Thank You very much @Anil Sagar and @Chris Novak for your quick response and help. Really appreciate it!