Application Programming Interface forums

0 Subscribers

3 Topics

5008 Conversations

Area for questions and answers about SuperOffice API's.

All conversations (5008)

done
Answered
push_pin lock

We have had a question from relating to API's around flows

Hi, I am not sure if this is possible, but a customer of ours wants to use flows to send emails to their customers with quotes in from an external system.  They want to create the flow, and create the email that will be sent to the customer, but using the designer tools that are built in to the Marketing emails. They then via the API, want to add a contact as a participant into the flow, which may well be possible, but then, and this is what I don't think will be possible, inticept the email that is being sent via the flow, and add the quote pdf document as an attachement to the email, before it is sent to the contact. I know there are other ways to do this without the flow, but they wanted to be able to use the marketing email designer to create the email template. Is this possible at all? Many thanks, Trevor
Trevor Sharp
1
0
5 h, 39 m ago | 03:41 PM
Topic:
Online development and web service API's
done
Answered
push_pin lock

Missing operations in MergeMoveLog when merging companies

Dear All, I don't know if any of you have observed this - and possibly found a solution - but I have noticed that when I merge companies with identical persons, the MergeMoveLog only records the merge operation of the actual company and not any of the identical persons who was also merged in that operation. Here is an example of the log's output from the latest merge companies operation I performed: { "odata.metadata": "https://app.superoffice.com/Cust25645/api/v1/Archive/$metadata", "odata.nextLink": null, "value": [ { "PrimaryKey": "35527", "EntityName": "MergeMoveLog", "MergeMoveLog.operation": 1, "MergeMoveLog.sourceRecord": 24357, "MergeMoveLog.destinationRecord": 24356, "MergeMoveLog.options": "mergeIdenticalPersons=True&replaceEmptyFieldsOnDestination=False", "MergeMoveLog.updatedCount": 0, "MergeMoveLog.registered": "2026-08-11T19:19:33" } ] } No mention of the identical persons I had created for the test. When querying I am only filtering on the date/time of the event: Our webhook however, caught the very event, that I am missing in the MergeMoveLog: Is this working as intended? Is there any other way that I can get that information (other than looking at the info from the webhook)?   Best Regards, Henrik
Henrik Povlsen
1
0
12 Aug 2026 | 08:29 AM
Topic:
Online development and web service API's
done
Answered
push_pin lock

Pretty format json?

Is it possible to pretty format a json string: Map m = Map (data); printLine(m.toJson()); Outputs: { "First": "Martin", "Last": "Andersen"} I would like to have it like this: {   "First": "Martin",   "Last": "Andersen" }   Regards Martin
Martin Andersen
4
6
10 Jul 2026 | 10:54 AM
Topic:
Service and CRMScript Discussion

Last reply

It is for output to an email send when an error occurs in a larger system, the email is send from a script and will contain a payload from an external system calling into a script. The email is not meant for users but for an administrator, and the prettyPrint will make it much easier to read.
by Martin Andersen
6 Aug 2026 | 07:33 AM
done
Answered
push_pin lock

Do Project Member Webhooks not work?

Hi, I am trying to create a webhook via a CRMScript based on changes made to project members. It looks like it should be possible, https://docs.superoffice.com/en/automation/webhook/reference/project-member-events.html , but nothing fires when I add/edit or delete a project member. Here is the code registering the webhook. #setLanguageLevel 4; String targetCrmScript = "ProjectMemberWebHook"; String[] events = String("projectmember.created,projectmember.changed,projectmember.deleted").split(","); NSWebhookAgent webhookAgent; NSWebhook webhook = webhookAgent.CreateDefaultWebhook(); //NSWebhook webhook = webhookAgent.GetWebhook(1); webhook.SetEvents(events); webhook.SetName("Project Members Web Hook Handler"); webhook.SetType("crmscript"); webhook.SetTargetUrl(targetCrmScript); webhook.SetErrorsEmail("trevor.sharp@synergytechnology.co.uk"); webhook.SetState(1); // Set it as active! webhook = webhookAgent.SaveWebhook(webhook); printLine("Webhook succeeded with ID: " + webhook.GetWebhookId().toString()); And here is the webhook. #setLanguageLevel 4; String variablesAvailable = ""; Map m = getVariables(); while (!m.eof()) { variablesAvailable = variablesAvailable + m.getKey().stripLeadingAndTrailing(" ") + " - " + m.getVal().stripLeadingAndTrailing(" ") + "<BR>"; //Move To Next Record m.next(); } log(variablesAvailable); It writes ok to the log when I enable the webhook, but nothing is added to the log when I make changes to the Project Member, and I cannot get any traces from this script. Also with the new screen for creating the webhooks via the GUI, this does not reference the Project Members table, which makes me wonder if it is not supported, but then why have a whole help page on project member events if it is not supported. Does anyone know whether the project members web hooks should fire or not, have I missed something in my code, or am I trying to achieve the impossible. Many thanks, Trevor
Trevor Sharp
2
2
4 Aug 2026 | 03:01 PM
Topic:
Service and CRMScript Discussion

Last reply

Brilliant, thank you David.
by Trevor Sharp
5 Aug 2026 | 01:08 PM
done
Answered
push_pin lock

Number and Date Formatting not working when using "NSQuoteAgent.GetOrderConfirmation"

Hi, You may have seen from a previous post (where I raised a question on document filename formats), that I have written a script that uses the "NSQuoteAgent.GetOrderConfirmation" function, to allow one of our customers to produce multple order documents against the same quote, but using different document templates for each document. Our customer needs multiple templates against the quote, for things such as Works Order Sheet, Picking Form etc., and the "GetOrderConfirmation" function works really well, as it allows you to save in SuperOffice multiple "Order Confirmation" documents, using different "Order Confirmation" templates against the same quote.  Below is a screenshot of the script, that runs from the Sale Task menu. The trouble is, that it does not seem to respect the user's Number and Date format when producing the document. Below is a screenshot of part of an order confirmation document produced when raising the document in the normal manner (at the point of placing the order, which can only be done against one of the document templates for any given quote).  The date correctly shows in the UK date format, as per the customer's number and date format. When I produce the same document via a CRM Script, using the following code. NSQuoteAgent quoteAgent; String quoteDoc = quoteAgent.GetOrderConfirmation(quoteVersionId, confirmationTemplateId); This is the document it produces, with the user's number and date format being ignored. As the script runs from the Sale Task menu, I expected the script to run in the context of the user, and therefore use the user's number and date format settings, but this seems not to be the case. Am I missing something in my code, or is this a bug with the function in SuperOffice? Many thanks, Trevor
Trevor Sharp
2
7
14 Jul 2026 | 08:54 AM
Topic:
Service and CRMScript Discussion

Last reply

Great, thanks David, that's really good to know.
by Trevor Sharp
15 Jul 2026 | 04:50 PM
done
Answered
push_pin lock

Incoming or outgoing ?

Hi, how can I detect  if an email is outgoing or incoming ?   Rest-API, mirror database query, whatevet method is fine.  

IT

Inge Simon Thorbjørnsen
1
0
14 Jul 2026 | 02:14 PM
Topic:
Client libraries and tools
done
Answered
push_pin lock

How do I all tickets via Archive agent?

I try to get tickets, using this NSArchiveAgent agent; NSArchiveListItem[] result = agent.GetArchiveListByColumns2 ("FindTicket", "ticketId,title,status,person/personId", "", "ticketId>'0'", "ticket", 0, 200); printLine ("Row count: " + result.length().toString()); foreach (NSArchiveListItem i in result) { Map col = i.GetColumnData(); col.first(); while (!col.eof()) { print(col.getKey() + ": " + col.getVal() +" - "); col.next(); } }   But it only seem to return open tickets. Why is that - what am I missing?  
Morten Larsen
1
2
13 Jul 2026 | 10:57 AM
Topic:
Service and CRMScript Discussion

Last reply

wow easy! Thanks
by Morten Larsen
13 Jul 2026 | 11:09 AM
done
Answered
push_pin lock

Send email from a CRMScript

Simply put, I want to send an email when certain criteria are meet, but I can't find any documentation about the subject. I found a forum post with the class name NSEmailAgent, but it does not exist? Maybe it used to exist? It should of cause be from within SuperOffice, and be shown in the archives, and not some mail-chimp Rest call. Regards Martin
Martin Andersen
2
2
9 Jul 2026 | 10:19 AM
Topic:
Service and CRMScript Discussion

Last reply

Thank you.
by Martin Andersen
9 Jul 2026 | 10:32 AM
done
Answered
push_pin lock

NTLM as authenticationMethod removed?

Hi, we have an Online customer who has been using CRMScript to get data from a webservice which is protected by NTLM auth. Somewhere around the time they were upgraded to version 12 all calls from CRMScript using NTLM started to fail. It seems to use basic auth even though authenticationMethod is set to ntlm. Example code: HTTP http; http.setOption("authenticationMethod", "ntlm"); http.setOption("username", "foo"); http.setOption("password", "bar"); http.get("https://testing.requestcatcher.com"); On an older onprem solution I see that setting http.setOption("authenticationMethod", "ntlm") causes the Authorization header to be "Authorization: NTLM ****", but in Online v12 the Authorization header is set to "Authorization: Basic *****". Has NTLM support been removed from version 12? It is still mentioned in the documentation: https://docs.superoffice.com/en/automation/crmscript/reference/CRMScript.Native.HTTP.html
Frode Lillerud
3
3
2 Jul 2026 | 06:56 AM
Topic:
Service and CRMScript Discussion

Last reply

Hello,  We have located the issue and it will be hotfixed in our upcoming release.  Thank you for bringing it to our attention! :)  //Eivind
by Eivind Fasting
8 Jul 2026 | 12:12 PM
done
Answered
push_pin lock

Calling CRMscript as webservice from the outside world (Umbraco) but with data in the body as json

I saw this https://community.superoffice.com/en/technical/blogs/archive/building-custom-rest-api-methods-using-crmscript/?epslanguage=en And it works out of the box you could say. But I need a big chunk of data in the body of the request, can I do that?
Martin Andersen
2
1
1 Jul 2026 | 12:12 PM
Topic:
Service and CRMScript Discussion

Last reply

That was fast, I could not even eat a ice before you answered. Thank you.
by Martin Andersen
1 Jul 2026 | 12:25 PM