LogoLogo
AboutSupport
4.2
4.2
  • Unifi User Documentation
  • Install
    • Release Notes
      • Unifi 4.2 Release Notes
      • Unifi 4.1 Release Notes
      • Unifi 4.0 Release Notes
      • Unifi 3.1 Release Notes
      • Unifi 3.0 Release Notes
      • Unifi 2.2 Release Notes
      • Unifi 2.1 Release Notes
      • Unifi 2.0 Release Notes
    • Install or Upgrade
      • Global Utility
      • Hotfix
  • Configure
    • Integration Designer
    • Processes
    • Integrations
    • Connections
    • Messages
    • Message Scripts
    • Fields
    • Field Maps
    • Response Actions
    • Event Actions
    • Datasets
      • Create a New Dataset
      • Dataset Extras
    • Polling
      • Pollers
      • Poll Processors
    • Administration
      • Activity Logs
      • Data Stores
      • Properties
      • Scheduled Scripts
      • System Logs
    • Attachments
      • Extracting Attachments
      • Fetching Attachments
      • Embedded Attachments
    • Scripting
      • Snippets
      • Variables
    • Documentation
    • How to guides
      • How to Handle Attachments
        • Message
        • Scripted REST Resource
        • Test AddAttachment
      • How to Manually Close a Bond
      • How to Poll for Large Response Payloads
      • How to Setup an OAuth Connection
        • Identity Provider Instance
        • Identity Consumer Instance
        • OAuth Refresh Token Job
      • How to Setup Heartbeat Messages
  • Deploy
    • Package
    • Instance Clone
  • Operate
    • Bonding
      • Bonds
      • Bonded Attachments
    • Transport
      • Snapshots
      • Transactions
      • Stages
      • HTTP Requests
      • Dataset Requests
      • Poll Requests
    • Error Handling
      • Integration Pause and Resume
      • Integration Repair
      • Request Retry
      • Transaction & Request Replay
      • Transaction Ignore
  • Test
    • Overview
    • Integration Test
    • Test Scenario
    • Test Scenario Data
    • Test Result
    • Test Scenario Result
    • Generating Tests
    • Running Tests
    • Exploring Results
  • Integration Guides
    • Outbound Incident Guide
      • Getting Started
      • Process
      • Integration
      • Connection
      • Create Scenario
        • CreateIncidentResponse Message
        • CreateIncidentResponse Fields
        • CreateIncident Message
        • CreateIncident Fields
        • Trigger
        • Test CreateIncident
      • Update Scenario
        • Response Message
        • UpdateIncident Message
        • UpdateIncident Fields
        • Test UpdateIncident
      • Resolve Scenario
        • ResolveIncident Message
        • ResolveIncident Fields
        • Test ResolveIncident
      • Build - Integration Level
      • Conclusion
    • Bidirectional Asynchronous Incident Guide
      • Getting Started
      • Process
      • Web Service
      • Integration
      • Connection
      • Create Scenario
        • Response Message
        • CreateIncidentReceipt Message
        • CreateIncidentReceipt Fields
        • CreateIncident Message
        • CreateIncident Fields
        • Trigger
        • Test CreateIncident
      • Update Scenario
        • Receipt Message
        • UpdateIncident Message
        • UpdateIncident Fields
        • Test UpdateIncident
      • Resolve Scenario
        • ResolveIncident Message
        • ResolveIncident Fields
        • Test ResolveIncident
      • Build - Integration Level
      • Build the Other Half
        • Move the Integration
        • Reconfigure the Connections
      • Conclusion
    • Incident Update Poller Guide
      • Polling
        • Poll Processor
        • Poller
      • Inbound Message
        • UpdateIncidentInbound Message
        • UpdateIncidentInbound Fields
      • Message Identification
      • Bond Identification
        • Edit Incident Form
        • Edit CreateIncident Message
      • Test Update Poll
      • Conclusion
    • Incident Multiple Message Poller Guide
      • Polling
        • Poll Processor
        • Poller
      • Inbound Messages
        • ResolveIncidentInbound Message
        • ResolveIncidentInbound Fields
      • Testing
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
      • Conclusion
    • Incident Create Poller Guide
      • Polling
        • Connection Variables
        • Poll Processor
        • Poller
      • Messages
        • CreateIncidentInboundReceipt Message
        • CreateIncidentInboundReceipt Fields
        • CreateIncidentInbound Message
        • CreateIncidentInbound Fields
      • Build - Integration Level
      • Test Create Poll
      • Conclusion
    • Incident Parent and Child Poller Guide
      • Polling
        • Connection Variables
        • Child Poll Processor
        • Child Poller
        • Parent Poll Processor
        • Parent Poller
      • Inbound Messages
      • Testing
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
      • Conclusion
    • Incident Attachment Poller Guide
      • Polling
        • Connection Variables
        • Edit Endpoint URLs
        • Get Attachment Poll Processor
        • Get Attachment Poller
        • Select Attachments Poll Processor
        • Select Attachments Poller
        • Edit Child Poll Processor
        • Edit Child Update Poller
      • Messages
        • AddAttachmentInbound Message
      • Testing
        • Test Outbound Scenarios
        • Test CreateIncidentInbound
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
        • Test AddAttachmentInbound
      • Conclusion
  • Troubleshooting
    • Attachments
      • Inbound SOAP/Base64 attachments stopped working
      • New record attachments are not sent from Portal
      • Special characters in attachment file names
    • Datasets
    • Development
      • Bonding to existing records
      • Copying an existing Unifi trigger rule doesn't work
      • Duplicate messages being sent
      • Deleted records are not packaged
      • Multipart Form Data
      • Undefined error when building an integration
    • Diagnostic
    • Installation
      • Latest version of Unifi not accessible
    • Integration Responses
      • Transaction has been processed already
      • Initiating transaction not found for inbound receipt
      • Message has already been processed
      • Message ID not found
      • Message is not valid for this bond
      • Message name not recognised
      • No retry for requests with 401 response
      • Unable to identify message name from request
    • Other
      • Dynamic stage does not render
      • Duplicate bonds on Request integrations
    • Self-test
  • About
    • Quick Tour
    • Supported Features
    • Application Modules
    • Data Model
    • Transport Data Flow
Powered by GitBook
On this page
  • What is the problem?
  • Why are these an issue for Unifi?
  • How to fix this issue

Was this helpful?

Export as PDF
  1. Troubleshooting
  2. Other

Duplicate bonds on Request integrations

This is a really rare scenario, but one to be aware of if you're using Unifi as a proxy though to push requests to multiple systems.

What is the problem?

If you're integrating OOB ServiceNow Request process then you'll be using the ServiceNow Cart API in order to submit your inbound requests. This is how we set up all of our request integrations, its the sensible thing to do. Attempting to integrate request without it is asking for a lot of trouble, workflows, flows, domains, all end up being compromised when circumventing the cart API.

The downside to using the cart however is we are not in control of its behaviour. We've noticed a couple of things that can cause issues when dealing with multiple integrations on a request record:

  • the cart takes a long time to submit

  • additional updates to the request/requested item record are made during the cart submission process

Why are these an issue for Unifi?

Good question. Ordinarily they aren't if you are only integrating a request with one Unifi integration at a time. It's when you're using Unifi as a proxy to push requests to multiple systems that they can become a problem.

Unifi runs from trigger business rules on an integrated table. When the cart updates a requested item many times (and we're assuming you're integrating at the item level - most people do) then you will trigger Unifi multiple times. So picture this scenario, we receive and inbound request from Unifi integration A, we submit the request via the cart, which in turn then triggers Unifi, and more specifically Unifi integration B. Note that integration B has been triggered before integration A has completed, as it's the cart submission causing this save.

Now if we add the slow cart submission time (we see multiple updates on the requested item during this process which is likely why its slow), then we have an "interesting" scenario which can occur. Lets go back to the previous example, but lets make integration B a synchronous integration. We know that integration B has been triggered before integration A has finished its processing, and in fact this is before its bond has been committed, as the bond is committed at the end of the processing. Now with integration B being synchronous , and integration A slowed down by the cart submission process, it is actually possible for integration B to complete before integration A has! Yes, crazy, but true. Now this is where the problem lies. When we process the response for integration B, we update the request item with something like a work note or correlation ID. This then triggers the Unifi business rule which checks to see what integrations should fire. As we don't have the bond for integration A yet, Unifi decides that it should send a create message to integration A (as the create conditions will match - we received the create from A, makes sense we should send one for the same data too). Now we create a new (outbound) bond for integration A, and create a new request in their system for the request that they sent us! And finally the cart submission process finishes and submits the (inbound) bond. In the end we're left with a mess! Two bonds for the same integration on a requested item, and two requested items in system A for the same request. Yuck.

How to fix this issue

Don't despair, there's an easy fix to this issue and that is to prevent Unifi from sending messages whilst the cart submission is being performed. All you need to do is to wrap the cart.placeOrder() function with the x_snd_eb.Message.outboundEnabled() function, like so:

x_snd_eb.Message.outboundEnabled(false);
cart.placeOrder();
x_snd_eb.Message.outboundEnabled(true);

This prevents integration B from being triggered (well, any Unifi integrations for that matter) during the cart submission. Unifi updates the target (e.g. requested item) after processing the stage to target script, which will then trigger integration B after the bond for integration A has been completed, thus preventing duplicate bonds and tickets.

PreviousDynamic stage does not renderNextSelf-test

Was this helpful?