Discussions
As a wholesaler im trying to PDF Invoice Integrate
Hi,
Our company (electrical wholesaler with @ 150 Branches who have hundreds of customers using serviceM8) sends a .CSV file for price file Integration but our current PDF Invoice is not suitable to be uploaded to a job card etc.
we have some new PDF Invoice templates that we would like to be trialled, can someone in I.T etc be able to trial and let us know what we can do to either edit etc. so your customers have a better experience using serviceM8
Posted by Dan Kirwan over 1 year ago
Job Status
Hi,
When a quote gets accepted and turns into a work order. Is there a trigger I can use for this?
Posted by George Whitman over 1 year ago
Zoho CRM and Servicem8 to create a job. Problem is the customer name is not allowed to be mapped. And if put manually loses details of the one we integrated (like job contact and billing contact)
I have integrated Zoho CRM and Servicem8 to create a job. Problem is the customer name is not allowed to be mapped. When I manually input the customer name in servicem , all the details of job contact and billing contact is lost therefore losing the purpose of integrating it. How can we fill the customer name (after integration) without losing data on job contact and billing contact?
Posted by Faith over 1 year ago
add webhook url
when i'm adding webhook url ...gave me error .
Posted by umang over 1 year ago
How to get Invoice as a pdf using API
I have used attachment API to get details of invoice agaiinst Job but I just receive file name with extension (invoice1.pdf) but not the path of invoice.
How can I get actual Invoice against jopb?
Thank you.
Posted by Ankit over 1 year ago
Self Hosted Add-On - returned Callback Html not displaying
Hi there ServiceM8 Team,
I'm working on a self-hosted Add-On and am currently experimenting with different implementations.
I was able to successfully play around with a "simple function" Add-On from your examples but decided on taking the self-hosted Add-On route.
So far I've been able to successfully Activate the Add-On, I've implemented OAuth, the process goes as expected and my Add-On button appears in the job.
I've created a "dummy" callback method that returns some basic html for testing purposes(the html itself doesn't seem to be the issue), it is successfully being called when the Add-On is clicked, and having tested with Postman I can see that the html content it's returning is correctly and displaying in Postman, however it does not display inside the Add-On modal. I have also tried with the "new window" approach and the result is the same.
This is my Callback code implement in .NET Core
[HttpPost]
[Route("callback")]
public async Task<ActionResult> Callback()
{
var request = HttpContext.Request;
var requestBody = await new StreamReader(request.Body).ReadToEndAsync();
var tokenHandler = new JwtSecurityTokenHandler();
var validationParameters = new TokenValidationParameters
{
ValidateIssuerSigningKey = true,
IssuerSigningKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(_apiOptions.ClientSecret)),
ValidateIssuer = false,
ValidateAudience = false,
RequireExpirationTime = false
};
SecurityToken validatedToken;
ClaimsPrincipal claimsPrincipal;
try
{
claimsPrincipal = tokenHandler.ValidateToken(requestBody, validationParameters, out validatedToken);
}
catch (Exception ex)
{
Console.WriteLine($"Failed to validate JWT: {ex.Message}");
return BadRequest("Invalid JWT");
}
var claims = claimsPrincipal.Claims.ToList();
var eventDataJson = (string)claims.First(claim => claim.Type == "eventArgs").Value;
var eventName = (string)claims.First(claim => claim.Type == "eventName").Value;
Console.WriteLine($"Event Name: {eventName}");
var html = $@"<html>
<head>
<script src=""https://platform.servicem8.com/sdk/1.0/sdk.js""></script>
<link rel=""stylesheet"" href=""https://platform.servicem8.com/sdk/1.0/sdk.css"">
<script type=""text/javascript"">
var client = SMClient.init();
</script>
</head>
<body>
<h1>Job Details</h1>
<a href=""https://www.google.com"" class=""btn btn-primary"" target=""_blank"">Go to Google</a>
</body>
</html>";
return Content(html, "text/html");
I've tried playing around with the X-Frame-Options header settings with no success. So far I haven't been able to find an answer in the documentation and I've appreciate any help I could get - please let me know if I'm missing something. The endpoint handling these requests is doing it over https.
Thank you,
Antonio Batinic
Posted by Antonio Batinic over 1 year ago
OAuth Scopes
Is there a way we can find all OAuth scopes required for the servicem8 API?
Only some of them are listed. For example, the https://api.servicem8.com/api_1.0/note.json endpoint does not list a scope to be able to interact with the endpoint via OAuth
Posted by Tait Leaney over 1 year ago
Supplier invoice import
Why does this never work? It only ever displays the invoice in the inbox. Has something changed?
Posted by Graeme Huntley over 1 year ago
ServiceM8 and DEAR Inventory
Has anyone successfully integrated ServiceM8 and DEAR? If so how please? I am aware that by using Zapier, you can create 'triggers' to perform 'tasks' between both systems but wondering if there is a better solution/s out there that has successfully been set up?
Posted by Mitch Uzelac over 1 year ago
Can i create JobContact webhook in serviceM8
Hey there can you tell me how i can create webhook of jobContact
Posted by AnkitDhiman over 1 year ago