---
# System prepended metadata

title: Untitled

---

### Snowflake credentials
Username: `TEJAK`
Account: `ip16451.ap-southeast-1`
passwrod: `Snowflake12345`
Database: 
Schema: `PUBLIC`
Warehouse: `SF_TUTS_WH`
Role: `ACCOUNTADMIN`


> chatwootPostMessage
```
window.parent.postMessage('chatwoot-dashboard-app:fetch-info', '*');
```
Advanced: 
1. Run on load
2. Execute `onMessageEventHandler` on successful

> onMessageEventHandler
```
window.addEventListener("message", async (event) => {
  if (event.source != window.parent) {
    return;
  }
  const eventData = JSON.parse(event.data)
  if (eventData.event === 'appContext') {
    await actions.setVariable('customer_email', JSON.stringify(eventData.data.conversation.meta.sender.email, null, 2).replaceAll('"', ''));
		await actions.setVariable('customer_phone', JSON.stringify(eventData.data.conversation.meta.sender.phone_number, null, 2));

		await actions.setVariable('appData', JSON.stringify(eventData, null, 2));
    
    await queries.getCustomerData.run();
  }
}, false);
```