def METHOD_NAME(doc, webhook):
	data = {}
	doc = doc.as_dict(convert_dates_to_str=True)
	if webhook.webhook_data:
		data = {w.key: doc.get(w.fieldname) for w in webhook.webhook_data}
	elif webhook.webhook_json:
		data = frappe.render_template(webhook.webhook_json, get_context(doc))
		data = json.loads(data)
	return data