In this sample, we will show you how to post birthday wishes to Microsoft Teams from B1 Print and Delivery.
What you need:
- B1 Usability Package 2019.04 or higher
- A B1 Usability Package License
- A Microsoft Teams account (you need to be owner/admin of the Channel you set it up in)
- An incoming Webhook connector (See this video on how to make one)
Step by Step Setup:
- Go to Administration > Add-Ons > B1 Usability Package > Module Configuration > Universal Function > Universal Function Configuration
- Create the following Configuration
- In name write "New Awsome deal"
- In URL enter the URL of you Microsoft Teams Webhook
- Set template to "Microsoft Teams"
- Leave Subject blank (not used in this sample)
- Enter the following message
'<h1>'+T1.SlpName+' is awsome!.</h1><br/> <strong>Why?</strong><br/><br/> Because he/she just booked a new order with customer '+T0.CardName+', that why!' As 'Message'
FROM ORDR T0
JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode
WHERE T0.DocEntry = $[NEWID]
<img src="https://www.boyum-it.com/BoyumImageSamples/awsome.gif" />
- You can tweak the SQL as you please and use another image if you please
- Go to Administration > Add-Ons > B1 Usability Package > Module Configuration > B1 Validation Configuration
- Set name to "Awsome new sales!"
- Set formType to "139" (Sales Order)
- Set Event = "Data Add"
- Set BeforeAction = "False"
- Set No Condition, Just execute Function to The Universal Function you created in Step 1