")
{
customerName = sales.get("customer_name");
customerResponse = invokeUrl
[
url: "https://books.zoho.com/api/v3/contacts/" + sales.get("customer_id") + "?organization_id=" + organizationID
type: GET
connection: "books_api_connection"
];
customerDetails = customerResponse.get("contact");
customerEmail = customerDetails.get("email");
sendmail
[
from :zoho.adminuserid
to :customerEmail
subject :"Thank you for shopping! Here's a 10% discount!"
message :"Dear " + customerName + ",
We just wanted to take a moment of our time to thank you for your continuous support.
Based on your recent purchases, we'd like to offer you a 10% off on your next purchase with us.
Please show this email during billing to avail this discount!
Regards,
" + name + "
"
]
}
}
```
## Workflow Scenarios
Workflows help you automate tasks in Zoho Books. [Read more](/en-sg/books/help/settings/automation-scenarios.html) to explore some common scenarios in detail.
Learn more from the [Connections](https://www.zoho.com/en-sg/books/help/settings/connections.html) help document.
Automate your business workflow with Zoho Books’ [accounting automation.](https://www.zoho.com/books/accounting-automation/)
* * *