Expand my Community achievements bar.

SOLVED

Custom connector :catching delivery stop request

Avatar

Level 2

Hello everyone.

we are currently working on a custom connector (using js and  post processing workflow associated to an external account).

to make it simple : users create a delivery, write the message, associated a scheduling date and start the campaign.

the post processing workflow create the delivery associated to the provider (and tag the target and message).

when doing some tests, we did try to create a delivery, make all the validation and confirm it (so everything is create on the provider side).

if we try to stop the delivery, we cannot catch the stop request (so we cannot cancel the campaign on the provider side).

does any of you  implement the stop on their custom connectors?

THank you

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

hello.

As you said creating a new button/method  wouldn't work eitheir as there are too many places where we can stop the delivery.

The idea would have been to have an Hook for the method STOP  but that doesn't seems to exist.

i would have thought that the mtachild got a method for it too, but it's not the case (or did you mean there was one?)

A workflow that check every minutes the delivery state (the user can decide to stop the delivery right when it starts) sounds ressource consuming

i found it weird that there is no way to catch the stop request easily.

For now the only way to minimize it, is to create the delivery on the partner side at the last minute so we would have less stop requests to send

thank you

 

View solution in original post

4 Replies

Avatar

Community Advisor

Hello, 

 

If I understand correctly, then you want to capture, when a customer clicked on the stop button on delivery to stop the delivery as in below picture. 

Parvesh_Parmar_0-1650626711019.png

 

 

As I found that, this stop button is created by html view, what i mean, in the input form of delivery there is Summary container, there a delivery.jssp page is included. So this view is an html view.  When  a user click on the stop button, then deliveryState is updated by jssp script.  This is out of box. I might be not the best idea to change the out of box jssp script. 

 

I am just thinking, if you could check the deliveryState of delivery, when delivery is opened by creating a function  in the input form on enter and store value of deliverySatate like in an option or other temp table. When this is closed, check again on leave, if deliveryState  is changed  from started to stop, then you can send the request to your provider to cancel it. 

 

Thanks. 

Parvesh.

 

 

Avatar

Level 2

Hi Parvesh.

thank you for the help

sadly that would answer only part of the case.

as the delivery can be stop directly at the following screens :

  1. Campaign level (html view)
  2. delivery level (html view)
  3. delivery screen with the form
  4. deliveriies listing screen
  5. (other places?)

that makes a lot of 'unmanageable' modifications (as internal jssp can be a pain to managed during upgrade).

i will keep looking for it

Thanks again

 

 

 

Avatar

Community Advisor

Hello @kevinedmond 

You cannot add hook to the stop button on these dashboards (only by changing the files on file system which I guess is not recommended)

 

What you can do is to:

  • add additional button on the form with action button that will stop the delivery and send stop call to the provider. Do this by adding schema method that extends NLWS.nmsDelivery.stop() shcema method. This could be weird from user perspective
  • Or you can have technical workflow that will query the custom deliveries with status stopped in last 1minute/5minuetes/10minutes/15minutes/hour /up to you with the use of "incremental query" it assures that deliveries are only selected once. And then just simply add JS code and reuse your custom connector to send stop signal where needed. This way no need to play with views and forms.. for user it will be seamless 

 

 

Marcel Szimonisz

MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/

Avatar

Correct answer by
Level 2

hello.

As you said creating a new button/method  wouldn't work eitheir as there are too many places where we can stop the delivery.

The idea would have been to have an Hook for the method STOP  but that doesn't seems to exist.

i would have thought that the mtachild got a method for it too, but it's not the case (or did you mean there was one?)

A workflow that check every minutes the delivery state (the user can decide to stop the delivery right when it starts) sounds ressource consuming

i found it weird that there is no way to catch the stop request easily.

For now the only way to minimize it, is to create the delivery on the partner side at the last minute so we would have less stop requests to send

thank you