Use Scripts to Reject Shopify Orders in a Pending Financial Status

Use this script example to ensure orders from Shopify only enter Infoplus if they are in the 'paid' financial status.

Infoplus Support can help with general questions about how scripting works. For help with a specific script or its outputs, you will need to submit a Pro Services request for paid support. Pro Service request form can be found here.

When using some payment processors in Shopify, there are times when Infoplus will receive orders while they are in a 'pending' financial status.  A subsequent notification will also be sent to Infoplus, once the order's financial system is 'paid'.  By default, Infoplus will import the order when the first notification is received.  You may prefer to have Infoplus reject the first notification and wait for the 'paid' financial status.  This can be accomplished using an Infoplus Script.


The first step is creating a script with the Script Type of "Shopping Cart Connection Order".  Next, populate the code section of the script with the following.


After the script is written and saved, it must be applied to the Shopify Shopping Cart Connection record in Infoplus.  Navigate to this record, select edit from the actions menu (or press the 'e' key), then in the script field select the script that was previously created.  Finally, don't forget to save the connection by clicking the Save button at the bottom of the changes. 


Once the script has been applied to the shopping cart connection, the script log table can be used to confirm the script is working as expected.  


Related Information: