BALANCE event whenever a card’s balance changes. The extension applies each event to the Omneo Credit that represents the card, so the balance shown on a Profile in Omneo matches Givex.
What Givex sends
Event types other than
BALANCE are accepted and ignored.
Givex has not confirmed the final names for the email, card face name and Profile name fields, so these four are read through the
event_field_mapping setting and can be pointed at whatever names your Givex account sends. The names above are the defaults. See Setup.How the Credit is found
Omneo looks for exactly one Credit whoseexternal_id equals the masked card number in the givex namespace. If none is found, it looks for a Credit whose credit_number equals the masked card number. If more than one Credit matches, nothing is changed and the event is rejected so the duplicate can be resolved.
What is updated
When a Credit matches, Omneo sets:
Events are ignored without changes when the
uuid has already been applied or when the eventDate is older than the last applied event. An event whose currency does not match the Credit Definition currency is rejected and nothing is written.
If the matched Credit has no Profile and the event carries an email address that matches an Omneo Profile, the Credit is assigned to that Profile in the same update.
When a Credit is created
If no Credit matches, Omneo picks a Credit Definition in this order:- The Credit Definition whose name is exactly the
cardFaceNameon the event. - The Credit Definition named by the
credit_definition_handlesetting.
value_remainingis the event balance andvalue_initialis the activation amount, or the balance if Givex did not send one.external_idis the masked card number in thegivexnamespace, andcredit_numberis the full card number when Givex sends it.is_importedistrue, so reporting can separate Givex-originated Credits from Credits issued in Omneo.
create_profile_if_missing decides: true creates the Profile from the event’s name fields and assigns the Credit to it, false leaves the Credit unassigned for you to assign in Omneo later.
If no Credit Definition can be chosen, the card is not created and the event is answered with 404. Givex retries these, so if you do not intend unknown cards to become Credits, ask Givex to stop sending events for cards outside your Omneo program rather than leaving them to retry.