Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Can I configure Monetization email notifications when developer currency balance gets low?

Not applicable

Hi Apigee Community,

We have installed Apigee Edge On Premise v.4.16.09.00.

I was trying to configure Monetization notifications using APIs from documentation page (http://docs.apigee.com/monetization/content/set-up-notification-templates#settingupnotificationsusingtheapi).

I created some email template for this using one of the APIs by sending POST request:

curl -X POST \
  http://{ms_server}/v1/mint/organizations/{org_name}/notification-email-templates \
  -H 'authorization: {auth}' \
  -H 'content-type: application/json' \
  -d '{
    "htmlImage" : "<p>Dear ${developer.legalName} , ${developer.name} <br /> It seems like quota type: ${QUOTA_TYPE}, unit: ${QUOTA_UNIT}, limit: ${QUOTA_LIMIT} balance: ${BALANCE} app products: ${application.products.name}</p>",
    "name" : "TEST_TEST",
    "orgId" : "test1",
    "source" : "test src",
    "subject" : "Test_Test"
}'

and after that I was trying to create some conditions which will trigger notification being sent when developer reaches specified number of used transactions or his balance becomes lower than some amount of currency.

It worked when I was trying to set up notification for specific rate plan which will trigger after specific number of transactions was made.

However I have a question if it is possible to send notification to either developer or org_admins when developer's balance goes down to specified number of credits?

I tried creating conditions like that:

curl -X POST \
  http://{ms_server}/v1/mint/organizations/{org_name}/notification-conditions \
  -H 'authorization: {auth}' \
  -H 'content-type: application/json' \
  -d '{
    "notificationCondition": [
    {
      "attribute": "RATEPLAN",
      "value": "test_package-nl0n_test1"
    },
    {
      "attribute": "Balance",
      "value": "= 100"
    }, {
      "attribute" : "PUBLISHED",
      "value" : "TRUE"
    }
    ],
    "actions": [{
    "actionAttribute": "DEV_ID",
    "value": "ANY",
    "templateId": "33d269dc-caad-464c-9400-6b77da019aca"
    }]
    }'

and

curl -X POST \  
http://{ms_server}/v1/mint/organizations/{org_name}/notification-conditions \
  -H 'authorization: {auth}' \
  -H 'content-type: application/json' \
  -d '{
    "notificationCondition": [
    {
      "attribute": "Balance",
      "value": "= 100"
    }, {
      "attribute" : "PUBLISHED",
      "value" : "TRUE"
    }
    ],
    "actions": [{
    "actionAttribute": "DEV_ID",
    "value": "ANY",
    "templateId": "33d269dc-caad-464c-9400-6b77da019aca"
    }]
    }'

but it does not seem to work. Is it possible to notify developer when his money balance is getting low in 'volume banded' rate plans? How can I set this up?

0 2 541
2 REPLIES 2