Skip to content

Instantly share code, notes, and snippets.

@phstc
Created November 8, 2013 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phstc/7372046 to your computer and use it in GitHub Desktop.
Save phstc/7372046 to your computer and use it in GitHub Desktop.
{
"name": "mandrill",
"display": "Mandrill",
"description": "Sends transactional emails using Mandrill",
"help": "http://guides.spreecommerce.com/integration/endpoints/mandrill",
"url": "http://mandrill-stg.spree.mx",
"category": "email",
"services": [
{
"name": "order_confirmation",
"path": "/order_confirmation",
"requires": {
"parameters": [
{
"name": "api_key",
"description": "Mandril API key"
},
{
"name": "order_confirmation.from",
"description": "Reply-to address for email"
},
{
"name": "order_confirmation.subject",
"description": "Subject of email"
},
{
"name": "order_confirmation.template",
"description": "Mandrill template name"
},
{
"name": "order_confirmation.optional",
"description": "Optional parameter for test purposes",
"optional": true
}
],
"humanizers": {
"200": "Order Confirmation email sent to {{email}}",
"400": "Order Confirmation email could not be sent to {{email}}"
}
},
"recommends": {
"messages": [
"order:new",
"order:update"
],
"identifiers": {
"order_number": "payload.order.actual.number"
},
"preprocessors": [
{
"name": "generate_body",
"default": "<h1>hello <%= name %></h1>"
}
],
"filters": [
{
"path": "payload.actual.order.complete",
"operator": "eq",
"value": "complete"
}
],
"options": {
"retries_allowed": true
}
}
},
{
"name": "order_cancellation",
"path": "/order_cancellation",
"requires": {
"parameters": [
{
"name": "api_key",
"description": "Mandril API key"
},
{
"name": "order_cancellation.from",
"description": "Reply-to address for email"
},
{
"name": "order_cancellation.subject",
"description": "Subject of email"
},
{
"name": "order_cancellation.template",
"description": "Mandrill template name"
}
],
"humanizers": {
"200": "Order Cancellation email sent to {{email}}",
"400": "Order Cancellation email could not be sent to {{email}}"
}
},
"recommends": {
"messages": [
"order:canceled"
],
"identifiers": {
"order_number": "payload.order.actual.number"
},
"options": {
"retries_allowed": true
},
"preprocessors": [
{
"name": "generate_body",
"default": "<h1>hello <%= name %></h1>"
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment